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.

TextBlock text wrapping: Sometimes duplicates and leaves characters behind on wrap

See original GitHub issue

Development Setup

Bug description

Sometimes, when wrapping, certain characters are left behind on text wrapping and show up in two places. This only seems to happen with the NotoSans-Italic font (in repro project below); with normal font or default Windows font w/Italic FontStyle, things wrap properly.

This is easiest shown by a picture:

text-wrapping

Notice how “applies” gets broken up on text wrapping – the “a” is left on the first line and appears again on the second line with the rest of the word.

I’m not sure if the --auth line breaking is working right either? I’d prefer that to show up on one line, since there’s room, but that’s debatable. Edit: As Gillibald mentioned, this is working properly, and the non-breaking hyphen (\u2011) works great in my app.

XAML:

<TextBlock Text="Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
             Margin="0,4,0,0"
             Width="238"
             FontFamily="avares://ItalicTextWrapping/Assets/NotoSans-Italic.ttf#Noto Sans"
             TextWrapping="Wrap"/>

Repo for easy reproducing: https://github.com/Deadpikle/AvaloniaBugs/tree/master/ItalicTextWrapping

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
Gillibaldcommented, Jul 7, 2020

#4240 I think I finally fixed this. Still have to verify 😅

1reaction
Gillibaldcommented, Mar 11, 2020

This issue is super weird. Somehow Skia renders an extra character with this particular font.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextBlock TextWrapping not wrapping - wpf
When I place a TextBlock inside of a Horizontally Aligned StackPanel it does not wrap. I realize that this is because the available...
Read more >
Text jumping around in text box. NOT related to text wrap.
Solved: We are having an issue with some of the text jumping around in the text block while we are making edits to...
Read more >
Text — SVG 2
In SVG, when the containing text block does not have a fixed geometry (as with pre-formatted text), the line box tightly wraps the...
Read more >
Why does a Microsoft Word document almost always get ...
The main reason is the default formatting when the image is inserted. Following the insertion, right click the image and select Wrap Text....
Read more >
Get rid of extra space in cell when using Text Wrap
Click on Column header of the "wrapped cells" to select whole column. Widen the column by dragging the right divider. Remove and re-add...
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