Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9815a881
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9815a881
编写于
12月 21, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[util] List supported output formats in --help output
上级
f95a87b7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
18 addition
and
7 deletion
+18
-7
util/hb-shape.cc
util/hb-shape.cc
+3
-3
util/helper-cairo.cc
util/helper-cairo.cc
+1
-1
util/helper-cairo.hh
util/helper-cairo.hh
+1
-0
util/options.cc
util/options.cc
+8
-1
util/options.hh
util/options.hh
+4
-1
util/view-cairo.hh
util/view-cairo.hh
+1
-1
未找到文件。
util/hb-shape.cc
浏览文件 @
9815a881
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
struct
output_buffer_t
struct
output_buffer_t
{
{
output_buffer_t
(
option_parser_t
*
parser
)
output_buffer_t
(
option_parser_t
*
parser
)
:
options
(
parser
),
:
options
(
parser
,
g_strjoinv
(
" / "
,
(
gchar
**
)
hb_buffer_serialize_list_formats
())),
format
(
parser
)
{}
format
(
parser
)
{}
void
init
(
const
font_options_t
*
font_opts
)
void
init
(
const
font_options_t
*
font_opts
)
...
@@ -49,8 +50,7 @@ struct output_buffer_t
...
@@ -49,8 +50,7 @@ struct output_buffer_t
{
{
if
(
options
.
explicit_output_format
)
if
(
options
.
explicit_output_format
)
fail
(
false
,
"Unknown output format `%s'; supported formats are: %s"
,
fail
(
false
,
"Unknown output format `%s'; supported formats are: %s"
,
options
.
output_format
,
options
.
output_format
,
options
.
supported_formats
);
g_strjoinv
(
" / "
,
(
gchar
**
)
hb_buffer_serialize_list_formats
()));
else
else
/* Just default to TEXT if not explicitly requested and the
/* Just default to TEXT if not explicitly requested and the
* file extension is not recognized. */
* file extension is not recognized. */
...
...
util/helper-cairo.cc
浏览文件 @
9815a881
...
@@ -246,7 +246,7 @@ stdio_write_func (void *closure,
...
@@ -246,7 +246,7 @@ stdio_write_func (void *closure,
return
CAIRO_STATUS_SUCCESS
;
return
CAIRO_STATUS_SUCCESS
;
}
}
static
const
char
helper_cairo_supported_formats
[]
=
const
char
helper_cairo_supported_formats
[]
=
"ansi"
"ansi"
#ifdef CAIRO_HAS_PNG_FUNCTIONS
#ifdef CAIRO_HAS_PNG_FUNCTIONS
"/png"
"/png"
...
...
util/helper-cairo.hh
浏览文件 @
9815a881
...
@@ -36,6 +36,7 @@ cairo_scaled_font_t *
...
@@ -36,6 +36,7 @@ cairo_scaled_font_t *
helper_cairo_create_scaled_font
(
const
font_options_t
*
font_opts
,
helper_cairo_create_scaled_font
(
const
font_options_t
*
font_opts
,
double
font_size
);
double
font_size
);
extern
const
char
helper_cairo_supported_formats
[];
cairo_t
*
cairo_t
*
helper_cairo_create_context
(
double
w
,
double
h
,
helper_cairo_create_context
(
double
w
,
double
h
,
...
...
util/options.cc
浏览文件 @
9815a881
...
@@ -367,10 +367,17 @@ text_options_t::add_options (option_parser_t *parser)
...
@@ -367,10 +367,17 @@ text_options_t::add_options (option_parser_t *parser)
void
void
output_options_t
::
add_options
(
option_parser_t
*
parser
)
output_options_t
::
add_options
(
option_parser_t
*
parser
)
{
{
const
char
*
text
;
if
(
NULL
==
supported_formats
)
text
=
"Set output format"
;
else
text
=
g_strdup_printf
(
"Set output format
\n\n
Supported formats are: %s"
,
supported_formats
);
GOptionEntry
entries
[]
=
GOptionEntry
entries
[]
=
{
{
{
"output-file"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
this
->
output_file
,
"Set output file-name (default: stdout)"
,
"filename"
},
{
"output-file"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
this
->
output_file
,
"Set output file-name (default: stdout)"
,
"filename"
},
{
"output-format"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
this
->
output_format
,
"Set output format"
,
"format"
},
{
"output-format"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
this
->
output_format
,
text
,
"format"
},
{
NULL
}
{
NULL
}
};
};
parser
->
add_group
(
entries
,
parser
->
add_group
(
entries
,
...
...
util/options.hh
浏览文件 @
9815a881
...
@@ -310,9 +310,11 @@ struct text_options_t : option_group_t
...
@@ -310,9 +310,11 @@ struct text_options_t : option_group_t
struct
output_options_t
:
option_group_t
struct
output_options_t
:
option_group_t
{
{
output_options_t
(
option_parser_t
*
parser
)
{
output_options_t
(
option_parser_t
*
parser
,
const
char
*
supported_formats_
=
NULL
)
{
output_file
=
NULL
;
output_file
=
NULL
;
output_format
=
NULL
;
output_format
=
NULL
;
supported_formats
=
supported_formats_
;
explicit_output_format
=
false
;
explicit_output_format
=
false
;
fp
=
NULL
;
fp
=
NULL
;
...
@@ -345,6 +347,7 @@ struct output_options_t : option_group_t
...
@@ -345,6 +347,7 @@ struct output_options_t : option_group_t
const
char
*
output_file
;
const
char
*
output_file
;
const
char
*
output_format
;
const
char
*
output_format
;
const
char
*
supported_formats
;
bool
explicit_output_format
;
bool
explicit_output_format
;
mutable
FILE
*
fp
;
mutable
FILE
*
fp
;
...
...
util/view-cairo.hh
浏览文件 @
9815a881
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
struct
view_cairo_t
{
struct
view_cairo_t
{
view_cairo_t
(
option_parser_t
*
parser
)
view_cairo_t
(
option_parser_t
*
parser
)
:
output_options
(
parser
),
:
output_options
(
parser
,
helper_cairo_supported_formats
),
view_options
(
parser
)
{}
view_options
(
parser
)
{}
~
view_cairo_t
(
void
)
{
~
view_cairo_t
(
void
)
{
if
(
debug
)
if
(
debug
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录