[squeak-dev] Re: Re: How to compile FreeType Plugin (FT2Plugin)?

Andrew Tween amtween at hotmail.com
Thu Mar 20 21:03:50 UTC 2008


Hi,
"Bert Freudenberg" <bert at freudenbergs.de> wrote in message 
news:7AF958E0-C4BD-4B9A-BB1E-85E255DCB3FE at freudenbergs.de...
> On Mar 20, 2008, at 15:34 , Juan Vuletich wrote:
>> Isn't something like http://www.jvuletich.org/NiceFonts.html better  for 
>> OLPC? (and for most Squeak users, btw...)
>
>
> No. OLPC eventually needs to support all scripts in the world. Even 
> importing all glyphs in Bitstream Vera for regular, bold, italic, bold 
> +italic takes a huge amount of memory (the current truetype importer 
> imports only the latin1 glyph outlines). And pre-rendering those  glyphs 
> would take even more space.
>
> Rendering outline fonts on-the-fly is really the only option, and  that's 
> what the FreeType plugin is really good at, it has been in use  for some 
> time, so we'd like to deploy it asap.
>
> However, even FreeType doesn't quite cut it, to support proper glyph 
> shaping/combining like for Nepali we need something more advanced like 
> Pango. The OLPC VM contains the RomePlugin with added Pango support,  but 
> this is still experimental. I heard Scratch uses Pango too, but I  have 
> not looked at it yet.
>
> So FreeType is still only an interim solution, but way better than  what 
> we have now.
>
> An issue that fonts embedded in the image solve nicely is that we  would 
> like to have identical rendering on all platforms. We have not  yet 
> decided how to tackle this with external fonts. Ideas appreciated.

FreeType can load a font from memory. So one option is to embed the font 
file contents in the image, in a ByteArray.
I have done the work for this, but it may not be in FreeType Plus 0.4 ; it 
is certainly in later versions on squeaksource.
In any case, I know for sure that it works.

The other option is to place the font files in a /Fonts sub-folder, relative 
to the squeak image.
FreeType Plus will load them, in preference to any other fonts that it finds 
which have the same name.
Then, ship the image together with the /Fonts folder.

In either case, the license for the font may prevent the font from being 
embedded and/or from being distributed.

The other thing that could affect the rendering is the version of the 
freetype libraries that are installed on a particular machine. But, unless 
they are very old, it probably won't make much difference.

Cheers,
Andy

>
> - Bert -
>
>
>
> 





More information about the Squeak-dev mailing list