Hello, I'm trying to fit SdfText into an existing text layout framework and I'm running into trouble getting the appropriate sizes of text. Namely, I need the ascent and descent info for the font at a desired font size. However, despite creating the SdfText object from a SdfText::Font object created at a larger size, the ascent and descent data are still the same.
I have also tried looking at both SdfText::getAscent() and SdfText::Font::getAscent() but these also return the same values regardless of how large or small the font is created.
I saw SdfText::measureString() returns the proper size so I checked out the measureStringImpl() method and found these lines curious:
Can you shed some light on all the different scaling going on under the hood? Are the different getAscent()/getDescent() methods supposed to return the same value?
Thanks in advance! Very excited to pull this great block into our framework!
Hello, I'm trying to fit SdfText into an existing text layout framework and I'm running into trouble getting the appropriate sizes of text. Namely, I need the ascent and descent info for the font at a desired font size. However, despite creating the
SdfText
object from aSdfText::Font
object created at a larger size, the ascent and descent data are still the same.I have also tried looking at both
SdfText::getAscent()
andSdfText::Font::getAscent()
but these also return the same values regardless of how large or small the font is created.I saw
SdfText::measureString()
returns the proper size so I checked out themeasureStringImpl()
method and found these lines curious:Can you shed some light on all the different scaling going on under the hood? Are the different getAscent()/getDescent() methods supposed to return the same value?
Thanks in advance! Very excited to pull this great block into our framework!