[pulsar-next] Character width measurement is incorrect on Electron 30 #1102
Labels
bug
Something isn't working
pulsar-next
Related to the version of Pulsar that runs on the latest Electron
Thanks in advance for your bug report!
What happened?
On newer Electron, the text editor soft-wraps too early because
TextEditor
thinks that an individual character is wider than it actually is.These four characters are rendered hidden (I've just made them visible for illustration) and are used as examples of the width of a “normal” character, a double-width character, a half-width character, and a Korean character, respectively.
But with identical font settings, PulsarNext thought the character that had these metrics on Pulsar 1.121…
…was a bit wider and taller:
After some experimentation, I found that this is a side-effect of the
x
sharing a line with other characters — if I delete the other three, thespan
with thex
reverts to the width we expect.So we can isolate the four characters in different block-level elements to eliminate any possible effects on one another. We should also change the metric that computes the editor line height by having it measure each of those four block elements and picking the tallest one.
I know this will get lost in the weeds unless I write it down here; this is basically a note to my future self.
Pulsar version
some weird version with Electron 30
Which OS does this happen on?
❓ Other(Please specify in the OS details field below)
OS details
N/A
Which CPU architecture are you running this on?
None
What steps are needed to reproduce this?
Additional Information:
No response
The text was updated successfully, but these errors were encountered: