Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8072375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:59:55+00:00 2026-06-05T13:59:55+00:00

I am using a custom .ttf font in my android app. I load it

  • 0

I am using a custom .ttf font in my android app. I load it the usual way:

myTypeface = Typeface.createFromAsset( getAssets(), "myTypeface.ttf");

then I assign my typeface within my activity… pretty straightforward stuff:

TextView tv = (TextView) findViewById(R.id.sample_text);
tv.setTextSize(12);
tv.setTypeface(App.myTypeface);

The problem I’m running into is that on some devices using later APIs (I’ve specifically noticed it in an emulator for the Asus Transformer), the text looks slightly bolder, less uniform in width, and more jumbled in vertical alignment. By that last part I mean that some characters are placed vertically a bit higher or lower than others, giving a little bit of a roller-coaster feel to the text.

Consider the screen shots below

This is text rendered on an emulator with the same resolution and dpi as a Transformer, but using Google API level 8.

i45.tinypic.com/142toud.png

Looks pretty standard, right?

Now consider the text rendered in an emulator with the same resolution and dpi, but using Google API level 15:

i47.tinypic.com/24zhekn.png

At first the text may look similar, though you might notice it seems a bit bolder. However, look at the “c” in “quick”. You will notice that it sits lower, and is taller, than the “c” in the first rendering. You will also notice that if you look at the bottom of the characters in the word “quick”, they are not aligned on the bottom.

These issues may seem small, but on screens with lots of text, it starts to look really unprofessional.

Anybody seen this, or have an explanation? I’d love to make the text look uniform in later APIs.

Thanks so much for your time!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:59:57+00:00Added an answer on June 5, 2026 at 1:59 pm

    Okay, so it seems to have just the following flags applied in both instances:

    Paint.DEV_KERN_TEXT_FLAG
    Paint.ANTI_ALIAS_FLAG
    

    Try doing this, and see if the results are any different (not necessarily improved, but even noticeable at all):

    textView.setPaintFlags(textView.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a custom font (TTF) in my Java application where i set
In my Application i am using Custom font. i copied my font.ttf file in
Hi am using webview ,i need to use custom font(verdana.ttf) how can i do
I am developing a Wicket Application, where I am using a custom ttf font.
Possible Duplicate: How to use web-fonts legally? Using a custom (ttf) font in CSS
I'm using a custom truetype font in a pdf generated by flying saucer xhtmlrenderer.
I'm using a custom font and the @font-face tag. In Windows, everything looks great,
When using CSS3 and custom fonts, the client needs to download .oft or .ttf
I'm using custom fonts on my webpage using the following code: @font-face { font-family:
I've been having a lot of difficulties with using custom fonts and @font-face .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.