Detecting Supported Languages in a Font File #305
Anish-Someashwara
started this conversation in
General
Replies: 1 comment
-
Hey @lojjic what are your views over this ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Everyone,
I've noticed that Troika Text has a feature where it detects the language and automatically assigns a suitable font file based on Unicode font ranges. I'm interested in implementing a similar feature, but in reverse. Instead of detecting the font based on the language, I want to detect which languages are supported by a given font file.
I am thinking that this can be done by firstly parsing the font file using libraries like typr or opentype, and then inside the glyphs object, there are Unicode values given. So, those Unicode values can be matched with the Unicode ranges corresponding to different languages to detect language support.
Could anyone guide me on how to approach this?
And what is correct and efficient way of implementing this ?
What are the edge cases I need to keep in mind so that the result will be so accurate (for supported languages list) ?
I'd appreciate any insights or suggestions on how to achieve this.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions