Skip to content

feat(ios): add textAlignment#403

Draft
kacperzolkiewski wants to merge 5 commits intomainfrom
@kacperzolkiewski/text-alignment
Draft

feat(ios): add textAlignment#403
kacperzolkiewski wants to merge 5 commits intomainfrom
@kacperzolkiewski/text-alignment

Conversation

@kacperzolkiewski
Copy link
Collaborator

@kacperzolkiewski kacperzolkiewski commented Jan 29, 2026

Summary

  1. Add textAlignment support on iOS
  2. Change ZWS from \u200B to \u200A
  • Reasoning: When textAlignment is set to center or right, the layout manager incorrectly calculates line geometry for lines containing only \u200B, often resulting in a collapsed input height. Switching to \u200A forces the layout engine to recognize the line's existence, ensuring correct height and rendering for all alignments.
  • Known Limitation: Since \u200A is a visible character with non-zero width, it may appear as a visible space when used within monospaced fonts (e.g., Code Blocks). This happens because monospaced fonts force all characters, including hair spaces, to have the same fixed width.
Screen.Recording.2026-01-30.at.10.13.39.mov

Test Plan

Run example app and play with textAlignment when different styles are toggled.
Check if paragraphs/lists with different textAlignment than left are properly parsed and contain style="text-align:center|right|justify" inside HTML

Screenshots / Videos

Screen.Recording.2026-01-30.at.10.09.52.mov

Compatibility

OS Implemented
iOS
Android

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.

1 participant