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

using system fonts #260

Closed
Closed

Description

@ansis

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

Activity

  1. yhahn commented on May 28, 2014

    @yhahn
    Contributor

    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.

  2. mikemorris commented on May 28, 2014

    @mikemorris
    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.

  3. jfirebaugh commented on Aug 29, 2014

    @jfirebaugh
    Contributor

    Revisit later, maybe.

  4. added this to the milestone on Apr 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions