Hi Andreas,
Andreas Raab wrote:
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).
Great! Anyway if you happen to find some problem with the StrikeFonts, I'll be happy to help.
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.
Good!
Cheers, Juan Vuletich
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