[X] Have you used the debugging guide to try to resolve the issue?
[X] Have you checked our FAQs to make sure your question isn't answered there?
[X] Have you checked to make sure your issue does not already exist?
[X] Have you checked you are on the latest release of Pulsar?
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, the span with the x 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)
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