starmath/inc/symbol.hxx    |    2 +-
 starmath/source/symbol.cxx |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit f28b043b4eb40e90b330721fc43d19ae6c06951e
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Mon Sep 18 19:00:02 2023 +0300
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Mon Sep 18 19:09:34 2023 +0200

    starmath: Fix editing symbols in the Symbols Catalogue
    
    Fallout from:
    
    commit 32d2e001bb056e7d98aa143b222f2721967337dc
    Author: Khaled Hosny <kha...@libreoffice.org>
    Date:   Tue Sep 12 18:35:46 2023 +0300
    
        tdf#101174: Don’t hard-code OpenSymbol font for predefined special 
symbols
    
    Change-Id: I1f440dccc920b24010160dbeee58795ffd8f85ac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157025
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@libreoffice.org>

diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 39ce0be6e38c..a3d08b37d522 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -51,7 +51,7 @@ public:
 
     SmSym&      operator = (const SmSym& rSymbol);
 
-    const vcl::Font&  GetFace() const { return m_aFace; }
+    const vcl::Font&  GetFace() const;
     sal_UCS4        GetCharacter() const { return m_cChar; }
     const OUString&   GetName() const { return m_aName; }
 
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 3baf79702faf..7bff8d995d5c 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -21,6 +21,7 @@
 #include <utility.hxx>
 #include <cfgitem.hxx>
 #include <smmod.hxx>
+#include <format.hxx>
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
 
@@ -80,6 +81,13 @@ bool SmSym::IsEqualInUI( const SmSym& rSymbol ) const
             m_cChar == rSymbol.m_cChar;
 }
 
+const vcl::Font& SmSym::GetFace() const
+{
+    if (m_aFace.GetFamilyName().isEmpty())
+        return SM_MOD()->GetConfig()->GetStandardFormat().GetFont(FNT_MATH);
+    return m_aFace;
+}
+
 /**************************************************************************/
 
 

Reply via email to