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

Allow any BCP-47 tag #18

Closed
devosb opened this issue Nov 7, 2024 · 6 comments
Closed

Allow any BCP-47 tag #18

devosb opened this issue Nov 7, 2024 · 6 comments

Comments

@devosb
Copy link

devosb commented Nov 7, 2024

With DWBox 2.4.0.0 from the release page on Windows 11 (build 22000.160 from running Windows Insiders but not updated in a while, but still more than the minimum stated build of 20348) I can select different BCP-47 tags from a good sized drop down list and see the text shaping change. I can also type a BCP-47 tag, and if that tag is on the list, then the text shaping also happens.

As far as I can tell, I cannot type any BCP-47 and have it affect the text shaping. Since I need to test with BCP-47 tags not on the list (for some lesser known languages) is there a way to do this with DWBox? If not, can such functionality be added?

@miloush
Copy link
Owner

miloush commented Nov 7, 2024

Any text typed in the combo box should be passed to DWrite. Do you have a repro font and tag which don't work?

@devosb
Copy link
Author

devosb commented Nov 7, 2024

Yes, Padauk 5.001, with tag ksw (for S’gaw Karen). With this tag specified, the dot should be on the left, as you can see in the screenshot from Firefox below. The label column gives the codepoints, and the Padauk column shows the expected shaping. The 2nd and 4th lines in the table (with ksw in both the label and the style columns) shows that the language setting works.
image

@devosb
Copy link
Author

devosb commented Nov 7, 2024

Scheherazade New 4.300 as well shows the issue. The codepoints I used are 0628 0651 0650, you can see the expected shaping in the 0650/064E column. Red text indicates that the specified language is causing that bit of text to change. The tag rhg does not cause the expected shaping change with DWBox.

@miloush
Copy link
Owner

miloush commented Nov 8, 2024

Right, thank you. As I said DWBox passes any text for the language directly to DirectWrite. There is no DW API which would allow to supply OpenType tags directly, and the OT language tags specifically contain a space, so they are not valid BCP-47 subtags. DW therefore has to somehow come up with the OT script and language tag from the supplied BCP-47 tag. I am afraid it doesn't have the mapping for languages like Rohingya and S'gaw Karen yet, and I don't see a way how API callers can work around it.

@devosb
Copy link
Author

devosb commented Nov 8, 2024

Thanks for the helpful explanation, I appreciate it. Maybe I need a newer version of DirectWrite, as ksw and rhg are listed by Microsoft in their mapping of ISO 639-3 codes to OT language tags.

@miloush
Copy link
Owner

miloush commented Nov 8, 2024

I tried on the newest DirectWrite but these are not in yet. I forwarded the feedback and hope the OT mapping will be utilized.

@miloush miloush closed this as completed Nov 13, 2024
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

No branches or pull requests

2 participants