c66da1013e
original bug was this: https://github.com/tldraw/tldraw/assets/469604/1bb3c401-4221-4981-b4d9-7325ea27944c it seemed to be related to how the Draw font specifically was kerning or something (maybe ligatures??), we don't really know. it seems to be only Chrome specific. See video: https://github.com/tldraw/tldraw/assets/469604/1a54ba78-ebd5-4ddf-9351-3ecc44a8702a Also, there's a line height issue when resizing vertically: https://github.com/tldraw/tldraw/assets/469604/b7b3ac16-70a6-476c-8f23-e619725799b6 So, to address these various things: - for the overflow bug (and related Draw font issue), we do `Math.ceil` to help with this fuzziness. I _think_ this will help but I'm not 100% certain this will help in all cases. - for the line height issue, we do `Math.floor` to avoid this subpixel wonkiness - for good measure, I made sure that the content & textarea rendering has matching CSS styles (things like `font-feature-settings`, etc.) the content now matches what the `textarea` has be default in Chrome's user agent styling. fuuuuuuun 🥳 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Release Notes - Text labels: fix some inconsistencies with rendering. |
||
---|---|---|
.. | ||
assets | ||
dotcom-shared | ||
editor | ||
namespaced-tldraw | ||
state | ||
store | ||
tldraw | ||
tlschema | ||
tlsync | ||
utils | ||
validate |