[Libreoffice-commits] core.git: vcl/source
Douglas Mencken
dougmencken at gmail.com
Mon Mar 14 10:22:45 UTC 2016
vcl/source/font/PhysicalFontFamily.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 2a1b70c4b2d5debf235c088a1e3c71a3457c1af7
Author: Douglas Mencken <dougmencken at gmail.com>
Date: Mon Feb 29 13:26:24 2016 -0500
GetEnglishSearchFontName is what is supposed to use here
Change-Id: I210359c28b5e66b64627cb49cdf388ee35015a92
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index 762983b..43ec3de 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -263,7 +263,6 @@ void PhysicalFontFamily::GetFontHeights( std::set<int>& rHeights ) const
void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& rFontCollection,
bool bScalable, bool bEmbeddable ) const
{
- // This is rather expensive to do per face.
OUString aFamilyName = GetEnglishSearchFontName( GetFamilyName() );
PhysicalFontFamily* pFamily = rFontCollection.FindOrCreateFontFamily( aFamilyName );
@@ -278,8 +277,11 @@ void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& rFontColle
PhysicalFontFace* pClonedFace = pFoundFontFace->Clone();
- assert( pClonedFace->GetFamilyName().replaceAll("-", "").trim() == GetFamilyName().replaceAll("-", "").trim() );
- assert( rFontCollection.FindOrCreateFontFamily( GetEnglishSearchFontName( pClonedFace->GetFamilyName() ) ) == pFamily );
+#if OSL_DEBUG_LEVEL > 0
+ OUString aClonedFamilyName = GetEnglishSearchFontName( pClonedFace->GetFamilyName() );
+ assert( aClonedFamilyName == aFamilyName );
+ assert( rFontCollection.FindOrCreateFontFamily( aClonedFamilyName ) == pFamily );
+#endif
if (! pFamily->AddFontFace( pClonedFace ) )
delete pClonedFace;
More information about the Libreoffice-commits
mailing list