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

Creating universal fallback fonts #16

Closed
bdon opened this issue Dec 16, 2022 · 5 comments · Fixed by #28
Closed

Creating universal fallback fonts #16

bdon opened this issue Dec 16, 2022 · 5 comments · Fixed by #28
Labels
good first issue Good for newcomers

Comments

@bdon
Copy link
Collaborator

bdon commented Dec 16, 2022

The current version of font-maker is good at converting custom fonts for a single language, but global map use cases need multilingual fallbacks, ideally covering as much of basic Unicode as possible.

Discussed in MapLibre eastern call: maplibre/maplibre#154

Some font options are:

  • Arial Unicode MS (Licensing ??)
  • Noto / Source
  • DejaVu

The existing solutions are to find SDF font stacks somewhere, but there isn't an up-to-date reproducible way to build these universal font stacks.

We need to:

@bdon
Copy link
Collaborator Author

bdon commented Aug 20, 2023

@bdon
Copy link
Collaborator Author

bdon commented Aug 22, 2023

Build using a downloaded copy of https://github.com/notofonts/notofonts.github.io

@bdon bdon added the good first issue Good for newcomers label Aug 22, 2023
bdon added a commit that referenced this issue Aug 22, 2023
* fix memory leak in wasm worker [#21]

* worker: move freeing font data to end [#21]

* Update example scripts to build off the noto repository. [#16]

* Ignore CJK since they will never get rendered in MapLibre with default settings.
* Fix file paths and remove unavailable fonts.

* command line has name override option [#16]

* set a single output name e.g. Noto Sans Regular instead of determining one from fonts, which may be too long.

* Web worker passes 0 for face name override [#16]
@neodescis
Copy link

I was scrounging for the Noto universal font and stumbled on this. It would be great if Font Maker could do this. I'm not sure if it's helpful, but I did manage to find this repo that is supposed to be able to combine the multiple Noto Sans fonts, but I couldn't get it to build:

https://github.com/openmaptiles/fonts

@bdon
Copy link
Collaborator Author

bdon commented Sep 16, 2023

@neodescis you can download a Noto build based on the code here at Releases:

https://github.com/maplibre/font-maker/releases

@bdon
Copy link
Collaborator Author

bdon commented Oct 29, 2023

I'm going to close this issue in favor of scripts and committed font glyphs in https://github.com/protomaps/basemaps-assets, for a couple reasons:

  • Recognition that all simple codepoint -> glyph mappings are opinionated and no universal font is going to work for all MapLibre users, languages and scripts. Just as MapLibre GL is not opinionated about the particular layers and tags in tiles, font-maker shouldn't be opinionated about fontstack names or choice of Arabic variant scripts. That will happen in a downstream repo at https://github.com/protomaps/basemaps-assets
  • Having a dedicated assets repo means we can serve glyphs through the GitHub CDN, and we don't need to clutter another repo with hundreds of files.
  • Downloading a zip file of the entire contents is simple and obvious with a dedicated assets repo, as opposed to needing to make GitHub releases manually.

cc @ChrisLoer @pnorman

@bdon bdon closed this as completed in #28 Oct 30, 2023
bdon added a commit that referenced this issue Oct 30, 2023
* Migrate Noto examples to downstream repo [#16]

* Because any fontstack that maps 1 codepoint to 1 glyph is specific to a style and use case, migrate the examples out.
* new repo (protomaps/basemaps-assets) also handles CDN and ZIP distribution of example font.

* fix build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants