42
Views
6
Comments
Howto adjust font size of reactive mobile app dynamically with device font/text size.
Question

How to adjust font size of reactive mobile app dynamically with device font/text size.

Below attached screenshot for ios text size.

2021-11-12 04-59-31
Manikandan Sambasivam

Hi,

Please check the component below

https://www.outsystems.com/forge/component-overview/8268/font-size-increase-decrease-o11

2022-12-22 10-00-39
Beatriz Sabino

Hi Dibs,

You can achieve this using CSS and media queries. Here’s an older post with an example.

Additionally, here's another post that walks you through adjusting the font size based on the length of the text.

You can also find other helpful CSS classes in the documentation to assist with this. 


UserImage.jpg
Dibs

Hi Beatriz,

Thank you for your help . But the above steps doesn't fulfil my requirement actually I want to adjust my application font according to the ios system text scale like above I have shared a Image of a apple device settings that applied to overall font size including device UI. but in  my app it doesn't  changing it's font size ie larger to smaller

2023-04-16 15-25-31
Krishnanand Pathak

Hi Dibs,

Follow the below steps:

  • Drag a Container and place a Text widget inside it. 
  • Assign an Id (e.g., FontTextContainer) to the Container. 
  • Drag an Input Widget and set its Type to Range (Slider). 
  • Bind it to a Local Variable (e.g., FontSize). 
  • Create a Local Variable named FontSize of type Integer. 
  • Set its default value to 16 (or any preferred font size). 
  • In the Container’s Style Property, add:  font-size: " + FontSize + "px;
  • Assign the slider value to local variable(FontSize) on SliderOnChange handler


Oml is also attached for reference.

Regards
Krishnanand Pathak

DynamicFontSize.oml
UserImage.jpg
Dibs

Hi

Krishnanand,

Thank you for your help . But the above steps doesn't fulfil my requirement actually I want to adjust my application font according to the ios system text scale like above I have shared a Image of a apple device settings that applied to overall font size including device UI. but in  my app it doesn't  changing it's font size ie larger to smaller

2025-07-22 10-30-27
Mandar Deshpande

Hi @Dibs 

Outsystems renders UI using HTML- CSS inside a webview which does not inherit iOS dynamic type scaling. Hence, in your case, the app will not resize automatically just because the user changes iPhone text size.

To make your OS fonts scale dynamically, you can create a Cordova plugin with CSS variable scaling and then expose it to OS. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.