freetype
[Top][All Lists]
Advanced

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

Re: [ft] Getting same metrics in FreeType for code points with same glyp


From: Werner LEMBERG
Subject: Re: [ft] Getting same metrics in FreeType for code points with same glyph but different position
Date: Wed, 24 May 2017 08:02:42 +0200 (CEST)

> While using FreeType to render text in my software, I noticed that
> the ellipsis character is aligned with the midline of my text rather
> than the baseline.
> 
> The ellipsis is identical in appearance to another glyph in the same
> font.  The two code points are these:
> 
>    - U+2026: "…" Unicode 'HORIZONTAL ELLIPSIS'
>    - U+22EF: "⋯" Unicode 'MIDLINE HORIZONTAL ELLIPSIS'
> 
> It is unsurprising that these two code points share the same glyph,
> but their metrics ought to be different since they have different
> vertical positioning.

Yes.

> I am not surprised that height is the same for both codepoints since
> the resulting bitmaps are identical, but I would expect top to be
> different.

You mean `face->glyph->bitmap_top'?

> When I use these same code points in another program, they each
> display at their correct vertical positions, so I know the problem
> is with my code and not with the font.  Am I supposed to obtain my
> metrics from something other than the sbit?

Stuff from the `FT_GlyphSlot' structure should be sufficient...

I suggest that you check the source code of the FreeType demo
programs.


    Werner

reply via email to

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