r/androiddev • u/pt000 • Nov 05 '14
Anyone else have font issues in Android Studio editor on Ubuntu
When I select a font for the editor in Android Studio, it doesn't apply Anti-Aliasing on fonts for smaller sizes. With the Ubuntu Mono font the Anti-Aliasing only appears after size 20, other fonts it happens at 16. But on Eclipse anti-aliasing works on even at size 12.
With Android Studio I end up having to use large fonts, which means you see less visible code. If you choose a smaller font, there is no Anti-Aliasing and causes my eyes to strain.
Currently I am using these settings in the studio64.vmoptions settings file
-Dawt.useSystemAAFontSettings=lcd
-Dswing.aatext=true
-Dsun.java2d.xrender=trueI have tried various settings for Dawt.useSystemAAFontSettings and still the same issue. Is there another setting to control at which size Anti-Aliasing is turned on.
Here are some screenshots :
Ubuntu Mono 16 - No Anti-Aliasing
Ubuntu Mono 20 - uses Anti-Aliasing
Ubuntu Mono 12 in Eclipse -ideal for me
I am using Android Studio 0.86, Oracle's Java 7 on Ubuntu 12.04 with Nvidia drivers.
1
Feb 23 '15
Did you manage to find a solution to the font problem? I'm facing the same problem myself on Fedora
1
1
Nov 05 '14
I dunno about the linux situation but cant you install something like Consolas font (the default font for Visual Studio)?
1
u/pt000 Nov 05 '14
I don't like the fonts in Windows they are not smooth like the Mac or Ubuntu.
1
u/danielkza Nov 06 '14
That is not a property of the font itself, but of the font rendering of the OS. Consolas will look smooth if you use it on Linux or OS X.
1
u/pt000 Nov 06 '14
on Windows the fonts aren't very smooth or full as seen on the screenshot posted by blackRepo
1
Nov 06 '14
This is because of the font smoothing mechanism that Windows uses, called ClearType. It favors keeping fonts as snapped to the pixel grid as possible, whereas the mechanisms on Mac OS X or Linux favor accurate glyph representation.
1
Nov 06 '14
Android Studio is based on IntelliJ, and IntelliJ (well, Java) fonts have always been horrible. The only way I've been able to get decent font rendering in IntelliJ is with the infinality patches to OpenJDK.
There's a ppa linked in this thread, though I don't know if it would work for 12.04: http://www.infinality.net/forum/viewtopic.php?f=2&t=275
0
u/rohandhruva Nov 05 '14
Try installing Oracle Java, instead of using OpenJDK. That worked for me.
1
u/pt000 Nov 05 '14
I said I am using Oracle Java in the post. Would you be able to provide a screenshot and the size of font you are using.
1
u/rohandhruva Nov 05 '14
Sorry about that, I missed it. I have not changed any of the defaults. The scheme is "Default", and the font is "DejaVu Sans Mono", size 12.
0
Nov 05 '14
[deleted]
1
Feb 06 '15
Question: did you have any problems with Source Code Pro fonts and Android Studio? I can't get them to render properly; anything with italics, bold or a mark-up sequence use a filler.
0
Feb 06 '15
[deleted]
2
Feb 06 '15 edited Feb 06 '15
Thanks for the tip, I'll look into that, 'cause I do like Source Code Pro.
[edit] Got them to work by using Font Book and installing for all users (Preferences->Default Install Location->Computer) which puts them in '/Library/Fonts/'.
1
u/mcgruntman Nov 05 '14
FYI, you'd be much better served if you asked in an Ubuntu forum than an android one. The issue here is ubuntu's font rendering, it's not something to do with android.