Skip to content

Refactor text rendering for tldraw2#71

Merged
antobinary merged 2 commits into
mainfrom
tldraw2-text
Apr 7, 2026
Merged

Refactor text rendering for tldraw2#71
antobinary merged 2 commits into
mainfrom
tldraw2-text

Conversation

@kepstin

@kepstin kepstin commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

With tldraw2, there's a new set of fonts, the standard font sizes have changed, line spacing has changed, and the properties used to indicate text alignment and the size of text boxes have changed as well.

The text rendering code has been adjusted to be more flexible for handling line height and alignment, and many of the tldraw2 specific shapes that use text are updated to have correct rendering.

Some changes have been made regarding using the correct colours for tldraw2 shapes, but this is not yet complete. Support for shape opacity has been updated to align with the tldraw rendering.

This PR does not fix the issues with line thickness in shape rendering. The current shape rendering used in geo shapes is based on the old tldraw1 rendering code, and needs to be rewritten to match the actual tldraw2 rendering.

Fixes #67

kepstin added 2 commits April 2, 2026 14:15
With tldraw2, there's a new set of fonts, the standard font sizes have
changed, line spacing has changed, and the properties used to indicate
text alignment and the size of text boxes have changed as well.

The text rendering code has been adjusted to be more flexible for
handling line height and alignment, and many of the tldraw2 specific
shapes that use text are updated to have correct rendering.

Some changes have been made regarding using the correct colours for
tldraw2 shapes, but this is not yet complete. Support for shape opacity
has been updated to align with the tldraw rendering.

This PR does not fix the issues with line thickness in shape rendering.
The current shape rendering used in geo shapes is based on the old
tldraw1 rendering code, and needs to be rewritten to match the actual
tldraw2 rendering.
@kepstin

kepstin commented Apr 6, 2026

Copy link
Copy Markdown
Contributor Author

Here's some images to show the differences.

Old bbb-presentation-video:

Reference rendering (in-browser tldraw):
Screenshot 2026-03-20 at 16-07-33 BigBlueButton - tldraw-shape-test - Default presentation view

New bbb-presentation-video:

@ffdixon

ffdixon commented Apr 6, 2026

Copy link
Copy Markdown
Member

Looks much better!

@Tainan404 Tainan404 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested and worked well

@antobinary antobinary merged commit 6b10d7a into main Apr 7, 2026
4 checks passed
@kepstin kepstin deleted the tldraw2-text branch April 7, 2026 16:07
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.0] Cyrillic text added by Text tool is unreadable on additional format (mp4 video) record

4 participants