Sorry Steve, I didn't mean to pick on FreeMono. I agree that it's not
even clear if there's *any* bug here, but there's certainly something
surprising.

I also agree that the rendered width is a poor metric, for the reasons
you describe.  That's why my investigations have focused on glyph
metrics, specifically the advance width in pixels as reported by
FreeType after the face has been loaded and a scaling size selected.

I believe that even if we could find a way to get consistent advance
widths out of FreeType, Sam would still need to change his program,
because measuring the width of the rendered text does not seem like it
could possibly work in all circumstances. For example, a glyph may have
negative xMin or it may have xMax greater than the advance width, as in
italic faces. Either the rendered text must have a total width greater
than the sum of the advance widths of the characters involved, or it
must have chopped off parts of the characters. Still, I am less
concerned with whether Sam's program is correctly written than with
whether it is possible to write his program correctly, and it seems to
me that FreeType reporting differing advance widths is an issue that
prevents this.

I will try my Python script and the C test on a wider range of fonts
tonight. I apologise that I had not understood until now that the
Courier example showed up the same issue.

Sorry, my comment "inconsistent hinting in monospaced font" was not
deeply considered, and is clearly misleading. I do not claim to know
anything about the hinting specified in the font file, I can only say
that for some reason FreeType appears to decide that it should apply
auto-hinting, and that the observed result of this auto-hinting process
on this particular monospaced font is that different glyphs end up with
different advance widths, and that for other font files, including older
versions of the same font, for some reason FreeType appears *not* to
apply auto-hinting.

I have asked about this on the FreeType mailing list:
http://lists.nongnu.org/archive/html/freetype/2012-05/msg00029.html

Thanks for all your help so far Steve.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1001033

Title:
  Monospaced font is not monospaced

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ttf-freefont/+bug/1001033/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to