diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-04 10:57:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-04 13:45:10 +0200 |
commit | df4a6f977843dbf4eb8bb5998b090d92c454611b (patch) | |
tree | 62331cf1d820907c6d8baa4d870c469acb9bb449 /vcl/unx/generic/glyphs | |
parent | 4b3a648a2fd7d733674f95bb7f20670c57e99252 (diff) |
tdf#127189 FreeType <= 2.8 will fail to render stretched horizontal brace...
glyphs in starmath at a fairly low stretch ratio. The failure will set
CAIRO_STATUS_FREETYPE_ERROR on the surface which cannot be cleared, so all
further painting to the surface fails.
This appears fixed in 2.9 with
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=91015cb41d8f56777f93394f5a60914bc0c0f330
"Improve complex rendering at high ppem"
Change-Id: I8cbf8347ccd29beda4057b14f2e68678f6030bf4
Reviewed-on: https://gerrit.libreoffice.org/78587
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/generic/glyphs')
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 1b3532ceee1b..525da6e52b43 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -324,6 +324,26 @@ void GlyphCache::InitFreetype() (void)vclFontFileList::get(); } +namespace +{ + bool DoesAlmostHorizontalDrainRenderingPool() + { + FT_Int nMajor, nMinor, nPatch; + FT_Library_Version(aLibFT, &nMajor, &nMinor, &nPatch); + if (nMajor > 2) + return false; + if (nMajor == 2 && nMinor <= 8) + return true; + return false; + } +} + +bool FreetypeFont::AlmostHorizontalDrainsRenderingPool() +{ + static bool bAlmostHorizontalDrainsRenderingPool = DoesAlmostHorizontalDrainRenderingPool(); + return bAlmostHorizontalDrainsRenderingPool; +} + FT_Face FreetypeFont::GetFtFace() const { FT_Activate_Size( maSizeFT ); |