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

SDF text rendering plugin #314

Open
wants to merge 60 commits into
base: main
Choose a base branch
from

Conversation

maxammann
Copy link
Collaborator

@maxammann maxammann commented Aug 5, 2024

video.webm

TODO:

  • Basic text collision
  • Draw text along lines
  • Custom source property
  • Dynamically loading protobufs
  • Caching protobufs
  • Unloading protobufs from GPU
  • Avoid overdrawing from labels of neithboring tiles

Q:

  • How many glaph textures do we want to have? One per tile? One per protobuf?
  • Where to cache data? Render thread/worker thread?
    • Likely render thread so we can share data between threads
    • Mabye BG if the requests cache

The basic implmenetation for SDFs is based on https://github.com/stadiamaps/maps-rs (licensed as MIT OR APACHE)

@maxammann maxammann mentioned this pull request Aug 5, 2024
1 task
@kylerchin
Copy link
Contributor

LETS GOOOOOO

Copy link

@michaelkirk michaelkirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Just a drive by review, my first peep at maplibre-rs code.

maplibre/src/render/eventually.rs Outdated Show resolved Hide resolved
@maxammann
Copy link
Collaborator Author

maxammann commented Aug 21, 2024

Language Lines Code Done
layout/circle_layout.hpp 164 120
layout/clip_lines.cpp 81 68
layout/clip_lines.hpp 14 10
layout/layout.hpp 43 33 🚧
layout/merge_lines.cpp 92 67
layout/merge_lines.hpp 30 21
layout/pattern_layout.hpp 210 183
layout/symbol_feature.hpp 37 29
layout/symbol_instance.cpp 222 189
layout/symbol_instance.hpp 132 115
layout/symbol_layout.cpp 1193 1000 🚧
layout/symbol_layout.hpp 145 104
layout/symbol_projection.cpp 532 377 🚧
layout/symbol_projection.hpp 77 65 🚧
text/bidi.hpp 43 25 ✅ without ICU
text/check_max_angle.cpp 83 54
text/check_max_angle.hpp 12 7
text/collision_feature.cpp 171 111
text/collision_feature.hpp 163 128
text/collision_index.cpp 467 357
text/collision_index.hpp 120 97
text/cross_tile_symbol_index.cpp 269 207
text/cross_tile_symbol_index.hpp 84 66
text/get_anchors.cpp 177 119
text/get_anchors.hpp 29 24
text/glyph_atlas.cpp 48 34 🚧
text/glyph_atlas.hpp 25 17 🚧
text/glyph_manager_observer.hpp 19 13
text/glyph_manager.cpp 176 137
text/glyph_manager.hpp 79 53
text/glyph_pbf.cpp 96 73
text/glyph_pbf.hpp 13 8
text/glyph_range.hpp 26 17
text/glyph.cpp 14 10 ✅ (missing AlphaImage)
text/glyph.hpp 135 108 ✅ (missing AlphaImage)
text/language_tag.cpp 214 102
text/language_tag.hpp 46 16
text/local_glyph_rasterizer.hpp 47 14
text/placement.cpp 1652 1356
text/placement.hpp 211 163
text/quads.cpp 336 259
text/quads.hpp 72 62
text/shaping.cpp 594 486
text/shaping.hpp 100 79
text/tagged_string.cpp 83 67
text/tagged_string.hpp 101 58

others:

  • i18n
  • utils
  • font_stack
  • image_atlas
  • feature_index
  • image
  • image_impl
  • geometry_tile_data

@kylerchin
Copy link
Contributor

When will this be merged?

@maxammann
Copy link
Collaborator Author

On time for Christmas 🤞

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

Successfully merging this pull request may close these issues.

3 participants