Benedikt Stebner
981a0106a6
Introduce PathSegmentEllipsis TextTrimming ( #20077 )
* Introduce PathSegmentEllipsis TextTrimming
* Adjust fallback
* Second rework
* Add some tests
* Minor adjustments
* Adjust SplitResult usage
* Update MainWindow.axaml
Remove sample
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* More adjustments
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Use the correct width
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
9 months ago
Lin
e3dbedbcfa
Fixed the issue where a newline character required two backspaces to be deleted in Windows. ( #20073 )
* Fixed the issue where a newline character required two backspaces to be deleted in Windows.
* add unit test
* Handling the differences between HeadlessTextShaperStub and TextShaperImpl
* Make unit tests available
* Treat "\r\n" as a single unit.
* The backspace test against CRLF
* Backspace should treat CRLF as a unit.
10 months ago
Benedikt Stebner
f5fe25b2c6
Distribute LineGap evenly to top and bottom ( #19556 )
* Distribute LineGap evenly to top and bottom
* Add comment
* Add tests
* Fix line height override and add tests for it
* Remove extra spaces
11 months ago
Benedikt Stebner
c5efedb81a
Adjust GetBackspaceCaretCharacterHit ( #19586 )
* Adjust GetBackspaceCaretCharacterHit implementation so it works with codepoint boundaries
* Add a unit test
11 months ago
Benedikt Stebner
ec9f50db3d
Fixes TextLineImpl.GetTextBounds with trailing zero width ( #19616 )
* Fixes TextLineImpl.GetTextBounds with trailing zero width
* Add assert
1 year ago
Benedikt Stebner
b92bb933ac
TextLine.GetTextBounds zero width run fixes ( #19602 )
* Rework GetRunBounds
* Reduce duplication
* Update tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs
Co-authored-by: Jan Kučera <10546952+miloush@users.noreply.github.com>
---------
Co-authored-by: Jan Kučera <10546952+miloush@users.noreply.github.com>
1 year ago
Benedikt Stebner
27859b9e54
Rework TextLineImpl.GetTextBounds ( #19576 )
* Rework TextLineImpl.GetTextBounds
* Minor adjustments
* Fix GlyphRun.GetDistanceFromCharacterHit in cluster hit
1 year ago
Benedikt Stebner
f56babbab1
Fix buffer index calculation for the zero width character handling during hit testing ( #19488 )
1 year ago
Benedikt Stebner
a4b9eb3aab
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
1 year ago
Ahmed Elsayed
dc19c39df5
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.
1 year ago
Benedikt Stebner
44295dd73c
Fix TextLineIImpl.GetTextBounds for clustered trailing zero width characters ( #19208 )
* 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>
1 year ago
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
3 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
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
5 years ago