Questions tagged [android-fonts]

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.

362 questions
12
votes
4 answers

Crash when using custom font for Toolbar

In my activity, I have a custom toolbar. I'm trying to change its title font. Previously, I was able to do that by putting the font in the asset folder. With Android Studio 3, we can now use fontFamily and FontsContract. I tried this approach…
usernotnull
  • 3,480
  • 4
  • 25
  • 40
12
votes
2 answers

What glyphs or character sets are included in Roboto fonts?

I would like to use some not-so-common diacritics and maybe some fancy Unicode characters in my Android app, but I could not find a charmap for Roboto. What glyphs or character sets are included in Roboto Regular, Bold and Condensed fonts?
Gabriel R.
  • 1,186
  • 1
  • 15
  • 29
11
votes
2 answers

How to professionally organise the styling of buttons? (SDK 26+, min SDK 21)

What is best practice to organise styling of buttons of a professional android application? Assume a larger contemporary application (SDK 26+, min SDK 21). This question is answerable, as both the sources of Material Design and the setup of Android…
Blcknx
  • 1,921
  • 1
  • 12
  • 38
11
votes
4 answers

Android Tamil font between english word

I am having a TextView that has a huge text in between i have a tamil word and i know how to embedd the tamil font in seperate textview .but i need the tamil word between english word please help thanks in advance my part of text in textview…
Thiru VT
  • 831
  • 2
  • 8
  • 24
11
votes
1 answer

Using Roboto thin or condensed

Is it possible to use Roboto thin or condensed style in ICS without having to include the .ttf and load it manually, I mean without using: Typeface.createFromAsset(this.getAssets(),"fonts/DroidSerif-Bold.ttf");
lujop
  • 13,504
  • 9
  • 62
  • 95
9
votes
1 answer

Android: how to set app wide default font, with out overriding textAppearance

Im using custom font in my android app. I want to set this custom font to app default font (as fallback) but I still want to use the TextView textAppearance property to set font and text style. It looks like setting textViewStyle or fontFamily in my…
devha
  • 3,307
  • 4
  • 28
  • 52
9
votes
2 answers

How to add locale(with country) to font resources (Support Library v26)?

Google published the official font resources handling since support library v26 released: https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html However, looks like I cannot add country qualifier for the font resources…
Sira Lam
  • 5,179
  • 3
  • 34
  • 68
9
votes
2 answers

Can't use fonts in my project: - "Error:Error: The file name must end with .xml"

I'm trying to add a font to my Android project, so I can use it via XML. Unfortunately, I'm getting this error message: Error:Error: The file name must end with .xml I followed every step of the official Android tutorial and somehow this error…
thelearner
  • 1,440
  • 3
  • 27
  • 58
9
votes
1 answer

How to provide custom font provider for downloadable fonts?

I want to write a custom font provider to share fonts between apps. As I understand from docs font provider should be installed as separate application: A font provider is an application that retrieves fonts But how this application can be…
Bracadabra
  • 3,609
  • 3
  • 26
  • 46
8
votes
4 answers

How to import google fonts in Android Studio?

I'm a complete beginner to Android Studio, I'd like to know how to import new fonts(more precisely: Roboto and Pacifico font families)
HUHO
  • 111
  • 1
  • 1
  • 3
8
votes
2 answers

how to get android default font list programmatically?

I am trying to create app which provide text formatting (like font style , font size , font color). So I want default fonts provided by android as a list to be shown in drop-down. Selecting font from drop-down will change the Text dynamically. Can…
Pallavi
  • 652
  • 1
  • 10
  • 26
8
votes
2 answers

How to read kerning pairs table from TTF file in Android

I am currently drawing text on Canvas while using external (non-standard) font, loaded from TTF file. I want to enable kerning for the text I am displaying. What I want to know is if there is a possibility to read kerning pairs from typeface using…
Alex Semeniuk
  • 1,865
  • 19
  • 28
8
votes
1 answer

Webview is not displaying Gujarati font

I am not able to display Gujarati Font in WebView for Xolo, Sony Xperia, Nexus Tab device. Can anyone help me for this issue?
Palak
  • 574
  • 2
  • 10
8
votes
5 answers

Custom ttf fonts are not showing properly in TextView on Android 4.4 KitKat

I have some text which has some bolded parts. Until KitKat this strategy (as mentioned in this post) worked perfectly well My strings resources file: NON-BOLD TEXT \nBOLD My application code in…
KG -
  • 7,130
  • 12
  • 56
  • 72
7
votes
3 answers

Crash when using bundled ttf font on Android 10 / Android Q

After I updated the target level for my Android app from 28 to 29 (Android 10) the app crashes on a Pixel 3 (with Android 10). Versions used Android Gradle Plugin 3.5.0 Gradle 5.5.1 Question: Is this a known issue? Details The crash happens on…
Alix
  • 2,630
  • 30
  • 72
1 2
3
24 25