vcl/inc/unx/freetype_glyphcache.hxx            |    2 +-
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |   11 ++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit e3245247421fc30c37a8b7321e2815e2507b5a1f
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Nov 20 20:12:41 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Nov 21 09:58:50 2022 +0100

    clarify IsSymbolFont means Microsoft Symbol encoding
    
    https: 
//freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_encoding_ms_symbol
    https: 
//learn.microsoft.com/en-us/typography/opentype/spec/recom#non-standard-symbol-fonts
    Change-Id: I77732fff67a145bd8fa347c3d0c8e4deb2083143
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143008
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/inc/unx/freetype_glyphcache.hxx 
b/vcl/inc/unx/freetype_glyphcache.hxx
index 5bc1632ccee6..fd54def14bb5 100644
--- a/vcl/inc/unx/freetype_glyphcache.hxx
+++ b/vcl/inc/unx/freetype_glyphcache.hxx
@@ -67,7 +67,7 @@ public:
     int                   GetFontFaceIndex() const  { return mnFaceNum; }
     int                   GetFontFaceVariation() const  { return 
mnFaceVariation; }
     sal_IntPtr            GetFontId() const         { return mnFontId; }
-    bool                  IsSymbolFont() const      { return 
maDevFontAttributes.IsSymbolFont(); }
+    bool                  IsMicrosoftSymbolEncoded() const { return 
maDevFontAttributes.IsSymbolFont(); }
     const FontAttributes& GetFontAttributes() const { return 
maDevFontAttributes; }
 
     void                  AnnounceFont( vcl::font::PhysicalFontCollection* );
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx 
b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index db2bd614336e..aca47bad7518 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -452,13 +452,10 @@ FreetypeFont::FreetypeFont(FreetypeFontInstance& 
rFontInstance, std::shared_ptr<
      * not need any glyph data from FreeType in this case */
     /*FT_Error rc = */ FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight );
 
-    FT_Select_Charmap(maFaceFT, FT_ENCODING_UNICODE);
-
-    if( mxFontInfo->IsSymbolFont() )
-    {
-        FT_Encoding eEncoding = FT_ENCODING_MS_SYMBOL;
-        FT_Select_Charmap(maFaceFT, eEncoding);
-    }
+    if (mxFontInfo->IsMicrosoftSymbolEncoded())
+        FT_Select_Charmap(maFaceFT, FT_ENCODING_MS_SYMBOL);
+    else
+        FT_Select_Charmap(maFaceFT, FT_ENCODING_UNICODE);
 
     mbFaceOk = true;
 

Reply via email to