[Libreoffice-commits] core.git: vcl/source
Khaled Hosny
khaledhosny at eglug.org
Mon Jan 2 00:18:13 UTC 2017
vcl/source/font/PhysicalFontCollection.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 7633cbb0e84d20a36b2972c6fd5c0d5a5d6280a3
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Sun Jan 1 18:10:09 2017 +0200
Use FindMetricCompatibleFont() here as well
Change-Id: I4b4c360a58f5e0176688294dc3d18aacfd000277
Reviewed-on: https://gerrit.libreoffice.org/32581
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index f0249c0..f90abfa 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 )
More information about the Libreoffice-commits
mailing list