Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0e925698
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
0e925698
编写于
10月 26, 2017
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[post] Make format1 names array avoid relocations
上级
2a749680
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
305 addition
and
45 deletion
+305
-45
src/Makefile.sources
src/Makefile.sources
+1
-0
src/hb-ot-post-macroman.hh
src/hb-ot-post-macroman.hh
+294
-0
src/hb-ot-post-table.hh
src/hb-ot-post-table.hh
+10
-45
未找到文件。
src/Makefile.sources
浏览文件 @
0e925698
...
@@ -26,6 +26,7 @@ HB_BASE_sources = \
...
@@ -26,6 +26,7 @@ HB_BASE_sources = \
hb-ot-maxp-table.hh
\
hb-ot-maxp-table.hh
\
hb-ot-name-table.hh
\
hb-ot-name-table.hh
\
hb-ot-os2-table.hh
\
hb-ot-os2-table.hh
\
hb-ot-post-macroman.hh
\
hb-ot-post-table.hh
\
hb-ot-post-table.hh
\
hb-ot-tag.cc
\
hb-ot-tag.cc
\
hb-private.hh
\
hb-private.hh
\
...
...
src/hb-ot-post-macroman.hh
0 → 100644
浏览文件 @
0e925698
/*
* Copyright © 2017 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Google Author(s): Behdad Esfahbod
*/
#ifndef HB_OT_POST_MACROMAN_HH
#if 0 /* Make checks happy. */
#define HB_OT_POST_MACROMAN_HH
#include "hb-private.hh"
#endif
_S
(
".notdef"
)
_S
(
".null"
)
_S
(
"nonmarkingreturn"
)
_S
(
"space"
)
_S
(
"exclam"
)
_S
(
"quotedbl"
)
_S
(
"numbersign"
)
_S
(
"dollar"
)
_S
(
"percent"
)
_S
(
"ampersand"
)
_S
(
"quotesingle"
)
_S
(
"parenleft"
)
_S
(
"parenright"
)
_S
(
"asterisk"
)
_S
(
"plus"
)
_S
(
"comma"
)
_S
(
"hyphen"
)
_S
(
"period"
)
_S
(
"slash"
)
_S
(
"zero"
)
_S
(
"one"
)
_S
(
"two"
)
_S
(
"three"
)
_S
(
"four"
)
_S
(
"five"
)
_S
(
"six"
)
_S
(
"seven"
)
_S
(
"eight"
)
_S
(
"nine"
)
_S
(
"colon"
)
_S
(
"semicolon"
)
_S
(
"less"
)
_S
(
"equal"
)
_S
(
"greater"
)
_S
(
"question"
)
_S
(
"at"
)
_S
(
"A"
)
_S
(
"B"
)
_S
(
"C"
)
_S
(
"D"
)
_S
(
"E"
)
_S
(
"F"
)
_S
(
"G"
)
_S
(
"H"
)
_S
(
"I"
)
_S
(
"J"
)
_S
(
"K"
)
_S
(
"L"
)
_S
(
"M"
)
_S
(
"N"
)
_S
(
"O"
)
_S
(
"P"
)
_S
(
"Q"
)
_S
(
"R"
)
_S
(
"S"
)
_S
(
"T"
)
_S
(
"U"
)
_S
(
"V"
)
_S
(
"W"
)
_S
(
"X"
)
_S
(
"Y"
)
_S
(
"Z"
)
_S
(
"bracketleft"
)
_S
(
"backslash"
)
_S
(
"bracketright"
)
_S
(
"asciicircum"
)
_S
(
"underscore"
)
_S
(
"grave"
)
_S
(
"a"
)
_S
(
"b"
)
_S
(
"c"
)
_S
(
"d"
)
_S
(
"e"
)
_S
(
"f"
)
_S
(
"g"
)
_S
(
"h"
)
_S
(
"i"
)
_S
(
"j"
)
_S
(
"k"
)
_S
(
"l"
)
_S
(
"m"
)
_S
(
"n"
)
_S
(
"o"
)
_S
(
"p"
)
_S
(
"q"
)
_S
(
"r"
)
_S
(
"s"
)
_S
(
"t"
)
_S
(
"u"
)
_S
(
"v"
)
_S
(
"w"
)
_S
(
"x"
)
_S
(
"y"
)
_S
(
"z"
)
_S
(
"braceleft"
)
_S
(
"bar"
)
_S
(
"braceright"
)
_S
(
"asciitilde"
)
_S
(
"Adieresis"
)
_S
(
"Aring"
)
_S
(
"Ccedilla"
)
_S
(
"Eacute"
)
_S
(
"Ntilde"
)
_S
(
"Odieresis"
)
_S
(
"Udieresis"
)
_S
(
"aacute"
)
_S
(
"agrave"
)
_S
(
"acircumflex"
)
_S
(
"adieresis"
)
_S
(
"atilde"
)
_S
(
"aring"
)
_S
(
"ccedilla"
)
_S
(
"eacute"
)
_S
(
"egrave"
)
_S
(
"ecircumflex"
)
_S
(
"edieresis"
)
_S
(
"iacute"
)
_S
(
"igrave"
)
_S
(
"icircumflex"
)
_S
(
"idieresis"
)
_S
(
"ntilde"
)
_S
(
"oacute"
)
_S
(
"ograve"
)
_S
(
"ocircumflex"
)
_S
(
"odieresis"
)
_S
(
"otilde"
)
_S
(
"uacute"
)
_S
(
"ugrave"
)
_S
(
"ucircumflex"
)
_S
(
"udieresis"
)
_S
(
"dagger"
)
_S
(
"degree"
)
_S
(
"cent"
)
_S
(
"sterling"
)
_S
(
"section"
)
_S
(
"bullet"
)
_S
(
"paragraph"
)
_S
(
"germandbls"
)
_S
(
"registered"
)
_S
(
"copyright"
)
_S
(
"trademark"
)
_S
(
"acute"
)
_S
(
"dieresis"
)
_S
(
"notequal"
)
_S
(
"AE"
)
_S
(
"Oslash"
)
_S
(
"infinity"
)
_S
(
"plusminus"
)
_S
(
"lessequal"
)
_S
(
"greaterequal"
)
_S
(
"yen"
)
_S
(
"mu"
)
_S
(
"partialdiff"
)
_S
(
"summation"
)
_S
(
"product"
)
_S
(
"pi"
)
_S
(
"integral"
)
_S
(
"ordfeminine"
)
_S
(
"ordmasculine"
)
_S
(
"Omega"
)
_S
(
"ae"
)
_S
(
"oslash"
)
_S
(
"questiondown"
)
_S
(
"exclamdown"
)
_S
(
"logicalnot"
)
_S
(
"radical"
)
_S
(
"florin"
)
_S
(
"approxequal"
)
_S
(
"Delta"
)
_S
(
"guillemotleft"
)
_S
(
"guillemotright"
)
_S
(
"ellipsis"
)
_S
(
"nonbreakingspace"
)
_S
(
"Agrave"
)
_S
(
"Atilde"
)
_S
(
"Otilde"
)
_S
(
"OE"
)
_S
(
"oe"
)
_S
(
"endash"
)
_S
(
"emdash"
)
_S
(
"quotedblleft"
)
_S
(
"quotedblright"
)
_S
(
"quoteleft"
)
_S
(
"quoteright"
)
_S
(
"divide"
)
_S
(
"lozenge"
)
_S
(
"ydieresis"
)
_S
(
"Ydieresis"
)
_S
(
"fraction"
)
_S
(
"currency"
)
_S
(
"guilsinglleft"
)
_S
(
"guilsinglright"
)
_S
(
"fi"
)
_S
(
"fl"
)
_S
(
"daggerdbl"
)
_S
(
"periodcentered"
)
_S
(
"quotesinglbase"
)
_S
(
"quotedblbase"
)
_S
(
"perthousand"
)
_S
(
"Acircumflex"
)
_S
(
"Ecircumflex"
)
_S
(
"Aacute"
)
_S
(
"Edieresis"
)
_S
(
"Egrave"
)
_S
(
"Iacute"
)
_S
(
"Icircumflex"
)
_S
(
"Idieresis"
)
_S
(
"Igrave"
)
_S
(
"Oacute"
)
_S
(
"Ocircumflex"
)
_S
(
"apple"
)
_S
(
"Ograve"
)
_S
(
"Uacute"
)
_S
(
"Ucircumflex"
)
_S
(
"Ugrave"
)
_S
(
"dotlessi"
)
_S
(
"circumflex"
)
_S
(
"tilde"
)
_S
(
"macron"
)
_S
(
"breve"
)
_S
(
"dotaccent"
)
_S
(
"ring"
)
_S
(
"cedilla"
)
_S
(
"hungarumlaut"
)
_S
(
"ogonek"
)
_S
(
"caron"
)
_S
(
"Lslash"
)
_S
(
"lslash"
)
_S
(
"Scaron"
)
_S
(
"scaron"
)
_S
(
"Zcaron"
)
_S
(
"zcaron"
)
_S
(
"brokenbar"
)
_S
(
"Eth"
)
_S
(
"eth"
)
_S
(
"Yacute"
)
_S
(
"yacute"
)
_S
(
"Thorn"
)
_S
(
"thorn"
)
_S
(
"minus"
)
_S
(
"multiply"
)
_S
(
"onesuperior"
)
_S
(
"twosuperior"
)
_S
(
"threesuperior"
)
_S
(
"onehalf"
)
_S
(
"onequarter"
)
_S
(
"threequarters"
)
_S
(
"franc"
)
_S
(
"Gbreve"
)
_S
(
"gbreve"
)
_S
(
"Idotaccent"
)
_S
(
"Scedilla"
)
_S
(
"scedilla"
)
_S
(
"Cacute"
)
_S
(
"cacute"
)
_S
(
"Ccaron"
)
_S
(
"ccaron"
)
_S
(
"dcroat"
)
#endif
/* HB_OT_POST_MACROMAN_HH */
src/hb-ot-post-table.hh
浏览文件 @
0e925698
...
@@ -29,48 +29,13 @@
...
@@ -29,48 +29,13 @@
#include "hb-open-type-private.hh"
#include "hb-open-type-private.hh"
#define NUM_FORMAT1_NAMES 258
#define HB_STRING_ARRAY_NAME format1_names
#define HB_STRING_ARRAY_LIST "hb-ot-post-macroman.hh"
#include "hb-string-array.hh"
#undef HB_STRING_ARRAY_LIST
#undef HB_STRING_ARRAY_NAME
static
const
char
*
const
format1_names
[
NUM_FORMAT1_NAMES
]
=
#define NUM_FORMAT1_NAMES 258
{
".notdef"
,
".null"
,
"nonmarkingreturn"
,
"space"
,
"exclam"
,
"quotedbl"
,
"numbersign"
,
"dollar"
,
"percent"
,
"ampersand"
,
"quotesingle"
,
"parenleft"
,
"parenright"
,
"asterisk"
,
"plus"
,
"comma"
,
"hyphen"
,
"period"
,
"slash"
,
"zero"
,
"one"
,
"two"
,
"three"
,
"four"
,
"five"
,
"six"
,
"seven"
,
"eight"
,
"nine"
,
"colon"
,
"semicolon"
,
"less"
,
"equal"
,
"greater"
,
"question"
,
"at"
,
"A"
,
"B"
,
"C"
,
"D"
,
"E"
,
"F"
,
"G"
,
"H"
,
"I"
,
"J"
,
"K"
,
"L"
,
"M"
,
"N"
,
"O"
,
"P"
,
"Q"
,
"R"
,
"S"
,
"T"
,
"U"
,
"V"
,
"W"
,
"X"
,
"Y"
,
"Z"
,
"bracketleft"
,
"backslash"
,
"bracketright"
,
"asciicircum"
,
"underscore"
,
"grave"
,
"a"
,
"b"
,
"c"
,
"d"
,
"e"
,
"f"
,
"g"
,
"h"
,
"i"
,
"j"
,
"k"
,
"l"
,
"m"
,
"n"
,
"o"
,
"p"
,
"q"
,
"r"
,
"s"
,
"t"
,
"u"
,
"v"
,
"w"
,
"x"
,
"y"
,
"z"
,
"braceleft"
,
"bar"
,
"braceright"
,
"asciitilde"
,
"Adieresis"
,
"Aring"
,
"Ccedilla"
,
"Eacute"
,
"Ntilde"
,
"Odieresis"
,
"Udieresis"
,
"aacute"
,
"agrave"
,
"acircumflex"
,
"adieresis"
,
"atilde"
,
"aring"
,
"ccedilla"
,
"eacute"
,
"egrave"
,
"ecircumflex"
,
"edieresis"
,
"iacute"
,
"igrave"
,
"icircumflex"
,
"idieresis"
,
"ntilde"
,
"oacute"
,
"ograve"
,
"ocircumflex"
,
"odieresis"
,
"otilde"
,
"uacute"
,
"ugrave"
,
"ucircumflex"
,
"udieresis"
,
"dagger"
,
"degree"
,
"cent"
,
"sterling"
,
"section"
,
"bullet"
,
"paragraph"
,
"germandbls"
,
"registered"
,
"copyright"
,
"trademark"
,
"acute"
,
"dieresis"
,
"notequal"
,
"AE"
,
"Oslash"
,
"infinity"
,
"plusminus"
,
"lessequal"
,
"greaterequal"
,
"yen"
,
"mu"
,
"partialdiff"
,
"summation"
,
"product"
,
"pi"
,
"integral"
,
"ordfeminine"
,
"ordmasculine"
,
"Omega"
,
"ae"
,
"oslash"
,
"questiondown"
,
"exclamdown"
,
"logicalnot"
,
"radical"
,
"florin"
,
"approxequal"
,
"Delta"
,
"guillemotleft"
,
"guillemotright"
,
"ellipsis"
,
"nonbreakingspace"
,
"Agrave"
,
"Atilde"
,
"Otilde"
,
"OE"
,
"oe"
,
"endash"
,
"emdash"
,
"quotedblleft"
,
"quotedblright"
,
"quoteleft"
,
"quoteright"
,
"divide"
,
"lozenge"
,
"ydieresis"
,
"Ydieresis"
,
"fraction"
,
"currency"
,
"guilsinglleft"
,
"guilsinglright"
,
"fi"
,
"fl"
,
"daggerdbl"
,
"periodcentered"
,
"quotesinglbase"
,
"quotedblbase"
,
"perthousand"
,
"Acircumflex"
,
"Ecircumflex"
,
"Aacute"
,
"Edieresis"
,
"Egrave"
,
"Iacute"
,
"Icircumflex"
,
"Idieresis"
,
"Igrave"
,
"Oacute"
,
"Ocircumflex"
,
"apple"
,
"Ograve"
,
"Uacute"
,
"Ucircumflex"
,
"Ugrave"
,
"dotlessi"
,
"circumflex"
,
"tilde"
,
"macron"
,
"breve"
,
"dotaccent"
,
"ring"
,
"cedilla"
,
"hungarumlaut"
,
"ogonek"
,
"caron"
,
"Lslash"
,
"lslash"
,
"Scaron"
,
"scaron"
,
"Zcaron"
,
"zcaron"
,
"brokenbar"
,
"Eth"
,
"eth"
,
"Yacute"
,
"yacute"
,
"Thorn"
,
"thorn"
,
"minus"
,
"multiply"
,
"onesuperior"
,
"twosuperior"
,
"threesuperior"
,
"onehalf"
,
"onequarter"
,
"threequarters"
,
"franc"
,
"Gbreve"
,
"gbreve"
,
"Idotaccent"
,
"Scedilla"
,
"scedilla"
,
"Cacute"
,
"cacute"
,
"Ccaron"
,
"ccaron"
,
"dcroat"
,
};
namespace
OT
{
namespace
OT
{
...
@@ -130,7 +95,7 @@ struct post
...
@@ -130,7 +95,7 @@ struct post
if
(
!
buffer_length
)
if
(
!
buffer_length
)
return
true
;
return
true
;
strncpy
(
buffer
,
format1_names
[
glyph
]
,
buffer_length
);
strncpy
(
buffer
,
format1_names
(
glyph
)
,
buffer_length
);
buffer
[
buffer_length
-
1
]
=
'\0'
;
buffer
[
buffer_length
-
1
]
=
'\0'
;
return
true
;
return
true
;
}
}
...
@@ -150,7 +115,7 @@ struct post
...
@@ -150,7 +115,7 @@ struct post
{
{
if
(
!
buffer_length
)
if
(
!
buffer_length
)
return
true
;
return
true
;
strncpy
(
buffer
,
format1_names
[
index
]
,
buffer_length
);
strncpy
(
buffer
,
format1_names
(
index
)
,
buffer_length
);
buffer
[
buffer_length
-
1
]
=
'\0'
;
buffer
[
buffer_length
-
1
]
=
'\0'
;
return
true
;
return
true
;
}
}
...
@@ -195,7 +160,7 @@ struct post
...
@@ -195,7 +160,7 @@ struct post
{
{
for
(
int
i
=
0
;
i
<
NUM_FORMAT1_NAMES
;
i
++
)
for
(
int
i
=
0
;
i
<
NUM_FORMAT1_NAMES
;
i
++
)
{
{
if
(
strncmp
(
name
,
format1_names
[
i
],
len
)
==
0
&&
format1_names
[
i
]
[
len
]
==
'\0'
)
if
(
strncmp
(
name
,
format1_names
(
i
),
len
)
==
0
&&
format1_names
(
i
)
[
len
]
==
'\0'
)
{
{
*
glyph
=
i
;
*
glyph
=
i
;
return
true
;
return
true
;
...
@@ -218,7 +183,7 @@ struct post
...
@@ -218,7 +183,7 @@ struct post
unsigned
int
index
=
v2
.
glyphNameIndex
[
gid
];
unsigned
int
index
=
v2
.
glyphNameIndex
[
gid
];
if
(
index
<
NUM_FORMAT1_NAMES
)
if
(
index
<
NUM_FORMAT1_NAMES
)
{
{
if
(
strncmp
(
name
,
format1_names
[
index
],
len
)
==
0
&&
format1_names
[
index
]
[
len
]
==
'\0'
)
if
(
strncmp
(
name
,
format1_names
(
index
),
len
)
==
0
&&
format1_names
(
index
)
[
len
]
==
'\0'
)
{
{
*
glyph
=
gid
;
*
glyph
=
gid
;
return
true
;
return
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录