-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Allow arbitrarily many glyphs and sprites to be used in a style #141
Comments
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. |
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. |
an example style that hit the sprite atlas limit because of large fill patterns: #1633 besides implementing resizing we could:
|
Hey @ansis I have this mostly working in the |
Hide internal events from end user and standardize external events
The 🔥 need has been sufficiently doused by increasing the glyph atlas size that we can remove the high priority tag on this one. |
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.
The text was updated successfully, but these errors were encountered: