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

Support New LDML Standard #1212

Open
papeh opened this issue Aug 22, 2022 · 1 comment
Open

Support New LDML Standard #1212

papeh opened this issue Aug 22, 2022 · 1 comment
Assignees

Comments

@papeh
Copy link
Contributor

papeh commented Aug 22, 2022

Presently, SIL.WritingSystems.LdmlDataMapper.ReadLdml handles a finite number of font types. Several LDML files in SLDR (including English) are being updated to include <sil:font name="Noto Sans" types="ui" [ . . . ]/>. We should be able to read them properly (at least without crashing—see LT-21098).

@mhosken (2022-08-16) wrote:
As per the documentation, the @types attribute may take any values, one of which is explicitly stated as being "ui".

@ermshiperete
Copy link
Member

ermshiperete commented Oct 18, 2022

I think what needs to happen is:

  • add FontRoles.UI to FontRoles enum
  • add "ui" to the list of font types (in LdmlDataMapper.RoleToFontRoles and LdmlDataMapper.FontRolesToRole)
  • if we encounter a type that is not in the list, we treat it as {font_type, FontRoles.Default}

We should add unit tests for the two new cases: when we get the value ui and when we get a value that is not in the list.

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

No branches or pull requests

3 participants