Benedikt Stebner
aaf6fe9cb6
Multiple TextLine.GetTextRunBounds fixes ( #18749 )
* Adjust TextLineImpl.GetTextRunBounds so it properly handles substitutions
Adjust TextLineImpl.GetTextRunBounds so it properly reports out of text range bounds
Adjust TextLineImpl.GetTextRunBounds so it properly reports text source run indices
* Remove redundant comments
* Add requested changes
1 year ago
Benedikt Stebner
432fbe8a9e
Do not shape and render null terminator ( #17119 )
* Ignore null terminator and replace them with a zero space before shaping
* Replace multiple null terminators at random positions
2 years ago
Sergey Mikolaytis
20b5c2b880
[Text] Fix infinite loop hang on selection of bidi text ( #16306 )
* [Text] fix infinite loop hang on selection of bidi text
* Deal with zero width whitespaces during run bounds calculation
* Do the same thing for RTL
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
2 years ago
Julien Lebosquain
3fa13d3b64
Warning cleanup 2 ( #13696 )
3 years ago
Benedikt Stebner
da3d4ca5c2
Fix TextLayout.OverhandLeading calculation ( #13287 )
* Fix overhand leading calculation
* Fix test on Mac
* Fix tests
3 years ago
Benedikt Stebner
b83a5eb8b7
[Text] Fix hit testing issues ( #13155 )
* Repro for Line_Formatting_For_Oversized_Embedded_Runs_Does_Not_Freeze
* Repro for Line_With_IncrementalTab_Should_Return_Correct_Backspace_Position
* Fix GetBackspaceCaretCharacterHit
Fix GetPreviousCaretCharacterHit
Fix WrapWithOverflow for not text runs
* Fix custom font manager
* Move DejaVuSans to a different location to prevent using it as a fallback
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
3 years ago
Benedikt Stebner
bd3f097895
Adjust behavior to match what WPF expects
3 years ago
Benedikt Stebner
1e64c51879
Adjust test
3 years ago
Benedikt Stebner
9c94158ae7
Make sure TextLine.GetCharacterHitFromDistance for mixed buffers
3 years ago
Benedikt Stebner
250743d786
Rework GetNext/PreviousCharacterHit
3 years ago
Benedikt Stebner
c2bbdf80b1
Remove redundant usings
3 years ago
Benedikt Stebner
e7c31e7de8
Fix combined TextRunBounds
3 years ago
Benedikt Stebner
bfdd3fa325
Prevent infinite loop
3 years ago
Benedikt Stebner
460ea0e093
Rework TextLine GetTextBounds and GetDistanceFromCharacterHit
Fix TextAlignment.Right offset calculation
3 years ago
Benedikt Stebner
f153c626f8
Fix TextLineImpl.GetCharacterHitFromDistance for lines that include a TextEndOfLine run
Fix overhang handling to prevent clipped text for slanted glyphs
Fix TextBox selection issues
3 years ago
Max Katz
4aa6035ec3
Reuse text and geometry related headless mocks in Avalonia unit tests and benchmarks
3 years ago
Benedikt Stebner
8df3b34032
Add TextEndOfLine runs to TextBounds.TextRunBounds
4 years ago
Benedikt Stebner
f432d6f0a9
Fix GetTextBounds for combinations of EndOfParargrap and embedded RTL text
4 years ago
Benedikt Stebner
f307b7364a
Fix TextLineImp GetTextBounds
Fix Tab character handling
4 years ago
Benedikt Stebner
edbfd96b2d
Simply ShapedBuffer GlyphInfos access
4 years ago
Benedikt Stebner
1ecdf32520
Remove trailing whitespace for right aligned text
Fix justification for non wrapped text
Fix text trimming for RTL flow direction
4 years ago
Benedikt Stebner
42f8c58aef
Update teste for the new typeface
4 years ago
Benedikt Stebner
14fba2e53a
Rework HitTestTextRange
4 years ago
Julien Lebosquain
4144be11fe
Pass GlyphInfo directly to GlyphRun
4 years ago
Julien Lebosquain
dec8c1c586
Used Memory/Span instead of CharacterBufferReference/Range
+ GlyphRun uses ReadOnlyMemory for characters
4 years ago
Sergey Mikolaitis
5fef8af151
[Text] [Rename] ShapeableTextCharacters to UnshapedTextRun and ShapedTextCharacters to ShapedTextRun
4 years ago
Benedikt Stebner
9f309415c1
Allow to process non text TextRuns
Add TextEndOfLine to a TextLine's TextRuns
4 years ago
Benedikt Stebner
895d85aa89
Implement CharacterBufferReference and related classes
4 years ago
Benedikt Stebner
17b2834d21
Implement letter spacing
4 years ago
Giuseppe Lippolis
ac9cdda48c
fix: Missing CA1802
4 years ago
Benedikt Stebner
678620422d
More RTL hit testing fixes
4 years ago
Benedikt Stebner
eb627f393c
More fixes
4 years ago
Giuseppe Lippolis
543fe599c6
fix: some nullable annotation warnings
4 years ago
Benedikt Stebner
006aef2388
Rework hit testing to not rely on cluster values and instead use the currently covered TextSourceLength
4 years ago
Benedikt Stebner
17b9f246f3
Text hit testing fixes
4 years ago
Benedikt Stebner
005907a93b
More hit testing fixes for embedded content runs
5 years ago
Benedikt Stebner
0cdbd53bc3
Rewrite TextBounds test
5 years ago
Benedikt Stebner
3e6bc0b48d
Some more hit testing fixes
5 years ago
Benedikt Stebner
59d8f86509
Better WPF compat
Disable run sort
5 years ago
Benedikt Stebner
4f283dca13
Fix some tests
5 years ago
Benedikt Stebner
e7e7a95e5d
Try to fix GetDistanceFromCharacterHit for drawable runs
5 years ago
Benedikt Stebner
55d28216a7
Use ForgroundProperty directly where possible
5 years ago
Benedikt Stebner
9250d93407
Implement embedded runs
Improve text edit navigation
Implement IncrementalTabWidth
5 years ago
Dariusz Komosinski
1273448981
API changes and test fixes.
5 years ago
Dariusz Komosinski
6bcf9c2973
Refactor text trimming and implement prefix trimming.
5 years ago
Benedikt Stebner
1db3296611
Fix TextBlock/TextPresenter measure/arrange
Fix TextTrimming for small width
Fix text splitting
Fix text editing shortcuts
5 years ago
Benedikt Stebner
b815a22d5a
Port WPF's FormattedText to Avalonia and rework TextPresenter
5 years ago
Benedikt Schroeder
08a72e893c
Increase TextFormatter compatibility with WPF's version
6 years ago
Benedikt Schroeder
a2a0fba1c2
Ignore invisible characters
6 years ago
Benedikt Schroeder
7727722cb3
Make sure to always return a valid CharacterHit for next / previous CharacterHit
6 years ago