> 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:

  http://doc.qt.io/qt-5/qtwidgets-index.html

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.


    Werner
_______________________________________________
Freetype mailing list
Freetype@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to