Device fonts should doesn't apply to app font

Hey lovely Koders,
I make an app but suppose i change my device font then in my app font is also changing.

I want that app font remains unchange if i change device font.

How to do this. Please help in this

i didnt experience that ever, app had own fonts and didnt pick fonts of device.

1 Like

This topic could be helpful

Iam sure he means the font type not font size.

For a universal font type in an app the developer needs to change the manifest file.

  1. Check in your app build.gradle if you have the support library >= 26.0.0
  2. Add " font " folder to your resources folder and add your fonts there
  3. Reference your default font family in your app main style:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
   <item name="android:fontFamily">@font/your_font</item>
   <item name="fontFamily">@font/your_font</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
</style>
1 Like

This is not helpful and not cover my issue.
I told you about font not font size.
Font means app is taken font which device have.
I just want to set app font to default whether device font is whatever.

App font shouldn’t be change after changing device font.

Then i misunderstood. For the moment you have to set the font for every component.

This should work. Get a list of components and set the font type.

image

This works with more components. See other blocks.

2 Likes

This can be done with properties in designer also.
You peoples are not understanding my saying.

In my app font type is set to default for every label.
Now if i change font in my device not in app then also whole app font tyoe is set to that font only.

We understand what you try to tell.

What you want is posible in two ways:

  1. Do what Peter said
  2. Or edit the manifest file by yourself and use the link I shared above
4 Likes

I cant understand your solutions… I just wants to set my app font to default only. It will not change if i change my device font.

If you set it to default the device font is taken.

1 Like

If i set to some other type font like if i upload ttf file and use that font then it will change as per device font or not?

6 posts were merged into an existing topic: User behaviour questions