Added support for Signed Distance Field rendering with TTF_SetFontSDF() and TTF_GetFontSDF()
Added optional DPI-scaling of fonts, with the following new functions:
TTF_OpenFontDPI()
TTF_OpenFontIndexDPI()
TTF_OpenFontDPIRW()
TTF_OpenFontIndexDPIRW()
TTF_SetFontSizeDPI()
Added 32-bit character support with:
TTF_GlyphIsProvided32()
TTF_GlyphMetrics32()
TTF_RenderGlyph32_Solid()
TTF_RenderGlyph32_Shaded()
TTF_RenderGlyph32_Blended()
TTF_GetFontKerningSizeGlyphs32()
Added functions to set direction and script when using Harfbuzz:
TTF_SetDirection()
TTF_SetScript()
Added extended API for text measurement:
TTF_MeasureText()
TTF_MeasureUTF8()
TTF_MeasureUNICODE()
Added TTF_SetFontSize() to set font size dynamically
Added āShadedā and āSolidā text wrapped functions:
TTF_RenderText_Solid_Wrapped()
TTF_RenderUTF8_Solid_Wrapped()
TTF_RenderUNICODE_Solid_Wrapped()
TTF_RenderText_Shaded_Wrapped()
TTF_RenderUTF8_Shaded_Wrapped()
TTF_RenderUNICODE_Shaded_Wrapped()
Added TTF_HINTING_LIGHT_SUBPIXEL for better results at small text sizes at a performance cost
Wow, this looks like a really nice feature packed release!
Iāve been playing around with the wrapped text functions, and Iām concerned about how they handle small wrap values.
At wrap length 0, the text renders as a single line, and newline characters are still rendered as unknown characters. I expected this to behave like the normal text rendering functions but newline aware.
With a positive but very small wrap length, the text doesnāt fully show up. Or parts of letters might show up. I expected this to allocate at least enough space to put at least one character of the input string on each line.
@rtrussel
Maybe create a separate issue.
Just try with latest and
It seems like size == 16 to me ?
I got the same difference when switching from Hinting mono vs none.
(āmonoā would look like the 2.0.15, whereas 2.0.18 looks ānoneā).
I think itās probably a FreeType issue rather than SDL2_ttf. My 2.0.15 is using FreeType 2.4.12 (itās a separate DLL) whereas 2.0.18 seems to have FreeType statically linked. I donāt know how to discover the version, because seemingly āFT_Library_Version()ā isnāt exported.
I got the same difference when switching from Hinting mono vs none
Oh. They are the ones I have always used, Iām not aware of anything newer (it could be of course that until recently there were no changes to the public API that needed the docs to be updated).