Juan Vuletich wrote:
I never found a clear specification of the meaning of '12 point', and I'm totally for making the fonts behave properly. So, the first question is: Are the glyphs correct? I mean, are the glyphs for DejaVu 12 rendered by Squeak TTF and Freetype the same size? If so, how does Squeak TTF fit glyphs that might need up to 19 pixels (15+4) in 16? I suspect that FreeType and Squeak TTF don't agree on the meaning of point size, but I don't have time right now for checking.
Okay, I figured it out. It turns out that for computing the line spacing one needs to use the OS/2 table from the truetype font if present. What confused me was that DejaVu Sans had a linegap (leading) of zero in its horizontal header table which *should* make things very easy. Except that in its OS/2 table it has a non-zero linegap/leading. If we use the values from that table we end up with the right sizes but it seems that for rendering we then need to use the "original" values (from the hhea table). With these issues addressed, the bitmap and the outline versions are virtually indistinguishable in size and spacing (see screenshot).
BTW, when mixing TTF and StrikeFonts there might be differences in line spacing and kerning, besides mating the baseline, ascent and descent. These might be visible... and perhaps need fixing to to make it look nice.
It looks quite reasonable in my tests. You can take a word and replace just one character with the corresponding font and it looks fine. I'm mostly interested in covering the glyph ranges that are outside Latin-1.
Finally, any reason not to use FreeType? It looks like a good alternative for Unicode.
No particular reason other than that I like this font stuff, and that I think that carrying 500k for a plugin out of which you only use the auto-hinter is kinda insane ;-) Seriously, if someone would port the auto-hinter we could make fonts that are every bit as good as Freetype.
But it's still an interesting idea and I should check it out to see how different (or not) things are.
Cheers, - Andreas