Blob Blame History Raw
From 1ded21bfb99951ca947bd11a7442398668202ca6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 4 Dec 2013 15:04:04 +0000
Subject: [PATCH] Resolves: rhbz#912529 Kerkis SmallCaps shown instead of
 Kerkis Regular

we encounter both fonts, but all their properties that we compare
are the same, so we think they are two versions of the same font
and throw away the "Regular" version.

Change-Id: I24369f10c7a0edba1faa02621bb78616e880966e
---
 vcl/source/gdi/outdev3.cxx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index c27cd93..f3f5a77 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -718,8 +718,14 @@
     else if( GetSlant() > rOther.GetSlant() )
         return COMPARE_GREATER;
 
-    sal_Int32 eCompare = GetFamilyName().compareTo( rOther.GetFamilyName() );
-    return eCompare;
+    sal_Int32 nRet = GetFamilyName().compareTo( rOther.GetFamilyName() );
+
+    if (nRet == 0)
+    {
+        nRet = GetStyleName().compareTo( rOther.GetStyleName() );
+    }
+
+    return nRet;
 }
 
 sal_Int32 PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const