Re: [css-device-adapt] preferred way to make text bigger/smaller

On Fri, 28 Oct 2011 20:35:42 +0200, Peter Sorotokin <psorotok@adobe.com>  
wrote:

> There are two possible ways to make text bigger (or smaller):
> 1. Change the default font size (say, from 16px to 20px)
> 2. Layout the content into smaller logical viewport and then scale the
> layout up to fill up the original viewport
>
> The second method is widely used by the browsers. It only depends on the
> content being able to adapt to the different viewport sizes and allows
> authors to conveniently use absolute units to style the content  
> (including
> the font sizes).
>
> The second approach is also implemented by some browsers (I believe). It
> is potentially more flexible, since it allows authors to select which
> content will become bigger with text (by sizing it with em units) and
> which content should stay the same size. (This method is commonly used  
> for
> ebook content).
>
> Of these two approaches, there is no right or wrong one, it depends on  
> the
> content. It also interacts with logical viewport size: the first approach
> relies on ability to resize it. Having the info on the preferred text  
> size
> change method would be a valuable for the UA and I think it would go
> naturally into @viewport rule.
>
> I propose the following descriptor for use only inside @viewport:
>
> text-zoom: scale | font-size
>
> scale is default value that corresponds to the second method, font-size
> corresponds to the first. UA is still free to choose either method, or
> something else altogether, of course (e.g. scaling without layout).

I'm not sure I completely understand, but for an author, you can choose  
between the zoom types for the initial zoom like this:

1: text-zoom: scale:

@viewport {
     width: auto;
     zoom: 200%;
}

2: text-zoom: font-size:

:root {
     font-size: 200%;
}


It sounds like you would like a UA hint to tell the UA to change the  
default font-size on zooming so that all lengths that are relative to the  
default font-size will change on zooming, and all other lengths won't. Is  
that correct?

If so, is that really something the author should set? It sounds to me the  
user agent should support both and the user should be able to choose. At  
least desktop browsers normally support changing the default font-size  
through a preferences dialog. It should be straight-forward to support  
scaling the default font-size through pinch-zoom, and even make it the  
default zoom behaviour for an eBook UA, if that's what users want.

-- 
Rune Lillesveen
Layout Group Manager
Core Technology Department
Opera Software ASA

Received on Monday, 31 October 2011 14:06:23 UTC