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

Juan Vuletich juan at jvuletich.org
Fri Mar 21 01:12:57 UTC 2008


Hi Andreas,

Thanks for your answer. While I agree with what you say, let me add a 
few comments:

- The  memory consumption estimation you made was with the form that is 
used to build the fonts. The forms actually stored in the fonts are 
smaller. The fonts I included go from 1293 * 11 to 2917 * 33.

- My code is just a small fix to StrikeFonts. As such, I think it 
belongs in any official release.

- There are four (that I know) advanced approach to fonts for Squeak: 
TTCFont, FreeType, Cairo / Rome and Pango. It makes sense to me to 
include StrikeFonts (including my 32bit fix) in a basic official image, 
with a really small set of fonts. Then the developer can choose an 
advanced font package if needed, taking into account that TTCFont needs 
way more memory than 32 bit StrikeFonts (due to color glyph cache) and 
that the other options need specific plugins.

Cheers,
Juan Vuletich

Andreas Raab wrote:
> José Luis Redrejo wrote:
>> I've just tried it and the results are really wonderful. Bert said, 
>> OLPC does not have sub-pixels, but I've tried it also on an OLPC and 
>> it looks much better than the original image. Anyway, I have a some 
>> doubts:
>> - I don't have a CRT monitor, do they look fine at it?
>> - Any trick to generate new size/bold/italic fonts? automatically 
>> generated bold fonts look really ugly...
>> - If there is no hidden problem behind this approach, why hasn't it 
>> already been implemented in the official images?
>
> It's not scalable. Each font needs to be backed by a bitmap and if you 
> need, say, five fonts at five size (which is less than a regular 
> Squeak image ships with) you'll end up this:
>
> totalForms := 5 "fonts" * 5 "faces" * 32 "derivedFonts".
> totalMemory := 600 "width" * 300 "height" * 4 "depth" * totalForms.
>
> The assumptions of memory consumption are based on the image that Juan 
> has on his website (approx. 600x300x32bpp). Larger font sizes will 
> have significantly larger memory requirement (due to geometric growth 
> of the area) so this is a conservative estimate.
>
> By this estimate, supporting 5 fonts in 5 sizes and all combinations 
> of emphasis requires approx. 500MB of storage. Oops.
>
> The approach will work well for a very small number of fonts but is 
> not a scalable solution in general. As a side note StrikeFonts get 
> away with a similar approach only by virtue of a) having originally 
> 1/32 of the memory requirements (by using 1-bit forms instead of 
> 32-bit forms) and b) being able to compute the derivative fonts on 
> demand (so they don't need to be cached).
>
> Cheers,
>   - Andreas
>
>
>




More information about the Squeak-dev mailing list