Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Android FormattedText and related platforms (#7219)
* Reduce line length so we can work * Set initial Span.FontSize => double.NaN Fixes #6801 This initial value of Nan (or could be 0) indicates to the layout engine that the size must come from the Label. If we set it here, then there is no way of knowing that the size was not actually set so uses the size. If the size is Nan, it falls back to the "default font size" which is not really default but actually the font size of the label. * Correctly apply span values to spans Fixes #7220 All: - set the default parameter values for line height to be -1 as that is what is the default currently Android: - don't capture the TextView.Paint as that is always wrong initially since none of the other properties are set - don't fall back to the Label.LineHeight to the spans as that is always applied - regardless of span values - pass the Label.CharacterSpacing down to be consistent - pass the Label.TextDecorations down as well - for text decorations, use the platform spans - split a LetterSpacingSpan out of the FontSpan so that they can be individually applied * Update src/Controls/src/Core/Platform/Android/Extensions/FormattedStringExtensions.cs Co-authored-by: campersau <buchholz.bastian@googlemail.com>
- Loading branch information
1 parent
a6c12a1
commit a51243a
Showing
11 changed files
with
239 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.