[squeak-dev] Improved Truetype support
Andreas Raab
andreas.raab at gmx.de
Fri Jul 31 06:57:20 UTC 2009
Folks -
I just finished a bit of work for supporting Truetype fonts directly
from disk which will make it quite a bit easier to support non-latin
languages. If you update your 3.10.2-trunk image, you will get support
for TTFileDescription which is polymorphic with TTFontDescription but
leaves the files on disk instead of reading them into memory and wasting
tons of space. The attached picture shows a couple of Squeak Wikipedia
entries rendered in Batang (a standard font on Windows which is 16MB on
disk and would be, oh, I don't know, *big* if loaded into memory ;-)
One of the nice effects is that because the files are left on disk, you
can access your native platform fonts virtually for free (except that it
affects portability of the image). The font menu in text morphs
(Cmd-k/Alt-k) has consequently been extended to include a "More
(non-portable) Fonts..." entry which now gives you access to all of the
TTFs that we can find. The current list of search paths for fonts is
hardcoded in TTFontDescription>>fontPathsDo: - if we're missing some,
please add them in (this was mostly guesswork).
An open question at this point to me is what the right combination of
fonts for the next release might be. As far as I can tell, we have three
basic choices:
1) Ship all the fonts with the image. Either Vera and friends in-memory,
or Dejavu on disk. Nice and self-contained, but eats space.
2) Use all the fonts on the platform. Drop Vera and instead give people
access to local fonts. Compact, but makes images less portable.
3) Do some combo of having a certain set of fonts in the image, for
example Vera for basic LGC coverage and use platform fonts for the rest.
Compact and portable unless you need the extended fonts.
Any preferences? Opinions? Also, I'm interested in finding fonts that
don't work. Those of you who have "interesting" fonts / scripts, if you
could run a
TTFileDescription loadAllFontFiles.
to see if any of them blow up, that would be greatly appreciated. And of
course any other comments, questions, and suggestions are welcome.
Cheers,
- Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WikiSqueak.png
Type: image/png
Size: 27688 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090730/8aea8d22/WikiSqueak.png
More information about the Squeak-dev
mailing list
|