-
-
Notifications
You must be signed in to change notification settings - Fork 82
Use a positioned glyph font encoding for Devanagari #265
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
Conversation
|
Thank you for the great feedback @bdon. I think I address all concerns. The naming has been updated and I am currently running a planet build which should be ready for an updated demo in a few hours. Let me know what else needs to change... |
|
| List<String> scripts = fontRegistry.getScripts(); | ||
|
|
||
| for (String script : scripts) { | ||
| result.put("pgf:" + script.toLowerCase() + ":name", fontRegistry.getName(script)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't clear to me that pgf stands for "positioned glyph font", consider adding a comment above this line to explain that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I was also wondering if we have a schema documentation somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the inline comment in the code here, we should probably add a new "names.md" or localization.md file next to https://github.com/protomaps/docs/blob/main/basemaps/layers.md in the Protomaps docs repo?
Tilezen had this, which we should only lightly crib from.
Natural Earth's table of common languages is useful, too, and add a script column to that?
...snip...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stubbed out in new docs PR: https://github.com/protomaps/docs/pull/43/files




Encodes parts of strings that are in the Devanagari script with a positioned glyph font from https://github.com/wipfli/pgf-encoding.
Usage in style.json
Engish
To show a map localized to English one can do then something like this:
Nepali
For Nepali one can on the other hand do something like this:
Demo
Planet PMTiles
https://pub-726b01260c98468a9387cc0dfcb7386b.r2.dev/protomaps-planet-pgf-20240627.pmtiles (126 GB)
Nepali
Note: Only the
places_localitylayer was changed.https://pub-cf7f11e26ace447db8f7215b61ac0eae.r2.dev/ne.html
English
Note: Only the
places_localitylayer was changed.https://pub-cf7f11e26ace447db8f7215b61ac0eae.r2.dev/en.html
Todos
main()functions