openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yda...@apache.org
Subject svn commit: r1826117 - in /openoffice/trunk/main/canvas/source/cairo: cairo_os2_cairo.cxx cairo_textlayout.cxx
Date Wed, 07 Mar 2018 14:46:14 GMT
Author: ydario
Date: Wed Mar  7 14:46:14 2018
New Revision: 1826117

URL: http://svn.apache.org/viewvc?rev=1826117&view=rev
Log:
#i127723# Fix StarSymbol to OpenSymbol mapping when using cairo on OS/2.

Modified:
    openoffice/trunk/main/canvas/source/cairo/cairo_os2_cairo.cxx
    openoffice/trunk/main/canvas/source/cairo/cairo_textlayout.cxx

Modified: openoffice/trunk/main/canvas/source/cairo/cairo_os2_cairo.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/canvas/source/cairo/cairo_os2_cairo.cxx?rev=1826117&r1=1826116&r2=1826117&view=diff
==============================================================================
--- openoffice/trunk/main/canvas/source/cairo/cairo_os2_cairo.cxx (original)
+++ openoffice/trunk/main/canvas/source/cairo/cairo_os2_cairo.cxx Wed Mar  7 14:46:14 2018
@@ -327,7 +327,11 @@ namespace cairo
         fontAttrs.usCodePage = 850;
         fontAttrs.fsType = FATTR_TYPE_MBCS;
         fontAttrs.fsFontUse = FATTR_FONTUSE_NOMIX;
-        strcpy( fontAttrs.szFacename, font);
+        // map StarSymbol to OpenSymbol
+        if (strcmp( font, "StarSymbol") == 0)
+            strcpy( fontAttrs.szFacename, "OpenSymbol");
+        else
+            strcpy( fontAttrs.szFacename, font);
         rc = Ft2CreateLogFont( hps, NULL, 1L, &fontAttrs);
         rc = Ft2SetCharSet( hps, 1L);
 

Modified: openoffice/trunk/main/canvas/source/cairo/cairo_textlayout.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/canvas/source/cairo/cairo_textlayout.cxx?rev=1826117&r1=1826116&r2=1826117&view=diff
==============================================================================
--- openoffice/trunk/main/canvas/source/cairo/cairo_textlayout.cxx (original)
+++ openoffice/trunk/main/canvas/source/cairo/cairo_textlayout.cxx Wed Mar  7 14:46:14 2018
@@ -546,8 +546,13 @@ namespace cairocanvas
                                             CAIRO_FONT_SLANT_NORMAL : CAIRO_FONT_SLANT_ITALIC);
             cairo_font_weight_t weight = (rOutDev.GetFont().GetWeight() == WEIGHT_NORMAL
?
                                               CAIRO_FONT_WEIGHT_NORMAL : CAIRO_FONT_WEIGHT_BOLD);
-            cairo_select_font_face( pSCairo.get(), aFontName,
-                                    slant, weight);
+            // map StarSymbol to OpenSymbol
+            if (aFontName.equals("StarSymbol"))
+                cairo_select_font_face( pSCairo.get(), "OpenSymbol",
+                                        slant, weight);
+            else
+                cairo_select_font_face( pSCairo.get(), aFontName,
+                                        slant, weight);
     #endif
 
             if (font_face)



Mime
View raw message