fdo#79761 - avoid re-canonicalising each font name on clone repeatedly.

Change-Id: I5b32787943ab3f824249359e9924eae25ba5783b
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index 3cba470..6307ac0 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -281,6 +281,10 @@ 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.FindOrCreateFamily( aFamilyName );

    for( PhysicalFontFace* pFace = mpFirst; pFace; pFace = pFace->GetNextFace() )
    {
        if( bScalable && !pFace->IsScalable() )
@@ -289,7 +293,12 @@ void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& rFontColle
            continue;

        PhysicalFontFace* pClonedFace = pFace->Clone();
        rFontCollection.Add( pClonedFace );

        assert( pClonedFace->GetFamilyName() == GetFamilyName() );
        assert( rFontCollection.FindOrCreateFamily( GetEnglishSearchFontName( pClonedFace->GetFamilyName() ) ) == pFamily );

        if (! pFamily->AddFontFace( pClonedFace ) )
            delete pClonedFace;
    }
}