question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TextMetrics.wordWrap() ignores TextStyle.letterSpacing

See original GitHub issue

Hey everyone, I found an issue with TextMetrics.wordWrap, which also effects TextMetrics.measureText & TextMetrics.measureFont. The wordwrap function does not account for letterSpacing values larger than 0.

jsfiddle

https://jsfiddle.net/brenwell/59660ayb/

I will make a pull request with the fix

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
brenwellcommented, Dec 20, 2017

I found that my pull request has improved the calculation but not completely fixed it. I am working on a slightly improved version.

Also want to confirm that this is a bug that needs fixing and not an issue with how I was using TextMetrics??

0reactions
lock[bot]commented, Jul 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextMetrics.wordWrap() ignores TextStyle.letterSpacing #4544
Hey everyone, I found an issue with TextMetrics.wordWrap, which also effects TextMetrics.measureText & TextMetrics.measureFont.
Read more >
PIXI.Text - PixiJS API Documentation
A Text can be created directly from a string and a style object, which can be generated here. new PIXI.Text (text, style, canvas)...
Read more >
How do I set letterSpacing for whole app in Flutter?
Just experiment on the properties to set and observe which text changes (e.g. bodyText2: const TextStyle(letterSpacing: 10,) ).
Read more >
Success
fbxWelcomeBoxName{display:block;font-weight:bold;width:112px;word-wrap:break-word} . ... textMetrics{border:none;height:1px;overflow:hidden;padding:0 ...
Read more >
Keeping track of letter-spacing, some guidelines | CSS-Tricks
Letter-spacing, or character spacing, is the area between all letters in a ... in the source, and ignores any text transforms applied to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found