2009/9/1 Art Hunkins <abhun...@uncg.edu>:
> I've developed a way to handle fonts both on the XO-1 and on SoaS that fits
> text nicely, on fixed pages, to all-sized screens.

It seems to me like you have this working on 2 screen sizes, but it
certainly won't apply to them all.
You seem to make assumptions like that if 50 characters at a specific
font size can fit on a screen that is 600 pixels wide, then 100
characters will fit on a screen that is 1200 pixels wide. And that's
not how displays and font sizes work.

The number of lines that can fit on a screen (at a certain font size)
does not depend on the aspect ratio, it depends on the physical size
of the screen.

The correct way to do this is to render the fonts and measure the
resultant number of pixels occupied by them, then dynamically adjust.
You can discover the approximate size of a character of a font (in
pixels) to seed the process. Pango provides you all you need to do
this.

Daniel
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to