You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android/iOS SkiaRenderer] System text size setting is not respected #20296
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):
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)
@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:
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
changed the title [-][Android SkiaRenderer] Text renders much larger than native[/-][+][Android SkiaRenderer] System text size setting is not respected[/+]on Jun 19, 2025
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
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.
Activity
jeromelaban commentedon May 29, 2025
Let's fix the startup issues in the samplesapp /cc @MartinZikmund
MartinZikmund commentedon May 30, 2025
@jeromelaban the startup issues should not be related to this one, no?
jeromelaban commentedon Jun 2, 2025
@MartinZikmund no, but it prevents debugging on Ramez's side (it repros on iOS as well, with a lesser extent)
ramezgerges commentedon Jun 4, 2025
@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.
MartinZikmund commentedon Jun 5, 2025
@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:
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
mikernet commentedon Jun 5, 2025
@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.
mikernet commentedon Jun 19, 2025
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):
Screenshots are also in the zip in a
Comparison Screenshotsfolder.mikernet commentedon Jun 19, 2025
I think I narrowed down the issue. Android Native respects this system setting and adjusts the font size accordingly, whereas Skia does not:
jeromelaban commentedon Jun 19, 2025
This is very interesting indeed, thanks for the update!
[-][Android SkiaRenderer] Text renders much larger than native[/-][+][Android SkiaRenderer] System text size setting is not respected[/+][-][Android SkiaRenderer] System text size setting is not respected[/-][+][Android/iOS SkiaRenderer] System text size setting is not respected[/+]mikernet commentedon Jun 19, 2025
Looks like same issue on iOS as well.
francoistanguay commentedon Jun 20, 2025
Good catch. Clearly something we need to support @MartinZikmund
MartinZikmund commentedon Jun 26, 2025
For this we will need to port relevant parts of WinUI which lead to
TextFormatting::GetScaledFontSizeusages and source the values from the operating system. While at it we can also include theIsTextScaleFactorEnabledproperty.