From: Stepan R. <st...@sr...> - 2005-01-15 18:32:47
|
On Sat, 15 Jan 2005, [UTF-8] Peter =C8ern=E1k wrote: > Hello, > > On Sun, 9 Jan 2005 11:49:41 +0100 (CET), Stepan Roh <st...@sr...> wro= te: > >> On Sun, 9 Jan 2005, [UTF-8] Peter =C8ern=E1k wrote: > > [...] > >>> - hdmx - contains precalculated widths for glyphs at given sizes. This >>> is important for non-linearly scaled glyphs. Missing this table is >>> probably also responsible for "clustering" of chars at smaller sizes. >>> This can be seen with pairs like 'wm', 'ox', 'zy' and others. > > [...] > >> OpenType spec says that if this table is missing or is not filled for >> desired size the width will be determined by calling the scaler which is >> time-consuming, but must give the same results. [...] > > Yeah, you're right there. The spec also says that the table only takes > effect if bit 4 in the flags is set. I took a closer look at this and > Vera sets more flags than DejaVu (bits 0,1 set in DejaVu, 0-4 set in > Vera, check the spec > http://www.microsoft.com/OpenType/OTSpec/head.htm). > > I tried to set these flags and it seems it somewhat improved DejaVu's > looks. I've also made a few screenshots for demonstration (freetype > 2.1.5, antialias, no autohinter, all at size 9): > > DejaVu Serif, flags=3D0x03 > http://web.naex.sk/pce/ttf-dejavu/flags/deja-serif-9.png > > DejaVu Serif, flags=3D0x1F > http://web.naex.sk/pce/ttf-dejavu/flags/deja-serif-wf-9.png > > Vera Serif > http://web.naex.sk/pce/ttf-dejavu/flags/vera-serif-9.png > > DejaVu Sans, flags=3D0x03 > http://web.naex.sk/pce/ttf-dejavu/flags/deja-sans-9.png > > DejaVu Sans, flags=3D0x1F > http://web.naex.sk/pce/ttf-dejavu/flags/deja-sans-wf-9.png > > Vera Sans > http://web.naex.sk/pce/ttf-dejavu/flags/vera-sans-9.png > > Please check them out a say what you think. Interesting, good work. That looks very good. Does it change appereance=20 also for larger sizes? I investigated the possibilities to set these flags in FontForge and found= =20 out that it sets bits 0 and 1 always and bit 5 if there are some minimum=20 distance hints. Because FF does not interpret existing TT instructions it= =20 does not know that there are such hints (I guess) and does not set it. It= =20 also sets bit 9 if font is right-to-left. Other bits can't be set. I think we should set all these flags because we use TT instructions from= =20 Vera and they might need it (however I guess that bit 3 is just hint for=20 scaler that speed is better than accuracy). The question is: how to set it (automatically)? Maybe we could ask for=20 FF's feature to have head flags set in SFD (because release is coming I=20 can patch my FontForge temporarily for now). Have a nice day. Stepan Roh |