Skip to content

v0.2.4

Latest

Choose a tag to compare

@willwade willwade released this 22 Aug 08:07
8825d6c

What's Changed

  • feat(capi): frontend-supplied text measurement by @willwade in #57

Notable changes

Fixes the jumbled/overlapping letters at deep zoom reported on Dasher-Windows (#56, Dasher-Windows #28): label layout no longer guesses text widths.

  • New dasher_set_text_size_callback(): frontends measure text with the same font they draw opcode-5 commands with; results are cached per label × size so steady-state frames make zero callbacks. Registering before dasher_set_screen_size is fine.
  • New dasher_text_metrics_changed(): invalidates cached measurements after the canvas font changes.
  • Fallback estimate now counts UTF-8 code points, not bytes (accented text previously measured 2× its glyph count).
  • A failing measurement falls back to the estimate without caching, so a not-yet-ready font system retries next frame.

Frontend action required to benefit: wire the callback (one function + an invalidate call on font change). Until then, behaviour matches v0.2.3 except the codepoint-count fix.

Full Changelog: v0.2.3...v0.2.4

What's Changed

  • feat(capi): frontend-supplied text measurement (fixes #56) by @willwade in #57

Full Changelog: v0.2.3...v0.2.4