Benedikt Stebner
51443cb089
Fix FontCollection MatchCharacter ( #19494 )
* Fix FontCollection.MatchCharacter usage inside the FontManager implementation
Fix default MatchCharacter implementation
Add a unit test
* Reuse existing font collection key
* Fix resm FontFamilyIdentifier
* Fix FontFamily definition
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
6 months ago
Benedikt Stebner
da52b7246f
Do not treat combining marks as whitespace ( #19498 )
* Do not treat spacing combining marks as whitespace
* Do not treat combining marks as whitespace
Try to find a matching typeface on a grapheme boundary
* Add embedded font for testing
* Remove using
* Fix naming and remove redundant code
* Apply default until we reach the next base character
6 months ago
Jan Kučera
21b5812746
Text API sample app ( #19455 )
* xml documentatation for paragraph properties
* TextTestApp
* text test files renamed parameter
* glyph ink bounds
* shaped buffer make selected row visible
* text test app force light theme
* text test app distinguish start and end distance marks
---------
Co-authored-by: Jan Kučera <miloush@users.noreply.github.com>
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
6 months 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>
7 months ago
Compunet
84e62d67f9
[TextTrimming] Fixed some text trimming bugs ( #17998 )
* Trim text-runs in their logical order
* Revert breaking changes
* Added TODO12 comment
* Added test unit
* Use LogicalTextRunEnumerator
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
1 year ago
Compunet
7071c7a8d6
Reset bidi levels of trailing whitespace after text wrapping (According to TR9 guidelines) ( #17924 )
* Reset bidi levels of trailing whitespaces to paragraph embedding level after text wrapping
* Added unit tests
1 year ago
Compunet
e913c895ec
Fixed an issue RTL wrapped text calculates an extra line for the control desired size ( #17209 )
* Always Return 0 bidi level for TextEndOfLine run
* Fix test unit
* Expand the unit test
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
1 year ago
Benedikt Stebner
2a7b5568b7
Make sure non text runs are properly ordered by the bidi reorder logic ( #14183 )
2 years ago
Julien Lebosquain
3fa13d3b64
Warning cleanup 2 ( #13696 )
2 years ago
Benedikt Stebner
bbe4ad8755
Fix TextWrapping for all modes when nothing fits into a line ( #13241 )
* TextFormatter freeze repro
* Fix emergency text wrapping for all wrapping modes
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
2 years ago
Benedikt Stebner
ba3773714b
Fix text wrapping for languages like chinese that can break at all characters and not just at spaces ( #13193 )
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
f8ec196e2f
Fix text hit testing for invisible runs ( #13135 )
* Repro unit test for GetCharacterHitFromDistance being broken with hidden runs
* Repro for infinite loop in GetTextBounds
* Fix failing tests
* Fix GetRunBoundsRightToLeft
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
2 years ago
Benedikt Stebner
2f67ca23f9
Fix emergency text wrapping for some unicode sequences
3 years ago
Benedikt Stebner
beb57b646c
Fix test font typeface loading
3 years ago
Giuseppe Lippolis
3f306b48ab
fix(DrawingContext): CS0618 PushPreTransform(Matrix)' is obsolete: 'Use PushTransform'
```bash
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' Avalonia.Direct2D1.RenderTests, Avalonia.Skia.RenderTests .\tests\Avalonia.RenderTests\Media\ConicGradientBrushTests.cs 203 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' Avalonia.Direct2D1.RenderTests, Avalonia.Skia.RenderTests .\tests\Avalonia.RenderTests\Media\LinearGradientBrushTests.cs 98 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' Avalonia.Direct2D1.RenderTests, Avalonia.Skia.RenderTests .\tests\Avalonia.RenderTests\Media\RadialGradientBrushTests.cs 188 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' Avalonia.Direct2D1.RenderTests, Avalonia.Skia.RenderTests .\tests\Avalonia.RenderTests\Media\TextFormatting\TextLayoutTests.cs 315 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' Avalonia.Skia.UnitTests .\tests\Avalonia.Skia.UnitTests\Media\TextFormatting\TextFormatterTests.cs 795 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' ControlCatalog (netstandard2.0) .\samples\ControlCatalog\Pages\CustomDrawingExampleControl.cs 136 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' ControlCatalog (netstandard2.0) .\samples\ControlCatalog\Pages\CustomDrawingExampleControl.cs 140 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' ControlCatalog (netstandard2.0) .\samples\ControlCatalog\Pages\CustomDrawingExampleControl.cs 144 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' ControlCatalog (netstandard2.0) .\samples\ControlCatalog\Pages\CustomDrawingExampleControl.cs 146 Active
Warning CS0618 'DrawingContext.PushPostTransform(Matrix)' is obsolete: 'Use PushTransform' RenderDemo .\samples\RenderDemo\Pages\RenderTargetBitmapPage.cs 32 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' Avalonia.Base (net6.0), Avalonia.Base (netstandard2.0) .\src\Avalonia.Base\Media\DrawingGroup.cs 76 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' Avalonia.Direct2D1.RenderTests, Avalonia.Skia.RenderTests .\tests\Avalonia.RenderTests\Controls\CustomRenderTests.cs 91 Active
Warning CS0618 'DrawingContext.PushPreTransform(Matrix)' is obsolete: 'Use PushTransform' Avalonia.Direct2D1.RenderTests, Avalonia.Skia.RenderTests .\tests\Avalonia.RenderTests\Controls\CustomRenderTests.cs 115 Active
```
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
14fba2e53a
Rework HitTestTextRange
3 years ago
Benedikt Stebner
3f6cb82241
Add failing test
3 years ago
Julien Lebosquain
5ffd961742
Perf: improved text wrapping
3 years ago
Julien Lebosquain
f951929d54
Perf: improved CodepointEnumerator
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
Benedikt Stebner
5a5080b1a5
Rework GlyphTypeface
3 years ago
Giuseppe Lippolis
220bb0774e
fix: static field visibility
3 years ago
Benedikt Stebner
6502fa1ef7
More TextAlignment fixes
4 years ago
Giuseppe Lippolis
543fe599c6
fix: some nullable annotation warnings
4 years ago
Benedikt Stebner
59d8f86509
Better WPF compat
Disable run sort
4 years ago
Benedikt Stebner
9250d93407
Implement embedded runs
Improve text edit navigation
Implement IncrementalTabWidth
4 years ago
Dariusz Komosinski
6bcf9c2973
Refactor text trimming and implement prefix trimming.
4 years ago
Benedikt Stebner
3fdfdd64d2
Fix font fallback
Fix TextPresenter measure
4 years ago
Benedikt Stebner
b815a22d5a
Port WPF's FormattedText to Avalonia and rework TextPresenter
4 years ago
Benedikt Stebner
a55a6ec1ff
Fix RightToLeft TextWrapping
5 years ago
Benedikt Stebner
43beabc9b4
Add a unit test
5 years ago
Benedikt Stebner
96df38c88e
Add failing unit test
5 years ago
Benedikt Stebner
251dcbf2cd
Add failing unit test
5 years ago
Benedikt Schroeder
08a72e893c
Increase TextFormatter compatibility with WPF's version
5 years ago
Andrey Kunchev
0f81b0fc93
add failing test for formatter for #4806
5 years ago
Benedikt Schroeder
54fb09a304
Fix unit test
5 years ago
Benedikt Schroeder
04c781ca14
Make sure GlyphTypefaces are always cached
5 years ago
Benedikt Schroeder
40711f8597
Fix wrapping test
6 years ago
Benedikt Schroeder
bc9926014f
Fix typeface fallback for embedded fonts
Fix text wrapping for multiple corner cases
6 years ago
Benedikt Schroeder
2a181d9acb
Introduce TextRunProperties
6 years ago