[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.
This commit is contained in:
parent
4c9fe88d30
commit
290e3ee517
|
@ -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--)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue