Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio not correctly rendering font on Ubuntu

Tags:

Below is the picture of Android Studio when I first installed it:

enter image description here

I'm using Ubuntu 12.04 with Oracle Java 7. But the fonts are looking very ugly. They are not looking like they look when I see them on eclipse.

Earlier when I installed NetBeans, I had same problem too.

like image 355
Arslan Ali Avatar asked May 17 '13 16:05

Arslan Ali


People also ask

How do I increase the font size rendering in Ubuntu?

On KDE, launch System Settings, go to "Common Appearance and Behaviour > Application appearance > Fonts". Select "Droid Sans" size 9 for all fonts. For "fixed width" font select "Droid Sans Mono" size 9. In "Use anti-aliasing" dropdown, select "System Settings".

What format does Android use for fonts?

Fonts are compiled in R file and are automatically available in the system as a resource. You can then access these fonts with the help of the font resource type.

Which font is used in Ubuntu?

The Ubuntu Font Family is the default font for the current and development releases of the Ubuntu operating system and is used for the Ubuntu project branding.


1 Answers

There actually is a solution. You need to install JDK font fix as follows:

sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix sudo apt-get update sudo apt-get install openjdk-7-jdk 

Then, open studio.vmoptions and optionally studio64.vmoptions in your android-studio/bin directory, and add following lines to both of them (the first one might be already there):

-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel 

After you reboot, the font rendering is just fine. To get the most Eclipse-like experience, go to File, Settings, Editor, Colors & Fonts, Font. Save the current scheme as a new one, and change the font to "Monospaced" with size of 14.

like image 86
Johny_G Avatar answered Sep 19 '22 16:09

Johny_G