提交 a4bef84e 编写于 作者: B Behdad Esfahbod

[util] Make hb-shape err if output-format is not understood

And list supported formats.
上级 3cec819d
...@@ -45,6 +45,12 @@ struct output_buffer_t ...@@ -45,6 +45,12 @@ struct output_buffer_t
output_format = HB_BUFFER_SERIALIZE_FORMAT_TEXT; output_format = HB_BUFFER_SERIALIZE_FORMAT_TEXT;
else else
output_format = hb_buffer_serialize_format_from_string (options.output_format, -1); output_format = hb_buffer_serialize_format_from_string (options.output_format, -1);
if (!hb_buffer_serialize_format_to_string (output_format))
{
fail (false, "Unknown output format `%s'; supported formats are: %s",
options.output_format,
g_strjoinv (" / ", (gchar**) hb_buffer_serialize_list_formats ()));
}
unsigned int flags = HB_BUFFER_SERIALIZE_FLAGS_DEFAULT; unsigned int flags = HB_BUFFER_SERIALIZE_FLAGS_DEFAULT;
if (!format.show_glyph_names) if (!format.show_glyph_names)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册