FX_FLOAT CPDF_VariableText::GetWordWidth(const CPVT_WordInfo& WordInfo) { return GetWordWidth( GetWordFontIndex(WordInfo), WordInfo.Word, GetSubWord(), GetCharSpace(WordInfo), GetHorzScale(WordInfo), GetWordFontSize(WordInfo), WordInfo.fWordTail, WordInfo.pWordProps ? WordInfo.pWordProps->nWordStyle : 0); }
CPVT_WordPlace CPDF_VariableText::InsertWord(const CPVT_WordPlace& place, uint16_t word, int32_t charset, const CPVT_WordProps* pWordProps) { int32_t nTotlaWords = GetTotalWords(); if (m_nLimitChar > 0 && nTotlaWords >= m_nLimitChar) return place; if (m_nCharArray > 0 && nTotlaWords >= m_nCharArray) return place; CPVT_WordPlace newplace = place; newplace.nWordIndex++; int32_t nFontIndex = GetSubWord() > 0 ? GetDefaultFontIndex() : GetWordFontIndex(word, charset, GetDefaultFontIndex()); return AddWord(newplace, CPVT_WordInfo(word, charset, nFontIndex, nullptr)); }