Benedikt Stebner
038fa34f3d
Rework TextLineImpl.GetTextBounds ( #19576 )
* Rework TextLineImpl.GetTextBounds
* Minor adjustments
* Fix GlyphRun.GetDistanceFromCharacterHit in cluster hit
5 months ago
Benedikt Stebner
4b83190afe
Fix buffer index calculation for the zero width character handling during hit testing ( #19488 )
6 months ago
Benedikt Stebner
9e6287d191
Fix overhang calculation ( #19013 )
* - Adjusts the overhang calculation so it matches what WPF produces
- Fixes baseline alignment for inline controls
* Adjust OverhangTrailing
Add unit test
* Only run overhang unit test on Windows
6 months ago
Ahmed Elsayed
3dff273a9c
fix: Selecting multiple lines in RTL textbox ( #19093 )
* Reverse text runs for RTL flow direction
* Optimize text run traversal.
* Remove unused LINQ directive from TextLineImpl.cs
* Add RTL newline handling test in TextLineTests
* Add RTL newline handling tests for text formatting.
7 months ago
Benedikt Stebner
4f3af7e0fb
Fix TextLineIImpl.GetTextBounds for clustered trailing zero width characters ( #19208 ) ( #19251 )
* Make sure we only apply the cluster offset if we are inside the current cluster
* Better naming
* Guard coveredLength against invalid values
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
7 months ago
Benedikt Stebner
b752c32481
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
9 months 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
1 year 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 )
2 years ago
Benedikt Stebner
da3d4ca5c2
Fix TextLayout.OverhandLeading calculation ( #13287 )
* Fix overhand leading calculation
* Fix test on Mac
* Fix tests
2 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>
2 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
3 years ago
Benedikt Stebner
f432d6f0a9
Fix GetTextBounds for combinations of EndOfParargrap and embedded RTL text
3 years ago
Benedikt Stebner
f307b7364a
Fix TextLineImp GetTextBounds
Fix Tab character handling
3 years ago
Benedikt Stebner
edbfd96b2d
Simply ShapedBuffer GlyphInfos access
3 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
3 years ago
Benedikt Stebner
42f8c58aef
Update teste for the new typeface
3 years ago
Benedikt Stebner
14fba2e53a
Rework HitTestTextRange
3 years ago
Julien Lebosquain
4144be11fe
Pass GlyphInfo directly to GlyphRun
3 years ago
Julien Lebosquain
dec8c1c586
Used Memory/Span instead of CharacterBufferReference/Range
+ GlyphRun uses ReadOnlyMemory for characters
3 years ago
Sergey Mikolaitis
5fef8af151
[Text] [Rename] ShapeableTextCharacters to UnshapedTextRun and ShapedTextCharacters to ShapedTextRun
3 years ago
Benedikt Stebner
9f309415c1
Allow to process non text TextRuns
Add TextEndOfLine to a TextLine's TextRuns
3 years ago
Benedikt Stebner
895d85aa89
Implement CharacterBufferReference and related classes
3 years ago
Benedikt Stebner
17b2834d21
Implement letter spacing
3 years ago
Giuseppe Lippolis
ac9cdda48c
fix: Missing CA1802
3 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
4 years ago
Benedikt Stebner
0cdbd53bc3
Rewrite TextBounds test
4 years ago
Benedikt Stebner
3e6bc0b48d
Some more hit testing fixes
4 years ago
Benedikt Stebner
59d8f86509
Better WPF compat
Disable run sort
4 years ago
Benedikt Stebner
4f283dca13
Fix some tests
4 years ago
Benedikt Stebner
e7e7a95e5d
Try to fix GetDistanceFromCharacterHit for drawable runs
4 years ago
Benedikt Stebner
55d28216a7
Use ForgroundProperty directly where possible
4 years ago
Benedikt Stebner
9250d93407
Implement embedded runs
Improve text edit navigation
Implement IncrementalTabWidth
4 years ago
Dariusz Komosinski
1273448981
API changes and test fixes.
4 years ago
Dariusz Komosinski
6bcf9c2973
Refactor text trimming and implement prefix trimming.
4 years ago