[Freefont-devel] Re: About the bug in freefonts

Josh Triplett josh.trip@verizon.net
Sun, 21 Nov 2004 18:06:23 -0800


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigDC576E78D216A740B9DD6C54
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Panayotis Katsaloulis wrote:
> On Fri, 19 Nov 2004 21:20:30 -0800, Josh Triplett <josh.trip@verizon.net> wrote:
>>  In my opinion, the current fontforge behavior on
>>that issue is a bug, and my "resolution" was a horrible hack. :)
> 
> Well, probably it was a "horrible hack", but it worked. The problem is
> that (as is) it doesn't work any more. The thing is that I haven't
> understood what is the source of this problem, because of lack of
> knowledge. Can you please (even briefly) explain what is the problem
> and how can it be corrected? Or how you had the idea of (temporarly)
> solve this issue? Even if this is a "dirty hack", it's better than
> nothing.

As far as I can tell, either fontforge is miscalculating the dimensions
of the glyphs, or there are some glyphs with bad dimensions.  One way to
observe this is to remove almost all of the glyphs from one of the
fonts, and then generate it; it will have more reasonable dimensions.
However, fontforge should not just ignore the specified Ascent and
Descent values in the font.  While investigating the sfd format, I found
the HheadAscent and HheadDescent values; experimenting with these showed
that they were directly added to the Ascent and Descent.  I then just
checked the Ascent and Descent generated by FontForge, and set the
HheadAscent and HheadDescent values such that they corrected the
difference between what fontforge supplied and the desired values.  One
of the reasons this is a hack is that the values need to be updated
every time something is changed that affects the Ascent and Descent
fontforge calculates; the way to update the hack is to remove the Hhead*
values, generate the fonts, and re-add the appropriate Hhead* values to
cancel out the differences between those and the desired Ascent and
Descent values.

>>Another note on freefonts, by the way: I found that the freemono font is
>>not being marked as monospaced.  I managed to trace that issue to the
>>commit that made combining characters zero-width-but-not-really;
>>reverting that makes fontforge mark it as monospaced again.  That
>>actually seems like the correct behavior.  However, I have also found
>>that I cannot select FreeMono as my terminal font in Konsole, even with
>>this change.  Fortunately, it is currently selected, so it still works
>>here, but that really needs to be fixed.
> 
> Well, I know this issue but since I can not investigate it because of
> the "known bug", I can go on and try to fix this issue (if I can).

Thank you!

- Josh Triplett

--------------enigDC576E78D216A740B9DD6C54
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFBoUmxGJuZRtD+evsRAkgwAJ9Bs7qNCtTzmwpB68ZRIHPgymQ6DQCeN6rE
Vi5pzpuOP53J3pdsgfHRzWg=
=yS/F
-----END PGP SIGNATURE-----

--------------enigDC576E78D216A740B9DD6C54--