fix(tldraw): correct v2 text rendering - font sizes, fonts, line he…#70
fix(tldraw): correct v2 text rendering - font sizes, fonts, line he…#70
Conversation
…ght, and text wrapping tldraw v2 whiteboard text shapes were misaligned with pen marks drawn over them due to incorrect font sizes, wrong font families, missing text width constraint, and wrong line height in the renderer. - Fix v2 font sizes to match bbb-export-annotations (S:18, M:24, L:36, XL:44) - Use correct v2 font families (IBM Plex Sans/Serif/Mono, Shantell Sans) - Add v2 fonts (IBMPlexSans, IBMPlexSerif, IBMPlexMono, Shantell_Sans) - Constrain text width to shape width for proper word wrapping - Apply 1.35x line height multiplier matching tldraw v2 client - Reset pan/zoom on slide change to prevent stale zoom carry-over
| ) | ||
|
|
||
| TEXT_OUTLINE_WIDTH: float = 2.0 | ||
| # tldraw v2 line height multiplier (from bbb-export-annotations/shapes/TextShape.js) |
There was a problem hiding this comment.
Please find a reference in the actual client rendering code, not the bbb-export-annotations code.
There was a problem hiding this comment.
The changes made here break compatibility with processing recordings made with tldraw v1. Recording processing needs to be backwards compatible.
There was a problem hiding this comment.
This change appears to be unrelated.
For compatibility reasons with older BBB versions, the pan/zoom of a slide needs to be preserved when switching back to a previously used slide. There is a lot of code in the tool which is there just to preserve the pan/zoom and this change is a hack job that causes that code to still run, but no longer be functional.
| SizeStyle.LARGE: 96, | ||
| SizeStyle.L: 54, | ||
| SizeStyle.XL: 64, | ||
| # tldraw v2 text font sizes (from bbb-export-annotations/shapes/Shape.js) |
There was a problem hiding this comment.
Please find a reference in the BBB client code for the font sizes, not bbb-export-annotations.
|
Note that there is another scaling issue affecting line widths and some other features of drawings: #66 - my original suspicion was that this was related to the font sizes being wrong, since the scaling of font sizes and scaling of line widths appears to be similar. It would be good to confirm whether the issue is just the font sizes being changed, or if there is a more fundamental scaling issue. |
…ight, and text wrapping
tldraw v2 whiteboard text shapes were misaligned with pen marks drawn over
them due to incorrect font sizes, wrong font families, missing text width
constraint, and wrong line height in the renderer.