[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Freetype2 returns different descender value after upgrading 2.6
Re: [ft] Freetype2 returns different descender value after upgrading 2.6.x to 2.8.x
Mon, 09 Apr 2018 21:55:43 +0200 (CEST)
> First, winset is kind of UI element like button. In this case, to
> display text, we use text winset. Developer can set what text will
> be shown and its height, width, font size, etc.
Do you probably mean `widget'? For example this one:
I've never heard the term `winset' – please give a link.
> In our text winset, there is a code to prevent text overflow. Text
> overflow means that the bitmap from freetype is bigger than winset
> size. This can be happend when developer sets bigger font size than
> winset size. [...] In this case, we change text to
> "...". (Generally, we said this Ellipsis)
> To check bitmap from freetype is bigger than winset size, we compare
> sum of ascender and descender with winset height.
I think for this purpose it's better to use the *real* bitmap size,
not the typographic one. In other words, you should collect the
bboxes for all glyphs in your text string, take the extremum values
for `bbox.yMin' and `bbox.yMax' and add them.