Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
8750abaf
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看板
提交
8750abaf
编写于
1月 18, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[util] Add --help-features
Patch from Khaled Hosny.
上级
889caa52
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
41 addition
and
1 deletion
+41
-1
util/options.cc
util/options.cc
+41
-1
未找到文件。
util/options.cc
浏览文件 @
8750abaf
...
...
@@ -391,7 +391,6 @@ shape_options_t::add_options (option_parser_t *parser)
{
"direction"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
this
->
direction
,
"Set text direction (default: auto)"
,
"ltr/rtl/ttb/btt"
},
{
"language"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
this
->
language
,
"Set text language (default: $LANG)"
,
"langstr"
},
{
"script"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
this
->
script
,
"Set text script (default: auto)"
,
"ISO-15924 tag"
},
{
"features"
,
0
,
0
,
G_OPTION_ARG_CALLBACK
,
(
gpointer
)
&
parse_features
,
"Font features to apply to text"
,
"TODO"
},
{
NULL
}
};
parser
->
add_group
(
entries
,
...
...
@@ -399,6 +398,47 @@ shape_options_t::add_options (option_parser_t *parser)
"Shape options:"
,
"Options controlling the shaping process"
,
this
);
const
gchar
*
features_help
=
"
\n
"
"
\n
"
" Comma-separated list of font features to apply to text
\n
"
"
\n
"
" Features can be enabled or disabled, either globally or limited to
\n
"
" specific byte ranges. The format is Python-esque. Here is how it all
\n
"
" works:
\n
"
"
\n
"
" Syntax: Value: Start: End:
\n
"
"
\n
"
" Setting value:
\n
"
"
\"
kern
\"
1 0 ∞ # Turn feature on
\n
"
"
\"
+kern
\"
1 0 ∞ # Turn feature on
\n
"
"
\"
-kern
\"
0 0 ∞ # Turn feature off
\n
"
"
\"
kern=0
\"
0 0 ∞ # Turn feature off
\n
"
"
\"
kern=1
\"
1 0 ∞ # Turn feature on
\n
"
"
\"
aalt=2
\"
2 0 ∞ # Choose 2nd alternate
\n
"
"
\n
"
" Setting index:
\n
"
"
\"
kern[]
\"
1 0 ∞ # Turn feature on
\n
"
"
\"
kern[:]
\"
1 0 ∞ # Turn feature on
\n
"
"
\"
kern[5:]
\"
1 5 ∞ # Turn feature on, partial
\n
"
"
\"
kern[:5]
\"
1 0 5 # Turn feature on, partial
\n
"
"
\"
kern[3:5]
\"
1 3 5 # Turn feature on, range
\n
"
"
\"
kern[3]
\"
1 3 3+1 # Turn feature on, single char
\n
"
"
\n
"
" Mixing it all:
\n
"
"
\n
"
"
\"
kern[3:5]=0
\"
1 3 5 # Turn feature off for range"
;
GOptionEntry
entries2
[]
=
{
{
"features"
,
0
,
0
,
G_OPTION_ARG_CALLBACK
,
(
gpointer
)
&
parse_features
,
features_help
,
"list"
},
{
NULL
}
};
parser
->
add_group
(
entries2
,
"features"
,
"Features options:"
,
"Options controlling the OpenType font features applied"
,
this
);
}
void
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录