The Dynamic Font Size function is created as Power Apps named Formula for getting font size according to selected layout size.
Formula Code
DynamicFontSize(ScreenSize:Number):Number = Switch(
ScreenSize,
6,
30,
5,
30,
4,
25,
3,
22,
2,
21,
21
);
Eye on Detail
Power Apps recognise different device layout. This layout represents Size property in your Canvas screen.
The list of size constants:
If you need to specify higher than Extra Large size, you can do it through the SizeBreakpoints property:
[576, 768,992,1200, 1400]
Demo
Select App and choose "Formulas" property, where your custom UDF function will be placed.
Then go to your particular screen and choose some Label controls.
Select your Label in your Power Apps scree, go to Font Size property, and put "DynamicFontSize" function with size of your screen as input value.
Output
I used my title "Tasker" label, where I put the function in FontSize property.