There are different fonts available to use programmatically and also using the device setting, Generally programmers do use fonts in a way that keeping the font file in assets folder and then passing the font as resource to textviews.
Questions tagged [android-fonts]
362 questions
5
votes
1 answer
How to get name of the font applied on the textview
Textview label = (TextView) findViewById(R.id.item_title);
label.setText("Solve My Issue !");
Log.d("TAG","Font-Family : "+ String.valueOf(label.getTypeface()));
When i see the log it return Font-Family : android.graphics.Typeface@7f37f870
How to…

Minion Dave
- 143
- 4
- 11
5
votes
1 answer
Android app crashed on Samsung devices after change of font style
I have a problem with an application when I tried to change the device's font (Samsung Galaxy Tab3), that being that my application crashes. In this case, the application is running in the background when I make the font change.
Steps:
Launch the…

TexGeek
- 143
- 2
- 9
5
votes
2 answers
Let the user change font size
in my dimens.xml I've:
16sp
18sp
20sp
22sp
now I would like to let the user select the font size in a settings…

helloimyourmind
- 994
- 4
- 14
- 30
5
votes
2 answers
Android show HTML text as bold with custom font
I'm having a little trouble getting my custom font to show up bold, here's what I'm trying to do:
I've set an HTML formatted string in res/string
Title1
Then I set the font at…
sub text
]]>
Isaac
- 1,442
- 17
- 26
5
votes
1 answer
Kannada Font on Android ICS
I am supporting Tamil and Kannada fonts in my application.
I use the following code to set the typeface of TextViews, Buttons, etc
FONT_TAMIL = Typeface.createFromAsset(getAssets(), "fonts/tamil.ttf");
tvTitle.setTypeface(FONT_TAMIL);
FONT_KANNADA…

Karthik Andhamil
- 848
- 1
- 13
- 22
4
votes
2 answers
How to change font size programmatically in Android?
I need to change the font size of my application at runtime. I referred the following SO post where they speak about applying font size via styles.xml and applying it. I think it's applicable only for a particular element (like TextView or layout)…

Tom Taylor
- 3,344
- 2
- 38
- 63
4
votes
3 answers
How to use Poppins extra bold downloadable font in android
If I check here https://fonts.google.com/specimen/Poppins I can find that it exists in the description.
But after checking font importer from android studio that type is not there
And I tried to create it using the weight I see a warning in…

Daniel Gomez Rico
- 15,026
- 20
- 92
- 162
4
votes
4 answers
Change font size at run time android
I have one textview and it has size as 32sp in xml.
android:textSize="32sp"
I wanted to change it as 28sp programmatically. So i used the below code.
txt.setTextSize(TypedValue.COMPLEX_UNIT_SP,…

simple
- 159
- 1
- 9
4
votes
0 answers
Getting log as TextView: setTypeface with style : 0 on samsung device only
When I run my application on samsung Galaxy Tab, I am getting "TextView: setTypeface with style : 0" line printed in my log file and my app gets stuck at the same time or its crashing some of the time.
Anyone knows what is the exact meaning of…

user2382771
- 91
- 1
- 8
4
votes
1 answer
Downloadable Fonts Exception
I decided to use Downloadable fonts in my project. I implemented everything as recommened in the guide.
The following problem occured, when i tried to get font from ResourcesCompat next way:
ResourcesCompat.getFont(MainActivity.this,…

KolinLoures
- 130
- 2
- 10
4
votes
2 answers
How to include multiple weights of the same font on NativeScript?
I have two weights of the same font.
Per https://stackoverflow.com/a/41678274/877682, I see that the font-family must match the file name on Android, so I named the font files [Font name] Regular.ttf" and "[Font name] SemiBold.ttf".
I then tried to…

Aaron
- 2,049
- 4
- 28
- 35
4
votes
1 answer
Set fallback fonts android app
I'm developing an app that needs to support multiple languages, including some for which fonts are not included in some older Android versions.
The same TextView can have content in multiple languages, so setting a single TypeFace does not help, I…

nisargjhaveri
- 1,469
- 11
- 21
4
votes
2 answers
Change the font of entire app all textview, including buttons and edittexts
I want to change the app font to roboto. I have tried this link also.
But it is changing only the textview font, not changing the listview adapter XML font.
How do I change the entire app font to roboto?

Andro Devlpr
- 93
- 1
- 7
4
votes
1 answer
PagerSlidingTabStrip change font of titles
I want to change the font of the tabs in PagerSlidingTabStrip this is how i try it but it has no effect.
MyPagerAdapter pagerAdapter = new MyPagerAdapter(getSupportFragmentManager());
viewPager.setAdapter(pagerAdapter);
…

AdrianoCelentano
- 2,461
- 3
- 31
- 42
4
votes
2 answers
Using custom font for all text within app not working with Lollipop
The problem I am having is specific to Android 5.0 (including 5.0.1/5.0.2) on both phones and my tablet (Nexus 9). Earlier versions of Android work fine.
In my app I want to set a global font that overrides all text. The way I've been accomplishing…

wchristiansen
- 436
- 7
- 20