EgtGeomKernel 2.7i2 :

- aggiunta funzione globale SetDefaultFont.
This commit is contained in:
Dario Sassi
2025-09-11 15:21:51 +02:00
parent b6f820258a
commit afc316cd1d
3 changed files with 13 additions and 2 deletions
+10 -1
View File
@@ -159,11 +159,20 @@ InitFontManager( const string& sNfeFontDir, const string& sDefaultFont)
{
// recupero il font manager
FontManager& fntMgr = FontManager::GetFontManager() ;
// lo inizializzo
fntMgr.Init( sNfeFontDir, sDefaultFont) ;
}
//-----------------------------------------------------------------------------
void
SetDefaultFont( const string& sDefaultFont)
{
// recupero il font manager
FontManager& fntMgr = FontManager::GetFontManager() ;
// imposto il dato
fntMgr.SetDefaultFont( sDefaultFont) ;
}
//-----------------------------------------------------------------------------
const string&
GetNfeFontDir( void)
BIN
View File
Binary file not shown.
+3 -1
View File
@@ -29,6 +29,8 @@ class FontManager
public :
bool Init( const std::string& sNfeFontDir, const std::string& sDefaultFont) ;
bool SetDefaultFont( const std::string& sDefaultFont)
{ m_sDefaultFont = sDefaultFont ; return true ; }
bool SetCurrFont( const std::string& sFont, int nWeight, bool bItalic,
double dHeight, double dRatio, double dAddAdvance) ;
const std::string& GetNfeFontDir( void) const
@@ -54,7 +56,7 @@ class FontManager
OsFont m_OsFont ;
private :
FontManager( void) {}
FontManager( void) : m_bCurrNfeFont( false) {}
FontManager( FontManager const& copy) = delete ;
FontManager& operator=( FontManager const& copy) = delete ;
} ;