GetEnglishSearchFontName is what is supposed to use here

Change-Id: I210359c28b5e66b64627cb49cdf388ee35015a92
This commit is contained in:
Douglas Mencken
2016-02-29 13:26:24 -05:00
committed by Michael Meeks
parent 1f780088e8
commit 2a1b70c4b2

View File

@@ -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;