So sorry. I use company email system so I'm not sure I can send mail as
   plain text...

   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.

   In our text winset, there is a code to prevent text overflow.

   Text overflow means that the bitmap from freetype is bigger than winset

   This can be happend when developer sets bigger font size than winset

   == Sample App code

   TextLabel label  = TextLabel::New("It is text winset");

   label.SetSize( 200, 30 );  // Height is 30px

   label.SetProperty( TextLabel::Property::PIXEL_SIZE, 36 ); // Font size
   is 36px. It is bigger than winset size so text can be overflowed.


   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.

   == Code in our framework ====================================

   FT_Size_Metrics& ftMetrics = ftFace->size->metrics;

   const bool ellipsis = ( ( ftMetrics.ascender- ftMetrics.descender >
   winset.height );


   I wonder ascender-descender is proper value for this work.

   I hope my explains help you understand my current situation.

   Best Regards,


   --------- Original Message ---------

   Sender : Werner LEMBERG <w...@gnu.org>

   Date : 2018-04-09 17:52 (GMT+9)

   Title : Re: [ft] Freetype2 returns different descender value after
   upgrading 2.6.x to 2.8.x

[Please write your e-mail as plain text, not HTML.]

> We use sum of ascender and descender to determine glyph size is over
> winset size or not.  If it is over winset size, we make inner text
> to "...".

I don't understand this.  Please provide an example together with
(small!) images that shows what you mean.

> My question is, to determine overflow, which value is most proper
> value?  There are many kinds of value which represent "height" in
> freetype2.  For example, ascender and descender, yMin and yMax,
> height.
> I read documents over and over but it is so hard to say which value
> is proper for this.  Could you share your opinion?

It really depends on what you want to do...



Freetype mailing list

Reply via email to