You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When TextRenderer.prepareRenderParams() sees a fontStyle of italic or oblique the FontRegistry only looks for a TrueTypeFontFile where isItalic() is True, i.e. whre the subfamily is 'Italic'.
So cursive fonts like DejaVuSans-Oblique.ttf or DejaVuSans-BoldOblique.ttf are not detected and the text is rendered 'normal'.
The spec says, that 'italic' should fall back to an 'oblique' font and 'oblique' should fall back to an 'italic' one.
Not talking about creating an artficially cursive simulation,
I think a TrueTypeFontFile->isOblique() function should be introduced and FontRegistry.findMatchingFont() should look for the fallback. Of course, its bool $italic parameter has to be adapted accordingly.
The text was updated successfully, but these errors were encountered:
When
TextRenderer.prepareRenderParams()
sees afontStyle
ofitalic
oroblique
the FontRegistry only looks for a TrueTypeFontFile whereisItalic()
is True, i.e. whre the subfamily is 'Italic'.So cursive fonts like DejaVuSans-Oblique.ttf or DejaVuSans-BoldOblique.ttf are not detected and the text is rendered 'normal'.
The spec says, that 'italic' should fall back to an 'oblique' font and 'oblique' should fall back to an 'italic' one.
Not talking about creating an artficially cursive simulation,
I think a
TrueTypeFontFile->isOblique()
function should be introduced andFontRegistry.findMatchingFont()
should look for the fallback. Of course, itsbool $italic
parameter has to be adapted accordingly.The text was updated successfully, but these errors were encountered: