Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Graphic Ui
提交
eaa3e364
G
Graphic Ui
项目概览
OpenHarmony
/
Graphic Ui
大约 1 年 前同步成功
通知
13
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Graphic Ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eaa3e364
编写于
9月 16, 2021
作者:
O
openharmony_ci
提交者:
Gitee
9月 16, 2021
浏览文件
操作
浏览文件
下载
差异文件
!416 字符的GlyphNode不存在时绘制错误
Merge pull request !416 from wangtiantian/bug_bitmap_m
上级
2e962594
7adb95f4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
9 deletion
+12
-9
frameworks/font/glyphs_manager.cpp
frameworks/font/glyphs_manager.cpp
+7
-4
frameworks/font/glyphs_manager.h
frameworks/font/glyphs_manager.h
+1
-1
frameworks/font/ui_font_bitmap.cpp
frameworks/font/ui_font_bitmap.cpp
+3
-3
interfaces/innerkits/font/ui_font_bitmap.h
interfaces/innerkits/font/ui_font_bitmap.h
+1
-1
未找到文件。
frameworks/font/glyphs_manager.cpp
浏览文件 @
eaa3e364
...
...
@@ -374,7 +374,7 @@ int16_t GlyphsManager::GetFontWidth(uint32_t unicode)
return
node
->
advance
;
}
int8_t
GlyphsManager
::
GetBitmap
(
uint32_t
unicode
,
uint8_t
*
bitmap
,
GlyphNode
*
glyphNode
)
int8_t
GlyphsManager
::
GetBitmap
(
uint32_t
unicode
,
uint8_t
*
bitmap
,
uint8_t
fontId
)
{
if
(
bitmap
==
nullptr
)
{
GRAPHIC_LOGE
(
"GlyphsManager::GetBitmap invalid parameter"
);
...
...
@@ -384,9 +384,9 @@ int8_t GlyphsManager::GetBitmap(uint32_t unicode, uint8_t* bitmap, GlyphNode* gl
GRAPHIC_LOGE
(
"GlyphsManager::GetBitmap fontId not set"
);
return
INVALID_RET_VALUE
;
}
const
GlyphNode
*
node
=
glyphNode
;
if
(
glyphNode
==
nullptr
)
{
const
GlyphNode
*
node
=
GetGlyphNode
(
unicode
);
while
((
fontId
!=
0
)
&&
(
node
!=
nullptr
)
&&
(
node
->
reserve
!=
fontId
))
{
SetCurrentFontId
(
fontId
);
node
=
GetGlyphNode
(
unicode
);
}
if
(
node
==
nullptr
)
{
...
...
@@ -394,6 +394,9 @@ int8_t GlyphsManager::GetBitmap(uint32_t unicode, uint8_t* bitmap, GlyphNode* gl
return
INVALID_RET_VALUE
;
}
if
((
fontId
!=
0
)
&&
(
fontId_
!=
fontId
))
{
SetCurrentFontId
(
fontId
);
}
uint32_t
offset
=
curBitMapSectionStart_
+
node
->
dataOff
;
uint32_t
size
=
node
->
kernOff
-
node
->
dataOff
;
int32_t
ret
=
lseek
(
fp_
,
offset
,
SEEK_SET
);
...
...
frameworks/font/glyphs_manager.h
浏览文件 @
eaa3e364
...
...
@@ -41,7 +41,7 @@ public:
const
GlyphNode
*
GetGlyphNode
(
uint32_t
unicode
);
int8_t
GetBitmap
(
uint32_t
unicode
,
uint8_t
*
bitmap
,
GlyphNode
*
glyphNode
=
nullptr
);
int8_t
GetBitmap
(
uint32_t
unicode
,
uint8_t
*
bitmap
,
uint8_t
fontId
=
0
);
void
SetRamBuffer
(
uintptr_t
ramAddr
);
...
...
frameworks/font/ui_font_bitmap.cpp
浏览文件 @
eaa3e364
...
...
@@ -215,9 +215,9 @@ uint32_t UIFontBitmap::GetRamUsedLen(uint32_t textManagerRamUsed, uint32_t langF
return
dynamicFontRamUsed_
+
textManagerRamUsed
+
bitmapRamUsed_
+
langFontRamUsed
;
}
int8_t
UIFontBitmap
::
GetDynamicFontBitmap
(
uint32_t
unicode
,
uint8_t
*
bitmap
,
GlyphNode
*
glyphNode
)
int8_t
UIFontBitmap
::
GetDynamicFontBitmap
(
uint32_t
unicode
,
uint8_t
*
bitmap
,
uint8_t
fontId
)
{
return
dynamicFont_
.
GetBitmap
(
unicode
,
bitmap
,
glyphNode
);
return
dynamicFont_
.
GetBitmap
(
unicode
,
bitmap
,
fontId
);
}
uint8_t
*
UIFontBitmap
::
GetCacheBitmap
(
uint8_t
fontId
,
uint32_t
unicode
)
...
...
@@ -289,7 +289,7 @@ uint8_t* UIFontBitmap::SearchInFont(uint32_t unicode, GlyphNode& glyphNode, uint
}
uint32_t
bitmapSize
=
glyphNode
.
kernOff
-
glyphNode
.
dataOff
;
bitmap
=
bitmapCache_
->
GetSpace
(
fontId
,
unicode
,
bitmapSize
);
ret
=
dynamicFont_
.
GetBitmap
(
unicode
,
bitmap
,
&
glyphNode
);
ret
=
dynamicFont_
.
GetBitmap
(
unicode
,
bitmap
,
fontId
);
if
(
ret
==
RET_VALUE_OK
)
{
return
bitmap
;
}
...
...
interfaces/innerkits/font/ui_font_bitmap.h
浏览文件 @
eaa3e364
...
...
@@ -47,7 +47,7 @@ protected:
uint32_t
GetBitmapRamUsed
();
uint32_t
GetDynamicFontRamUsed
();
uint32_t
GetRamUsedLen
(
uint32_t
textManagerRamUsed
,
uint32_t
langFontRamUsed
);
int8_t
GetDynamicFontBitmap
(
uint32_t
unicode
,
uint8_t
*
bitmap
,
GlyphNode
*
glyphNode
=
nullptr
);
int8_t
GetDynamicFontBitmap
(
uint32_t
unicode
,
uint8_t
*
bitmap
,
uint8_t
fontId
=
0
);
uint8_t
*
GetCacheBitmap
(
uint8_t
fontId
,
uint32_t
unicode
);
uint8_t
*
GetCacheSpace
(
uint8_t
fontId
,
uint32_t
unicode
,
uint32_t
size
);
void
PutCacheSpace
(
uint8_t
*
addr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录