//---------------------------------------------------------------------------- // EgalTech 2014-2014 //---------------------------------------------------------------------------- // File : FontManager.h Data : 28.05.14 Versione : 1.5f1 // Contenuto : Dichiarazione della classe FontManager. // // // // Modifiche : 28.05.14 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "FontNfe.h" #include "FontOs.h" #include "/EgtDev/Include/EGkBBox3d.h" #include "/EgtDev/Include/EGkPolyLine.h" #include //---------------------------------------------------------------------------- class FontManager { public : static FontManager& GetFontManager( void) { static FontManager fntMgr ; return fntMgr ; } 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 { return m_sNfeFontDir ; } const std::string& GetDefaultFont( void) const { return m_sDefaultFont ; } bool GetCapHeight( double& dCapH) const ; bool GetAscent( double& dAsc) const ; bool GetDescent( double& dDesc) const ; bool GetCapBox( const std::string& sText, int nInsPos, BBox3d& b3Box) const ; bool GetBBox( const std::string& sText, int nInsPos, BBox3d& b3Box) const ; bool GetOutline( const std::string& sText, int nInsPos, ICURVEPLIST& lstPC) const ; bool GetRegion( const std::string& sText, int nInsPos, ISURFFRPLIST& lstSFR) const ; bool ApproxWithLines( const std::string& sText, int nInsPos, double dLinTol, double dAngTolDeg, POLYLINELIST& lstPL) const ; bool ApproxWithArcs( const std::string& sText, int nInsPos, double dLinTol, double dAngTolDeg, POLYARCLIST& lstPA) const ; bool GetTextLines( const std::string& sText, int nInsPos, PNTVECTOR& vPt, STRVECTOR& vLine) const ; private : std::string m_sNfeFontDir ; std::string m_sDefaultFont ; bool m_bCurrNfeFont ; NfeFont m_NfeFont ; OsFont m_OsFont ; private : FontManager( void) : m_bCurrNfeFont( false) {} FontManager( FontManager const& copy) = delete ; FontManager& operator=( FontManager const& copy) = delete ; } ;