Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round-tripping OpenType tags through BCP 47 losslessly #2380

Closed
dscorbett opened this issue Apr 27, 2020 · 1 comment · Fixed by #2387
Closed

Round-tripping OpenType tags through BCP 47 losslessly #2380

dscorbett opened this issue Apr 27, 2020 · 1 comment · Fixed by #2387

Comments

@dscorbett
Copy link
Collaborator

Firefox calls hb_ot_tag_to_language and hb_buffer_set_language to implement font-language-override, which causes a bug: the tag is parsed case-insensitively but CSS says the string is case-sensitive.

I would like to fix this by adding a new private use subtag syntax to HarfBuzz: x-hbot-AABBCCDD, where each pair of letters in the trailing subtag represents a byte of the tag. For example, hb_ot_tag_to_language would convert the tag 'trk ' (which is not the right tag for Turkish) to x-hbot-74726b20, which hb_ot_tags_from_script_and_language would later interpret as 'trk ' instead of normalizing the case to 'TRK '.

@behdad @jfkthame What do you think?

@behdad
Copy link
Member

behdad commented Apr 29, 2020

I'm not convinced we need this but am open to it. Suggested format looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants