28 #define STDFONT_CENTERED 0x0001
29 #define STDFONT_TWOSIDED 0x0002
30 #define STDFONT_FILTERED 0x0004
31 #define STDFONT_RIGHTALGN 0x0008
32 #define STDFONT_SHADOW 0x0010
33 #define STDFONT_NOMARKUP 0x0020
38 #define FW_SEMIBOLD 600
123 bool GetTextExtent(
const char *szText, int32_t &rsx, int32_t &rsy,
bool fCheckMarkup =
true);
140 int32_t
GetTextWidth(
const char *szText,
bool fCheckMarkup =
true) { int32_t x, y;
GetTextExtent(szText, x, y, fCheckMarkup);
return x; }
142 std::tuple<std::string, int>
BreakMessage(
const char *szMsg,
int iWdt,
bool fCheckMarkup,
float fZoom=1.0f);
143 int BreakMessage(
const char *szMsg,
int iWdt,
char *szOut,
int iMaxOutLen,
bool fCheckMarkup,
float fZoom=1.0f);
146 int GetMessageBreak(
const char *szMsg,
const char **ppNewPos,
int iBreakWidth,
float fZoom=1.0f);
168 bool IsSameAsID(
const char *szCFontName,
int iCID,
int iCIndent)
const
bool SEqual(const char *szStr1, const char *szStr2)
StdCopyStrBuf LastUsedName
bool InitFont(CStdFont *Font, const char *szFontName, FontType eType, int32_t iSize, C4GroupSet *pGfxGroups, bool fDoShadow=true)
void DestroyFont(CStdVectorFont *pFont)
CStdVectorFont * CreateFont(StdBuf &Data)
CStdVectorFont * pLastUsedFont
CustomImages * pCustomImages
int GetLineHeight() const
int32_t GetTextWidth(const char *szText, bool fCheckMarkup=true)
std::vector< std::unique_ptr< C4Surface > > psfcFontData
std::tuple< std::string, int > BreakMessage(const char *szMsg, int iWdt, bool fCheckMarkup, float fZoom=1.0f)
bool IsSameAsID(const char *szCFontName, int iCID, int iCIndent) const
void Init(CStdVectorFont &VectorFont, const char *font_face_name, DWORD dwHeight, DWORD dwFontWeight=FW_NORMAL, bool fDoShadow=true)
C4Facet & GetUnicodeCharacterFacet(uint32_t c)
bool IsInitialized() const
bool CheckRenderedCharSpace(uint32_t iCharWdt, uint32_t iCharHgt)
bool AddRenderedChar(uint32_t dwChar, C4Facet *pfctTarget)
void SetCustomImages(CustomImages *pHandler)
bool IsSameAs(const char *szCFontName, DWORD iCHeight, DWORD dwCWeight) const
bool GetFontImageSize(const char *szTag, int &width, int &height) const
C4Facet fctAsciiTexCoords[256-' ']
CStdFontCustomImages CustomImages
bool GetTextExtent(const char *szText, int32_t &rsx, int32_t &rsy, bool fCheckMarkup=true)
C4Facet & GetCharacterFacet(uint32_t c)
CStdVectorFont * pVectorFont
void DrawText(C4Surface *sfcDest, float iX, float iY, DWORD dwColor, const char *szText, DWORD dwFlags, C4Markup &Markup, float fZoom)
int GetMessageBreak(const char *szMsg, const char **ppNewPos, int iBreakWidth, float fZoom=1.0f)
int GetFontHeight() const
std::map< uint32_t, C4Facet > fctUnicodeMap