Skip to content

[Android/iOS SkiaRenderer] System text size setting is not respected #20296

Description

@mikernet

Current behavior

UPDATE: See this comment below - it appears that the system font size setting isn't respected on Skia, it renders the same size regardless of what it is set to.

Original issue was posted as follows:

This doesn't appear to be a problem on iOS or WASM - text renders the same size as it does with the native renderers, but on Android, there is a rather large difference. The following is a side-by-side comparison (fluent theme, default font):

Image

Text appears to render significantly larger than the specified font pixel size (i.e. the FontSize property value). Other elements stay sized correctly according to their set Width/Height/MaxWidth/etc, just the text is proportionally bigger than it should be.

Expected behavior

Text should render the same size as the native renderer.

How to reproduce it (as minimally and precisely as possible)

Minimal repro: AndroidRenderSize.zip

Workaround

No response

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

6.0.67, 6.0.110, 6.0.146

Renderer

  • Skia
  • Native

Affected platforms

Android

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

Activity

  1. added
    kind/bug
    triage/untriaged
    difficulty/tbd
    on May 9, 2025
  2. self-assigned this
    on May 12, 2025
  3. jeromelaban commented on May 29, 2025

    @jeromelaban
    Member

    Let's fix the startup issues in the samplesapp /cc @MartinZikmund

  4. MartinZikmund commented on May 30, 2025

    @MartinZikmund
    Member

    @jeromelaban the startup issues should not be related to this one, no?

  5. jeromelaban commented on Jun 2, 2025

    @jeromelaban
    Member

    @MartinZikmund no, but it prevents debugging on Ramez's side (it repros on iOS as well, with a lesser extent)

  6. ramezgerges commented on Jun 4, 2025

    @ramezgerges
    Contributor

    @mikernet Is it possible to create a repro sample that showcases the difference? I've tested with out Uno.Gallery and the rendering is identical.

    Image

  7. MartinZikmund commented on Jun 5, 2025

    @MartinZikmund
    Member

    @ramezgerges it seems there is some very slight difference - but not sure if it is because of text rendering, line spacing, or something else - on the left screenshot the outline button is almost fully visible, whereas on the other it is not, so there is a few pixels "lost" somewhere:

    Image

    Still it seems much more significant in the screenshot above, so maybe it would be best if you could provide a simple repro project @mikernet - maybe it has to do with font choice in some way

  8. mikernet commented on Jun 5, 2025

    @mikernet
    ContributorAuthor

    @MartinZikmund I'll put together a minimal repro sometime in the next few days. As indicated in OP, whatever the default fluent theme font is is used.

  9. mikernet commented on Jun 19, 2025

    @mikernet
    ContributorAuthor

    Minimal repro, cut out everything in the project except a page with image/text/buttons for comparison: AndroidRenderSize.zip

    Side-by-side comparison on my device (Samsung S20 FE, Android 13):

    Image

    Screenshots are also in the zip in a Comparison Screenshots folder.

  10. mikernet commented on Jun 19, 2025

    @mikernet
    ContributorAuthor

    I think I narrowed down the issue. Android Native respects this system setting and adjusts the font size accordingly, whereas Skia does not:

    Image

  11. jeromelaban commented on Jun 19, 2025

    @jeromelaban
    Member

    This is very interesting indeed, thanks for the update!

  12. changed the title [-][Android SkiaRenderer] Text renders much larger than native[/-] [+][Android SkiaRenderer] System text size setting is not respected[/+] on Jun 19, 2025
  13. changed the title [-][Android SkiaRenderer] System text size setting is not respected[/-] [+][Android/iOS SkiaRenderer] System text size setting is not respected[/+] on Jun 19, 2025
  14. mikernet commented on Jun 19, 2025

    @mikernet
    ContributorAuthor

    Looks like same issue on iOS as well.

  15. francoistanguay commented on Jun 20, 2025

    @francoistanguay
    Contributor

    Good catch. Clearly something we need to support @MartinZikmund

  16. added theissue type on Jun 20, 2025
  17. MartinZikmund commented on Jun 26, 2025

    @MartinZikmund
    Member

    For this we will need to port relevant parts of WinUI which lead to TextFormatting::GetScaledFontSize usages and source the values from the operating system. While at it we can also include the IsTextScaleFactorEnabled property.

  18. changed the issue type fromtoon Jun 26, 2025
  19. added
    project/text 🔤
    and removed
    triage/untriaged
    difficulty/tbd
    kind/bug
    on Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

project/text 🔤

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions