freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Incorrect y position glyph render


From: Edward Lam
Subject: Re: [ft] Incorrect y position glyph render
Date: Fri, 21 Oct 2016 10:45:06 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Hi Werner,

Thanks for the reply! I was using left to right. I'm new to fonts so your response lead me resolving my issue. It was "wrong" because I was erroneously comparing between different versions of the font, where the '*' glyph had changed vertical positioning.

This was after trying out harfbuzz to no avail, then dumping out to ttx, trying to make sense of the GPOS/GSUB tables, learning about the Adobe Glyph List so that I then realized to search for "asterisk", and then finally stumbling into the logged github issue where it was decided to change the vertical positioning of the glyph. :(

-Edward

On 21/10/2016 2:05 AM, Werner LEMBERG wrote:
What do you mean with `vertically'?  Is your typesetting direction
from top do bottom?  Or left to right?

The sample text I'm rendering is '1+4*8' and the '*' character in
ftstring isn't being rendered higher than the '+' like it should
(eg. on Windows using WordPad).  This results in it being hard to
tell the difference between the plus and multiply operators.

For left-to-right typesetting, FreeType simply takes the metrics
directly from the font.  However, it doesn't apply higher-level
OpenType tables like `GSUB' and `GPOS'.  Right now I'm too lazy to
check, but it is possible that the font in question either contains
GSUB data to replace the glyphs with special variants or GPOS data to
move glyphs vertically if `+' or `*' is positioned between digits.

Either have a look into the font (ttx, your preferred font editor,
...) or try the demo programs of HarfBuzz to check whether you get
better results.

[BTW, you should also check whether WordPad really uses the glyphs of
 the font for mathematical stuff.]

For top-to-bottom typesetting, there are known problems with the CFF
format since FreeType doesn't currently support the `VORG' table.


    Werner





reply via email to

[Prev in Thread] Current Thread [Next in Thread]