diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-02-18 13:28:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-18 13:33:27 +0000 |
commit | fcd4ea7f43ce180de067927b4b7aae407c022f65 (patch) | |
tree | e465446b33bf76f6756a29403bce46ba466f9746 /vcl/source | |
parent | 2c4b5dd968c1b2cf26b1f40502764240ad4d22d8 (diff) |
Resolves: fdo#33898 Try and use EUDC as first-level glyph fallback font
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index e92ac016d916..72155e588a05 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2723,8 +2723,20 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( ImplDevFontList* pFontList, // e.g. PsPrint Arial->Helvetica for udiaeresis when Helvetica doesn't support it if( nFallbackLevel >= 1) { - ImplDevFontListData* pFallbackData = pFontList->GetGlyphFallbackFont( - rFontSelData, rMissingCodes, nFallbackLevel-1 ); + ImplDevFontListData* pFallbackData = NULL; + + //fdo#33898 If someone has EUDC installed then they really want that to + //be used as the first-choice glyph fallback seeing as it's filled with + //private area codes with don't make any sense in any other font so + //prioritise it here if it's available. Ideally we would remove from + //rMissingCodes all the glyphs which it is able to resolve as an + //optimization, but that's tricky to achieve cross-platform without + //sufficient heavy-weight code that's likely to undo the value of the + //optimization + if (nFallbackLevel == 1) + pFallbackData = pFontList->FindFontFamily(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EUDC"))); + if (!pFallbackData) + pFallbackData = pFontList->GetGlyphFallbackFont(rFontSelData, rMissingCodes, nFallbackLevel-1); // escape when there are no font candidates if( !pFallbackData ) return NULL; |