Skip to content

Allow arbitrarily many glyphs and sprites to be used in a style #141

Closed

Description

@kkaefer

In areas that have a lot of distinct glyphs (e.g. Akihabara, Tokyo), we're pushing the limits of the glyph atlas because not all glyphs fit into one texture.

Activity

  1. added this to the milestone on Jun 24, 2014
  2. modified the milestones: , on Aug 8, 2014
  3. modified the milestones: v0.3, v0.4 on Aug 27, 2014
  4. modified the milestone: v0.4 on Nov 4, 2014
  5. changed the title [-]Handle glyph atlas overflow[/-] [+]Handle glyph/sprite atlas overflow[/+] on Jan 14, 2015
  6. ansis commented on May 2, 2015

    @ansis
    Contributor

    We're using a two bytes to store texture coordinates. With the current 1024 texture we round coordinates to the nearest 4px. For bigger textures either we need to use more space for texture coordinates or we need to round to 8px.

    We could have multiple texture atlases and put glyphs in different buffers based on which atlas they are using. This could get annoying.

    Or we could just make separate glyph atlases for each fontstack. This could give us enough breathing room to avoid implementing resizing.

  7. kkaefer commented on May 2, 2015

    @kkaefer
    MemberAuthor

    Another optimization we could use is to optimize our font stacks. Contention for the texture space is only happening in areas with many glyphs, in particular Asian countries. However, in those areas, we're typically using either Arial Unicode MS or the Bold version thereof. Unfortunately, these are currently encoded as distinct glyphs for every font stack so that it's likely that we have the exact same glyph multiple times in our atlas.

  8. ansis commented on Jan 6, 2016

    @ansis
    Contributor

    an example style that hit the sprite atlas limit because of large fill patterns: #1633

    besides implementing resizing we could:

    • use separate textures for fill patterns (but this would break data driven fill patterns later on)
    • use a larger default size 1024x1024 instead of the current 512x512
  9. bhousel commented on Jan 6, 2016

    @bhousel
    Contributor

    Hey @ansis I have this mostly working in the glyph_overflow branch.. I'll finish it up and PR this week.

  10. changed the title [-]Handle glyph/sprite atlas overflow[/-] [+]Allow arbitrarily many glyphs and sprites to be used in a style[/+] on Jul 28, 2016
  11. added a commit that references this issue on Oct 24, 2016
  12. lucaswoj commented on Nov 14, 2016

    @lucaswoj
    Contributor

    The 🔥 need has been sufficiently doused by increasing the glyph atlas size that we can remove the high priority tag on this one.

  13. added a commit that references this issue on Jan 11, 2017
  14. added
    cross-platform 📺
    on Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cross-platform 📺feature 🍏

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions