Under Review
over 1 year ago

FR645 and others since fw 7.20: major issues with custom fonts

Parents
  • What is the implication of rising the base value? 

    E. g. I think it will clear everything below up to the base level even for characters that are smaller, right? 

    Any other implications of changing the base to contain the height of the 0 as a hotfix for this bug? 

    Thanks

Comment
  • What is the implication of rising the base value? 

    E. g. I think it will clear everything below up to the base level even for characters that are smaller, right? 

    Any other implications of changing the base to contain the height of the 0 as a hotfix for this bug? 

    Thanks

Children
  • Yes, there will be implications. It will break code that relies on correct reporting of the font ascent and descent, using Toybox.Graphics getFontAscent() and getFontDescent(). Back to my earlier example, the font height == 17, ascent == 13, descent == 4. After setting the base to 17, ascent == 17, descent == 0.

  • I've been told the difference between the base height and the character height is supposed to be the area for accents to be drawn. Based on what I'm seeing with some generated fonts, I'm not sure that is actually correct.

    If you're using a custom font just for an easy way to do bitmap coloring for status icons, there should be no issue making base equal to the height of 0. If you are actually drawing text with it, there may be implications.

    That said, I have reproduced the issue using a font that is not hand edited using DejaVuSansCondenced.ttf as suggested above.