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
0
votes
1 answer
Custom Font Implemented with TypeFace method not changing
I've Read a lot of articles and stack Questions for over 4 hours, when i use this method to define a custom font i don't get any error but the font doesn't change?
My mainactivity.java is listed below
public class MyActivity extends Activity {
…

Sainath S.R
- 3,074
- 9
- 41
- 72
0
votes
1 answer
android-how to change customSpinner typeface
this is how I make my spinner , I want to change the font .
I'm using a custom layout that contains a textView.
How can I do that ?
ArrayAdapter SpinnerAdapter = new ArrayAdapter(Spots.this, R.layout.spinner_item,states);
Spin1 =…

user3657105
- 49
- 3
0
votes
2 answers
Different font width in @string of TextView
I have the string Get Started! .
I have set it's textview to android:fontFamily="sans-serif-light".
Can I have the Started! as a regular fontFamily where the rest of the string (Get) having a light weight?
I tried:…

Diolor
- 13,181
- 30
- 111
- 179
0
votes
2 answers
Android Text Centering
I'm trying to draw a number inside of a circle and having issues with the centering on the text. The following is the xml I'm using to display the TextView

StackJP
- 1,450
- 2
- 16
- 32
0
votes
2 answers
How do I convert pt to sp android
i have tried below cosde is working 4.0 but not working in 4.0 above , how to convert pt to sp for setting textview font size.
public static int pixelsToSp(int pt) {
DisplayMetrics metrics = new DisplayMetrics();
return (int) (pt *…

venu
- 2,971
- 6
- 40
- 59
0
votes
2 answers
JSON parsing issue with Gujarati font in Android text view
I have developed an application, that has text view for display some Gujarati text from the JSON URL and data stored in PHP MySQL server database.
So, problem with display Gujarati font:
My code of JSON http is here:
public class CustomHttpClient…
user2776223
0
votes
2 answers
How to install an additional font in the root directory on an android device
I have developed an application which contains a WebView for loading additional URL contents, but I have an issue.
The issue is that when I load a local language URL, some devices don't support local languages special characters, so some empty…
user2776223
0
votes
4 answers
How add new font to android activity
I developed an android application now i'm trying to add (Kulturista Bold. ttf )this custom font to it but it doesn't worked Here is my login.xml file and login.java files

hesh
- 11
- 3
0
votes
1 answer
How to set the font size depending on the screen size
I added in my values the font size for each screen size
for normal screen: 22sp
for small screen: 19sp
...
but when I have two normal screen sizes one xhdpi and the other hdpi I had to…

Learning Android
- 273
- 4
- 17
0
votes
1 answer
Change Roboto font in XML for whole App in Android
I need to change the Roboto font for my app in XML and I want to change the Roboto font at RunTime. How do I do that?

Venkat
- 23
- 4
0
votes
2 answers
How to protect fonts and encrypt them dynamically?
If I want to embed custom fonts in my application I have to protect them at least in some way because the license requires this. So I cannot do something like
Typeface.createFromAsset(getAssets(),"fonts/myAwesomeFont.ttf");
On iOS is used this…

Erik
- 834
- 8
- 17
0
votes
2 answers
Custom font not showing properly some characters
I live in Hungary, and we got some special characters like: ő, ű... etc
In my android app i made a custom TextView. This custom TextView sets a custom typeface in its constructor and it works properly, except a little bug.
The special characters…

Adam Varhegyi
- 11,307
- 33
- 124
- 222
0
votes
1 answer
How to apply the Telugu font to the spinner?
In my application I have use JSON web services.Through the web services I get Telugu font. How to add this Telugu font to my spinner?
LayoutInflater lv = getLayoutInfalter();
View v = lv.inflate(R.layout.spineerfont,false);
TextView tv =…

karthik
- 209
- 1
- 6
- 11
0
votes
3 answers
How to add a font that can be used throughout the application?
Thanks to this post, I know you can add fonts in an activity and can use it within that class. Using:
TextView hindiTextView=(TextView)findViewById(R.id.txtbx);
Typeface hindiFont=Typeface.createFromAsset(getAssets(),"fonts/fontname.ttf");
…

reiley
- 3,759
- 12
- 58
- 114
0
votes
2 answers
How to define a different bold font in Android textview
I need to use a different font for the bold elements in HTML text rendered in an Android textview.
I tried doing it this way, but it looks like the Typeface style argument just sets the entire textview to normal or bold, rather than setting the font…

MonkeyBonkey
- 46,433
- 78
- 254
- 460