Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android FormattedText and related platforms #7219

Merged
merged 9 commits into from May 17, 2022
Merged

Commits on May 16, 2022

  1. Copy the full SHA
    4eea438 View commit details
    Browse the repository at this point in the history
  2. 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.
    mattleibow committed May 16, 2022
    Copy the full SHA
    d8cae2a View commit details
    Browse the repository at this point in the history
  3. 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
    mattleibow committed May 16, 2022
    Copy the full SHA
    c109fc2 View commit details
    Browse the repository at this point in the history
  4. Update src/Controls/src/Core/Platform/Android/Extensions/FormattedStr…

    …ingExtensions.cs
    
    Co-authored-by: campersau <buchholz.bastian@googlemail.com>
    mattleibow and campersau committed May 16, 2022
    Copy the full SHA
    3820238 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    8268e2b View commit details
    Browse the repository at this point in the history
  6. Added a test

    mattleibow committed May 16, 2022
    Copy the full SHA
    f3dfd7a View commit details
    Browse the repository at this point in the history
  7. Update LabelTests.cs

    mattleibow committed May 16, 2022
    Copy the full SHA
    68e0574 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    2d04d6e View commit details
    Browse the repository at this point in the history
  9. do both tests

    mattleibow committed May 16, 2022
    Copy the full SHA
    b629206 View commit details
    Browse the repository at this point in the history