提交 290e3ee5 编写于 作者: B Behdad Esfahbod

[graphite] Only pass the first part language tag to graphite

Still not sure about:

1) Case.  We pass lowercase for now.  Would be nice if graphite was
uppercase 3letter like OpenType,

2) Padding.  IMO, tag padding is always with spaces, but Martin was
talking about NUL bytes.
上级 4c9fe88d
......@@ -236,9 +236,10 @@ hb_graphite_shape (hb_font_t *font,
if (!charlen) return TRUE;
/* XXX(behdad): Do we need OT lang tag here? */
const char *lang = hb_language_to_string (hb_buffer_get_language (buffer));
gr_feature_val *feats = gr_face_featureval_for_lang (data->grface, lang ? hb_tag_from_string (lang, -1) : 0);
const char *lang_end = strchr (lang, '-');
int lang_len = lang_end ? lang_end - lang : -1;
gr_feature_val *feats = gr_face_featureval_for_lang (data->grface, lang ? hb_tag_from_string (lang, lang_len) : 0);
while (num_features--)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册