CharSizeService measures different heights on various devices #5347
Replies: 1 comment 1 reply
-
Yupp, thats basically caused by the font renderer of the browser engine with its glyph rasterizer and layouter. While it is technically possible to do all the low level aspects of font rendering yourself to have better control at pixel level, that is most likely not a good idea with Typescript/Javascript for performance reasons (even the webgl renderer just uses the browser API for glyph creation). If you are really keen to get this done yourself, you prolly could write your own canvas/webgl renderer in WASM with own font rendering primitives. With WASM the performance would not suffer that much... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I noticed that the CharSizeService results in different lineHeights. I tried to rule out:
The font (Victor Mono NerdFont) in woff2 format is requested in size: 16 and lineHeight: 1.0
I looked at the span's attributes:
span class="xterm-char-measure-element" aria-hidden="true" style="font-family: "Victor Mono NF"; font-size: 16px;">W</span
The measurements are:
On a distributed system, where many users see the same window (where it is also placed on a grid) and mouse pointers are shared, one cannot reliably point to a character or line, if the size is different on the devices.
I understand that this is basically an effect of the browsers font rendering. My question is, if someone has experienced this and found a workaround?
Thanks,
MIchael.
Beta Was this translation helpful? Give feedback.
All reactions