提交 f4dafb78 编写于 作者: W wangtiantian

IssueNo:https://gitee.com/openharmony/graphic_ui/issues/I4FJRK

Description:fix font problem
Sig:graphic
Feature or Bugfix:Bugfix
Binary Source:No
Signed-off-by: Nwangtiantian <wangtiantian19@huawei.com>
上级 7e36db85
......@@ -394,7 +394,7 @@ int8_t GlyphsManager::GetBitmap(uint32_t unicode, uint8_t* bitmap, uint8_t fontI
}
const GlyphNode* node = GetGlyphNode(unicode);
uint32_t tmpBitMapSectionStart = curBitMapSectionStart_;
while ((node != nullptr) && (node->reserve != fontId)) {
while ((node != nullptr) && ((node->reserve != fontId) || (node->unicode != unicode))) {
SetCurrentFontId(fontId);
node = GetGlyphNode(unicode);
tmpBitMapSectionStart = curBitMapSectionStart_;
......
......@@ -217,6 +217,10 @@ uint32_t UIFontBitmap::GetRamUsedLen(uint32_t textManagerRamUsed, uint32_t langF
int8_t UIFontBitmap::GetDynamicFontBitmap(uint32_t unicode, uint8_t* bitmap, uint8_t fontId)
{
int16_t ret = dynamicFont_.SetCurrentFontId(fontId);
if (ret == INVALID_RET_VALUE) {
return ret;
}
return dynamicFont_.GetBitmap(unicode, bitmap, fontId);
}
......@@ -273,7 +277,7 @@ uint8_t* UIFontBitmap::SearchInFont(uint32_t unicode, GlyphNode& glyphNode, uint
SetCurrentFontId(fontId);
}
int8_t ret = GetGlyphNode(unicode, glyphNode);
while ((ret == RET_VALUE_OK) && (glyphNode.reserve != fontId)) {
while ((ret == RET_VALUE_OK) && ((glyphNode.reserve != fontId) || (glyphNode.unicode != unicode))) {
SetCurrentFontId(fontId);
ret = GetGlyphNode(unicode, glyphNode);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册