Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
e96bb369
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e96bb369
编写于
8月 23, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[icu-le] Actually use the FontTableCache
上级
7d242364
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
17 deletion
+8
-17
src/hb-icu-le/PortableFontInstance.cpp
src/hb-icu-le/PortableFontInstance.cpp
+8
-17
未找到文件。
src/hb-icu-le/PortableFontInstance.cpp
浏览文件 @
e96bb369
...
...
@@ -112,7 +112,7 @@ PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize
fDirExtra
=
numTables
-
fDirPower
;
// read unitsPerEm from 'head' table
headTable
=
(
const
HEADTable
*
)
read
FontTable
(
headTag
);
headTable
=
(
const
HEADTable
*
)
get
FontTable
(
headTag
);
if
(
headTable
==
NULL
)
{
status
=
LE_MISSING_FONT_TABLE_ERROR
;
...
...
@@ -121,9 +121,8 @@ PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize
fUnitsPerEM
=
SWAPW
(
headTable
->
unitsPerEm
);
fFontChecksum
=
SWAPL
(
headTable
->
checksumAdjustment
);
freeFontTable
(
headTable
);
//nameTable = (NAMETable *)
read
FontTable(nameTag);
//nameTable = (NAMETable *)
get
FontTable(nameTag);
//if (nameTable == NULL) {
// status = LE_MISSING_FONT_TABLE_ERROR;
...
...
@@ -137,9 +136,7 @@ PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize
// goto error_exit;
//}
//freeFontTable(nameTable);
hheaTable
=
(
HHEATable
*
)
readFontTable
(
hheaTag
);
hheaTable
=
(
HHEATable
*
)
getFontTable
(
hheaTag
);
if
(
hheaTable
==
NULL
)
{
status
=
LE_MISSING_FONT_TABLE_ERROR
;
...
...
@@ -152,8 +149,6 @@ PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize
fNumLongHorMetrics
=
SWAPW
(
hheaTable
->
numOfLongHorMetrics
);
freeFontTable
((
void
*
)
hheaTable
);
fCMAPMapper
=
findUnicodeMapper
();
if
(
fCMAPMapper
==
NULL
)
{
...
...
@@ -174,9 +169,6 @@ PortableFontInstance::~PortableFontInstance()
if
(
fFile
!=
NULL
)
{
fclose
(
fFile
);
freeFontTable
(
fHMTXTable
);
freeFontTable
(
fNAMETable
);
delete
fCMAPMapper
;
DELETE_ARRAY
(
fDirectory
);
...
...
@@ -245,7 +237,7 @@ const void *PortableFontInstance::readFontTable(LETag tableTag) const
CMAPMapper
*
PortableFontInstance
::
findUnicodeMapper
()
{
LETag
cmapTag
=
LE_CMAP_TABLE_TAG
;
const
CMAPTable
*
cmap
=
(
CMAPTable
*
)
read
FontTable
(
cmapTag
);
const
CMAPTable
*
cmap
=
(
CMAPTable
*
)
get
FontTable
(
cmapTag
);
if
(
cmap
==
NULL
)
{
return
NULL
;
...
...
@@ -260,7 +252,7 @@ const char *PortableFontInstance::getNameString(le_uint16 nameID, le_uint16 plat
LETag
nameTag
=
LE_NAME_TABLE_TAG
;
PortableFontInstance
*
realThis
=
(
PortableFontInstance
*
)
this
;
realThis
->
fNAMETable
=
(
const
NAMETable
*
)
read
FontTable
(
nameTag
);
realThis
->
fNAMETable
=
(
const
NAMETable
*
)
get
FontTable
(
nameTag
);
if
(
realThis
->
fNAMETable
!=
NULL
)
{
realThis
->
fNameCount
=
SWAPW
(
realThis
->
fNAMETable
->
count
);
...
...
@@ -293,7 +285,7 @@ const LEUnicode16 *PortableFontInstance::getUnicodeNameString(le_uint16 nameID,
LETag
nameTag
=
LE_NAME_TABLE_TAG
;
PortableFontInstance
*
realThis
=
(
PortableFontInstance
*
)
this
;
realThis
->
fNAMETable
=
(
const
NAMETable
*
)
read
FontTable
(
nameTag
);
realThis
->
fNAMETable
=
(
const
NAMETable
*
)
get
FontTable
(
nameTag
);
if
(
realThis
->
fNAMETable
!=
NULL
)
{
realThis
->
fNameCount
=
SWAPW
(
realThis
->
fNAMETable
->
count
);
...
...
@@ -340,15 +332,14 @@ void PortableFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) co
if
(
fHMTXTable
==
NULL
)
{
LETag
maxpTag
=
LE_MAXP_TABLE_TAG
;
LETag
hmtxTag
=
LE_HMTX_TABLE_TAG
;
const
MAXPTable
*
maxpTable
=
(
MAXPTable
*
)
read
FontTable
(
maxpTag
);
const
MAXPTable
*
maxpTable
=
(
MAXPTable
*
)
get
FontTable
(
maxpTag
);
PortableFontInstance
*
realThis
=
(
PortableFontInstance
*
)
this
;
if
(
maxpTable
!=
NULL
)
{
realThis
->
fNumGlyphs
=
SWAPW
(
maxpTable
->
numGlyphs
);
freeFontTable
(
maxpTable
);
}
realThis
->
fHMTXTable
=
(
const
HMTXTable
*
)
read
FontTable
(
hmtxTag
);
realThis
->
fHMTXTable
=
(
const
HMTXTable
*
)
get
FontTable
(
hmtxTag
);
}
le_uint16
index
=
ttGlyph
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录