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

Use fallbacks for font sizes when getting font from Span on Android #5680

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

Redth
Copy link
Member

@Redth Redth commented Mar 30, 2022

Spans have a 0 font size by default, and on Android this means the font is literally 0 in size and won't appear. If you had an attribute set other than None, it was hitting a code path here to get the font from the span and used the 0 size incorrectly.

This should ensure the font size falls back to first the Formatted string or target control the font is to be used in, and then to the system default font size from the FontManager if necessary so that the span shows up.

This fixes the android part of #5576

Description of Change

Issues Fixed

Fixes #

Spans have a 0 font size by default, and on Android this means the font is literally 0 in size and won't appear.  If you had an attribute set other than None, it was hitting a code path here to get the font from the span and used the 0 size incorrectly.

This should ensure the font size falls back to first the Formatted string or target control the font is to be used in, and then to the system default font size from the FontManager if necessary so that the span shows up.

This fixes the android part of #5576
@Redth Redth added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 30, 2022
@Redth Redth added this to the 6.0.300-rc.2 milestone Mar 30, 2022
@Redth Redth requested a review from PureWeen March 30, 2022 18:57
@mattleibow mattleibow merged commit 2d6a0b8 into main Apr 5, 2022
@mattleibow mattleibow deleted the android-formattedstring-attr-disappear-fix branch April 5, 2022 00:24
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.2 Look for this fix in 6.0.300-rc.2! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.300-rc.2 Look for this fix in 6.0.300-rc.2! legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants