Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

using system fonts #260

Closed
ansis opened this issue May 28, 2014 · 3 comments
Closed

using system fonts #260

ansis opened this issue May 28, 2014 · 3 comments

Comments

@ansis
Copy link
Contributor

ansis commented May 28, 2014

It seems like it is possible to access system fonts on mobile devices, which could be useful for fallback and supporting CJK. Actually, I can't check if it is possible so it might not be, but hopefully:

On iOS its possible to read system fonts through CGFont. http://stackoverflow.com/a/9381326
http://support.apple.com/kb/HT5878
http://support.apple.com/kb/ht5484

On Android, fonts in /system/fonts/ might be directly readable. Android has less included fonts but Droid Sans Fallback covers everything including CJK.

Two parts of using system fonts:

  1. Rendering sdfs for glyphs. Either like fontserver or directly from the vector shapes.
  2. Shaping. Including harfbuzz or something should work, but how big are the shaping databases @kkaefer? If they are too big, could we include only some? Even if we have poor man's shaping, system fonts get us CJK.

This would cut out some font transferring and some licensing issues, but fallback fonts would vary across platforms. Stylistically, is this ok?

@kkaefer @mikemorris @yhahn

@yhahn
Copy link
Member

yhahn commented May 28, 2014

I did voice on some of these ideas with @mikemorris yesterday -- in general I think we should stay away from working with fonts directly on mobile devices for now.

@mikemorris
Copy link
Contributor

I'm intrigued by the possibility of extracting a pure C++ library from fontserver for rendering SDFs and shaping from fonts on device (whether system or shipped), but from talking with @yhahn it doesn't sound like this is an approach we want to require developers to take when shipping maps with custom fonts, plus we would have to find a different solution for WebGL anyway.

@hanchao hanchao mentioned this issue Jun 11, 2014
3 tasks
@jfirebaugh
Copy link
Contributor

Revisit later, maybe.

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

No branches or pull requests

4 participants