diff --git a/docs/pixelratio.md b/docs/pixelratio.md index f298a8e73ab..61d560dd38b 100644 --- a/docs/pixelratio.md +++ b/docs/pixelratio.md @@ -149,6 +149,10 @@ Returns the scaling factor for font sizes. This is the ratio that is used to cal If a font scale is not set, this returns the device pixel ratio. +:::note +On Android 14 and newer, the system scales fonts [non-linearly](https://developer.android.com/about/versions/14/features#non-linear-font-scaling) once the user's font scale is 1.05 or higher: small fonts grow by roughly the full factor, while larger fonts grow progressively less (for example, a 30sp font does not grow at all until the setting exceeds 1.5). `getFontScale()` still returns the linear preference value (such as `1.3`), so multiplying a font size by it will overestimate the rendered size of large text on these devices. +::: + --- ### `getPixelSizeForLayoutSize()` diff --git a/docs/text.md b/docs/text.md index b637552bfa5..33b4ee15b56 100644 --- a/docs/text.md +++ b/docs/text.md @@ -312,6 +312,8 @@ Specifies whether fonts should be scaled down automatically to fit given style c Specifies whether fonts should scale to respect Text Size accessibility settings. +On Android 14 and newer, scaling is [non-linear](https://developer.android.com/about/versions/14/features#non-linear-font-scaling): as the user's font scale setting grows, large fonts are scaled up less than small ones. + | Type | Default | | ------- | ------- | | boolean | `true` | diff --git a/website/versioned_docs/version-0.86/pixelratio.md b/website/versioned_docs/version-0.86/pixelratio.md index f298a8e73ab..61d560dd38b 100644 --- a/website/versioned_docs/version-0.86/pixelratio.md +++ b/website/versioned_docs/version-0.86/pixelratio.md @@ -149,6 +149,10 @@ Returns the scaling factor for font sizes. This is the ratio that is used to cal If a font scale is not set, this returns the device pixel ratio. +:::note +On Android 14 and newer, the system scales fonts [non-linearly](https://developer.android.com/about/versions/14/features#non-linear-font-scaling) once the user's font scale is 1.05 or higher: small fonts grow by roughly the full factor, while larger fonts grow progressively less (for example, a 30sp font does not grow at all until the setting exceeds 1.5). `getFontScale()` still returns the linear preference value (such as `1.3`), so multiplying a font size by it will overestimate the rendered size of large text on these devices. +::: + --- ### `getPixelSizeForLayoutSize()` diff --git a/website/versioned_docs/version-0.86/text.md b/website/versioned_docs/version-0.86/text.md index 0e72ec8c27b..cf2fe73fb95 100644 --- a/website/versioned_docs/version-0.86/text.md +++ b/website/versioned_docs/version-0.86/text.md @@ -312,6 +312,8 @@ Specifies whether fonts should be scaled down automatically to fit given style c Specifies whether fonts should scale to respect Text Size accessibility settings. +On Android 14 and newer, scaling is [non-linear](https://developer.android.com/about/versions/14/features#non-linear-font-scaling): as the user's font scale setting grows, large fonts are scaled up less than small ones. + | Type | Default | | ------- | ------- | | boolean | `true` |