summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2017-01-01 18:10:09 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2017-01-02 00:17:52 +0000
commit7633cbb0e84d20a36b2972c6fd5c0d5a5d6280a3 (patch)
tree6b2c854286b1c18106d55c70841cf444d68a7be4
parente5da108ef01872f460c176b6a9173e346e1d59a4 (diff)
Use FindMetricCompatibleFont() here as well
Change-Id: I4b4c360a58f5e0176688294dc3d18aacfd000277 Reviewed-on: https://gerrit.libreoffice.org/32581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index f0249c081500..f90abfa7473c 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -1116,9 +1116,11 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r
}
else
nTokenPos = -1;
- if( mpPreMatchHook )
- if( mpPreMatchHook->FindFontSubstitute( rFSD ) )
- aSearchName = GetEnglishSearchFontName( aSearchName );
+ if (FindMetricCompatibleFont(rFSD) ||
+ (mpPreMatchHook && mpPreMatchHook->FindFontSubstitute(rFSD)))
+ {
+ aSearchName = GetEnglishSearchFontName( aSearchName );
+ }
ImplFontSubstitute( aSearchName );
PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName( aSearchName );
if( pFoundData )