int32_t CPWL_FontMap::GetWordFontIndex(uint16_t word, int32_t nCharset, int32_t nFontIndex) { if (nFontIndex > 0) { if (KnowWord(nFontIndex, word)) return nFontIndex; } else { if (const CPWL_FontMap_Data* pData = GetFontMapData(0)) { if (nCharset == DEFAULT_CHARSET || pData->nCharset == SYMBOL_CHARSET || nCharset == pData->nCharset) { if (KnowWord(0, word)) return 0; } } } int32_t nNewFontIndex = GetFontIndex(GetNativeFontName(nCharset), nCharset, TRUE); if (nNewFontIndex >= 0) { if (KnowWord(nNewFontIndex, word)) return nNewFontIndex; } nNewFontIndex = GetFontIndex("Arial Unicode MS", DEFAULT_CHARSET, FALSE); if (nNewFontIndex >= 0) { if (KnowWord(nNewFontIndex, word)) return nNewFontIndex; } return -1; }
void CPWL_FontMap::Initial(const FX_CHAR* fontname) { CFX_ByteString sFontName = fontname; if (sFontName.IsEmpty()) sFontName = DEFAULT_FONT_NAME; GetFontIndex(sFontName, ANSI_CHARSET, FALSE); }
void MAS::RadioButton::MsgInitSkin() { Button::MsgInitSkin(); for (int i=0; i<4; i++) { if (GetFontColor(i) == Color::transparent) SetFontColor(skin->fcol[Skin::INFO_RADIO][i], skin->scol[Skin::INFO_RADIO][i], i); if (GetFontIndex(i) == -1) SetFont(skin->fnt[Skin::INFO_RADIO][i], i); } if (GetTextMode() == Color::transparent) SetTextMode(skin->c_face); if (GetBitmapIndex() == Skin::BUTTON) SetBitmap(Skin::RADIO); SetFlag(D_TOGGLE); ClearFlag(D_SPINNER | D_AUTOSIZE); }
void MAS::HyperText::MsgInitSkin() { for (int i=0; i<4; i++) { if (GetFontColor(i) == Color::transparent) SetFontColor(skin->fcol[Skin::INFO_HYPER][i], skin->scol[Skin::INFO_HYPER][i], i); if (GetFontIndex(i) == -1) SetFont(skin->fnt[Skin::INFO_HYPER][i], i); } if (GetTextMode() == Color::transparent) SetTextMode(skin->c_face); SetFlag(D_AUTOSIZE); UpdateSize(); ClearFlag(D_TOGGLE | D_SPINNER); Button::MsgInitSkin(); }
void CPWL_FontMap::Initial(FX_LPCSTR fontname) { CFX_ByteString sFontName = fontname; if (sFontName.IsEmpty()) sFontName = DEFAULT_FONT_NAME; GetFontIndex(sFontName, ANSI_CHARSET, FALSE); //GetFontIndex(this->GetNativeFontName(nCharset), nCharset); }
void CPWL_FontMap::Initialize() { GetFontIndex(kDefaultFontName, ANSI_CHARSET, FALSE); }