Skip to content

Conversation

Drulokia
Copy link
Collaborator

1. textBaseline Implementation for SDF Renderer

  • Fixed textBaseline positioning: Previously, SDF renderer incorrectly used verticalAlign for baseline calculations in getStartConditions.ts
  • Added proper textBaseline support with all standard values:
    • 'alphabetic' (default) - baseline at Y coordinate
    • 'top' - top of text bounding box
    • 'middle' - middle of text bounding box
    • 'bottom' - bottom of text bounding box
    • 'hanging' - hanging baseline (96% of ascender)
    • 'ideographic' - ideographic baseline (similar to bottom)

2. Changes to the verticalAlign

  • Updated getStartConditions to use textBaseline instead of verticalAlign for baseline calculations
  • Enhanced layoutText function to properly handle both properties independently
  • Improved vertical alignment calculations that work correctly with textBaseline
  • Default verticalAlign is now top

@wouterlucas
Copy link
Contributor

This too will need to be rebased/refactored into #585 as we're not going to continue with the old Text engine implementation

@wouterlucas wouterlucas linked an issue Jul 22, 2025 that may be closed by this pull request
15 tasks
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.

Font Engine refactor and features
2 participants