提交 f0c4c7be 编写于 作者: S swx1094762

Description:Fix high emoj rendering

issuesno:I6R9BZ
Sig:SIG_ApplicationFramework
Feature or Bugfix:Feature
Binary Source:NO
Signed-off-by: Nswx1094762 <shiqichang@huawei.com>
上级 7fe8711c
......@@ -92,7 +92,7 @@ uint16_t DrawLabel::DrawTextOneLine(BufferInfo& gfxDstBuffer, const LabelLineInf
uint8_t weight = UIFont::GetInstance()->GetFontWeight(glyphNode.fontId);
// 16: rgb565->16 rgba8888->32 font with rgba
if (weight >= 16) {
DrawUtils::GetInstance()->DrawColorLetter(gfxDstBuffer, letterInfo, fontMap, glyphNode);
DrawUtils::GetInstance()->DrawColorLetter(gfxDstBuffer, letterInfo, fontMap, glyphNode, maxLetterSize);
} else {
letterInfo.offsetY = labelLine.ellipsisOssetY == 0 ? offsetPosY : labelLine.ellipsisOssetY;
retOffsetY = offsetPosY;
......
......@@ -293,7 +293,8 @@ void DrawUtils::DrawPixel(BufferInfo& gfxDstBuffer,
void DrawUtils::DrawColorLetter(BufferInfo& gfxDstBuffer,
const LabelLetterInfo& letterInfo,
uint8_t* fontMap,
GlyphNode node) const
GlyphNode node,
uint8_t maxLetterSize) const
{
if (fontMap == nullptr) {
return;
......@@ -304,7 +305,7 @@ void DrawUtils::DrawColorLetter(BufferInfo& gfxDstBuffer,
int16_t posX;
int16_t posY;
if (letterInfo.baseLine) {
posY = letterInfo.pos.y + letterInfo.offsetY;
posY = letterInfo.pos.y + maxLetterSize - node.top + letterInfo.offsetY;
} else {
FontHeader head;
if (fontEngine->GetFontHeader(head, letterInfo.fontId, letterInfo.fontSize) != 0) {
......
......@@ -212,7 +212,8 @@ public:
void DrawColorLetter(BufferInfo& gfxDstBuffer,
const LabelLetterInfo& letterInfo,
uint8_t* fontMap,
GlyphNode node) const;
GlyphNode node,
uint8_t maxLetterSize) const;
void DrawNormalLetter(BufferInfo& gfxDstBuffer,
const LabelLetterInfo& letterInfo,
uint8_t* fontMap,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册