Professional Documents
Culture Documents
BinaryTides
HOME
APPS
CODING
DISTROS
GENERAL
LINUX
REVIEWS
SECURITY
SERVER
SUPER TIPS
Ubuntu
By Silver Moon
37 Comments
Fonts on Linux
SEARCH
Fonts on linux have long been an issue due to various reasons like the BCI patent by Apple, lack of free
quality fonts etc. However over time things have changed and now its possible to get your linux system
fonts look as good as, or even better than a mac or windows 8 as far as fonts are concerned. In this post I
am going to show you couple of simple tricks that can make the fonts of your linux system look amazing!!
However first there are a couple of things to know about how the tricks work. We are mainly going to do 2
things. First is, get better fonts for the system. Second, we are going to tweak the ".fonts.conf" file in the
home directory. The ".fonts.conf" file allows a user to override the system font settings like antialiasing,
hinting, auto-hinting, sub pixel rendering etc.
The tweaks shown in the post should give identical font rendering on any linux distro provided that BCI
Connect with us
hinting (Byte code interpreter) is available (which it is on most modern linux distros since the bci patent
has now expired).
Ok, so the first step is to get better fonts for our system. All of these fonts are free and available from the
google webfont store at the following url
http://www.google.com/fonts/
Here is a list of the fonts you shall need.
1. Droid Sans
2. Droid Sans Mono
3. Droid Serif
4. Noto Sans
5. Noto Serif
6. Open Sans
Download the font files. Google would give all of them in a single zip file. Make sure you download all
/usr/share/fonts
Some background
The ubuntu wiki page on fonts has a font configuration xml provided by Obi Bok. It focuses on getting
windows xp style clear looking fonts on your linux system with microsoft fonts. For this you need to install
the microsoft fonts like Arial, Verdana, Tahoma, Georgia, Times New Roman etc.
On Ubuntu the fonts are available in the repository by the package name ttf-mscorefonts-installer. By
installing those fonts, and putting the xml setting in your fonts.conf file your fonts should look like that of
windows xp. Infact they would look better than windows XP.
Those microsoft fonts might work well for you, but I think they are out dated and its time to get some
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
1/11
12/7/2015
modern fonts.
So I modified the original fonts.conf by Obi Bok to suit more to Droid, Noto and Open Sans font families.
You will see the results in a short while.
In "Use anti-aliasing" dropdown, select "System Settings". Leave force font dpi unchecked.
On KDE the subpixel rendering cannot be enabled from the .fonts.conf file. Adding the following will have
no effect
Hence it has to enabled from the Font settings box.
The subpixel rendering setting for kde is stored in the file "~/.kde/share/config/kdeglobals" in a field
named "XftSubPixel=rgb".
Thats it. That should make your fonts look better. Try logging out and relogin, if the settings don't take
effect properly.
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
2/11
12/7/2015
Gnome
The newer gnome desktops dont have a direct option to change the fonts. Use a tool like gnome-tweaktool and change the fonts.
Gnome with the default Ubuntu Font at size 11pt.
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
3/11
12/7/2015
Chrome
Firefox
Final Results
The dialog boxes shown above already show the final rendering of the fonts on the desktop. Now I am
putting up some screenshots of how the fonts look on webpages.
Here is quick comparison between our font tweaked google chrome on linux and Google chrome with
default fonts on windows 8.
4/11
12/7/2015
Windows 8 - Chrome
And for some comparison take a look at how Windows 8 looks
It should be easy to spot out right away how rich the fonts on ubuntu look, when compared to windows 8. I
have not checked with mac. May be you should try that and let me know the results.
Monospace
For monospace we have 2 great choices. Droid Sans Mono and Inconsolata. However each has got issues.
1. Droid Sans Mono does not have a Bold version. So making them bold looks ugly on webpages.
Inconsolata has got a bold version.
2. Inconsolata is smaller in size than Droid Sans Mono. So at the same size of 9pt or 12px Inconsolata looks
much tinier than Droid Sans.
3. Comparatively Droid Mono is clearer than Inconsolata.
Here is a screenshot of how each looks on KDE with full hinting.
Droid Mono at 9pt
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
5/11
12/7/2015
Inconsolata at 10pt
So Inconsolata at 10pt looks like Droid Mono at 9pt. Also note that Droid Mono looks nicer than
Inconsolata.
Both are at full hinting with autohinting disabled.
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
6/11
12/7/2015
Additional Notes
Google Chrome is buggy when it comes to following the rules mentioned in the .fonts.conf file. It does not
obey the pixelsize rules. This does not matter unless you want to tweak the fonts.conf file yourself. Firefox
follows the rules very well.
In browsers, the fonts.conf hinting rules might not be followed if the actual fonts are not available on the
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
7/11
12/7/2015
system but present on the webpage through css3. In that case the default hinting rules would be followed.
On chrome, if the fonts are present on the system then fonts.conf rules shall be applied.
On firefox if fonts are loaded via css3 then the fonts.conf rules shall not be applied and default antialiasing
will be applied always. However if the same fonts are not loading by css3, then the fonts.conf rules shall
be applied.
References
This is a very old and probably the first article that ever came up talking about font issues on linux and
how to get windows like fonts on various linux distros.
http://avi.alkalay.net/linux/docs/font-howto/Font.html
This is an excellent article that explains various fonts.conf settings like antialiasing, bci hinting, auto
hinting. Its a must read.
https://wiki.archlinux.org/index.php/Font_Configuration
The syntax of the .fonts.conf file is explained here
http://linux.die.net/man/5/fonts-conf
The original xml on which my tweaks are based can be found here
https://wiki.ubuntu.com/Fonts
Last Updated On : 8th January 2014
Enteremailtosubscribe
Subscribe
No related posts.
37Comments
BinaryTides
Share
Recommend
Login
SortbyBest
Jointhediscussion
NoonianAtall 2yearsago
Lookslikeyouturneduphintingorthatfileyoulinkedtowithoutexplainingdoeswhichisonlysubjectively
better.Manypeoplethinkitmakestextlookworse(e.g.OSXdoesn'tuseit).Ican'tstandsinglepixelwide
fonts,andthat'swhathintingforcesatsmallersizes.Basically,Ithinkyour"before"shotslookbetterthanyour
"after"ones.
15
Reply Share
torriem 3yearsago
Evenwithstandardfonts,myfontsonLinuxhavelookedgreatforthelastfewyears.Ialwaysturnonsubpixel
renderinganddisableallhinting.That'stheclosestIcangettoOSX'sfontrendering.DefinitelytheDroid
fontslooksuperb.ThoughIdisagreewithreplacinganyandallseriffonts.AtdecentresolutionsSeriffonts
areeasiertoreadthansansserif,especiallyforlongblurbssuchasnewsarticlesorbooks.There'sareason
Romanfontshavebeeninuseforthousandsofyears!Perhapsinthefuturewe'lllookbackonthistimeof
proliferationofsansseriffontsandseeitasabriefperiodwhenwehadtousesansseriffontsbecausewe
didn'thavegoodenoughscreens.
2
Reply Share
Wearenotreplacingseriffontsbysansserif.
OnlytheGeorgiaandTimesNewRomanfontsarereplacedbyNotoSerif,whichisalsoaseriffont
thatlooksmuchbetter.
Reply Share
AlexeyMorozov 2yearsago
IwonderhowyoudidmanagetogetsubpixelfontrenderinginPlasmaappletsandpanels,Inmostplaces
(e.ginthepanelclocksandintheKmenuIhavegrayscalerenderingdespitethesystemsettingsandfont
renderinginapplications.
1
Reply Share
The111 2yearsago
Thanksfortheexcellentguide.Iamhappywithisforthemostpart,withafewverysmallexceptions.One
thatirksmealotisthatexclamationmarksarenearlyundistinguishablefromlowercaseL's.Anyideashowto
improvethat?
1
Reply Share
LeonardoRossi>The111 ayearago
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
8/11
12/7/2015
HiMatt,Ihavethesameissuewithexclamationmarks(minearelookinglikeaJactually).
Haveyoumanagedtosolvethis?
1
Reply Share
srikkbhat 8monthsago
DoesthisworkonFedora21?
Reply Share
SimonPeres 10monthsago
Wowthisisgreat.Worksonmysamsungandvaiolaptops.anw,Iusekubuntuforboth.updatedversionof
xml.fonts.confwillbetrulyappreciated
Reply Share
VctorQuirsVargas ayearago
Hi,itlooksliketheimagesforthisarticlearegoneandIremembertheycontainpreciousinformationonthe
configurationsteps.Isitpossibletohavethemallback?Thanks!
Reply Share
Whatfor? ayearago
IsuggestFantasqueSansMonoformonospace.http://openfontlibrary.org/en/...
Reply Share
Arun ayearago
InfinalityisanotherwaytogetthebestfontrenderingonUbuntu.Italsoallowstotweakmanymoreoptions:
http://tuxdiary.com/2014/09/27...
Reply Share
A.Nonymous ayearago
*"...LCDmonitorat96dpi(notsureifthatwastheactualdpiofthemonitor)..."*
DPI"calculator":
https://www.sven.de/dpi/
PerhapsonemayalsofindthatithelpstosetthecorrectDPIviaxrandrorxorg.conf.
Itusedtobecorrectlydetectedinearlierxorgversions,butitwasdecidedthatitshouldbebugcompatible
withWindows(atleastpre7/8),andhaveahardcodeddefaultsettingof96dpi,ratherthanviaconfiguration,
regardlessofanything.
Dependingonyourresolution,usingthecorrectDPImaymakethingshavewrongsizesthough(orsomewhat
blurredfontsiftheactualDPIissmaller,Iguess),that'sbecausesomeoftheUIsarehardcodedtohave
pixelbasedsizesratherthanactualmeasurementssize.Hopefullythiswillchangesoon,itseemsalmost
unavoidablewiththetrendofresponsivewebdesign.
Reply Share
Kevin 2yearsago
Thanksalot,butIstillhavedifficultiesintweakingfontforChromiumbrowseronUbuntu14.04.Thebrowser
couldnotdisplaywell,however,Firefoxisfine.
Reply Share
Tom 2yearsago
IdidallthesetweaksonElementaryOSandnowmyloginscreen(PantheonGreeter)haswhiteboxeswhere
charactersshouldbe...Afterloginthefontsappearfine,however.AnyoneknowhowIcanfixthis?
Reply Share
A.Nonymous>Tom ayearago
I'mnotreallysure,butI"often"seewhiteboxesinplaceofcharactersthatdon'texistonagivenfont,
likeAsiancharacters,ifIdon'thavethefontinstalled.Perhapsit'ssomethinglikethatthatis
happening,somehow.
Reply Share
DaveGahan 2yearsago
Thanksforthispost!greatfontsbutIhaveaproblemwithchromiumifImusingOpenSansorNotoSansthe
URLbar'stextbecomesjumpyasifItdoesnt'fit,anysimilarbehavior?
Reply Share
augustuswong 2yearsago
whataboutlatoptmonoptsansptserifongooglewebfonts
Reply Share
Al 2yearsago
Hi,
IinstalledUbuntu13.10andtriedtofollowthismanual,butwhenImodify.fonts.confIreceivesquareblocks
insteadofletters,althoughImadeallprevioussteps.WhatshouldIdotomakeeverythingworksproperly?
Thanks!
Reply Share
Falopius 2yearsago
Absolutelyawesome,theonlythingthatdidn'tfellgoodformeonUbuntuwasthelackofgoodsharplooking
fontsonmydesktop.Thisworkedlikeacharm
Reply Share
Lance 2yearsago
Thanks,ThisworkedwellwithslighttweeksforLinuxMinut15Cinnamonandlooksgreat.Ialsoappliedthe
FirefoxsettingstoThunderbirdandvastlyimprovedreadabilityofemailimo.
CinnamonFontsMenu>SystemTools>SystemSettings>Fonts
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
9/11
12/7/2015
CinnamonFontsMenu>SystemTools>SystemSettings>Fonts
DefaultFontDroidSans9
DocumentFontDroidSans9
MonospaceFontDroidSansMono9
WindowTitleFontDroidSans9
Hinting:Slight
Reply Share
AllanNienhuis 2yearsago
Iwasgettinganumberoferrors/warningsintheconsolewhenlaunchingbinariesinubuntu13.04usingthe
configfilelinkedinthegistabove:
Havingmultiplevaluesin<test>isn'tsupportedandmaynotworkasexpected
Isimply(andnaively)duplicatedthetestconditionforeachofthechildentries.Thisseemedtoavoidtheerror
messagesandthefontsseemstostillrendernicelysoIdon't_think_Ibrokeanything.Butasmentionedthis
wasareallynaivechangesoyourmileagemayvary.gisthere:https://gist.github.com/allann...
Reply Share
DavidLatapie 2yearsago
Youmightappreciatemyarticleaboutyourwork:http://david.latapie.name/blog...
Reply Share
Guest>DavidLatapie 2yearsago
It'snotbetter.It'stotallydifferent.Seethescreenshotsonyourblog,ontherightside"Images""I"has
aserif,theleftsideissansserif.ReplacingorsubstitutingtypefacesisNOTbetterthancorrectly
rendering,asInfinalitydoes.IrecommendInfinalityoverthismethod.Muchbetter.Really.
Reply Share
doa 2yearsago
Isthereawaytomakethetypefacesappearmorebolder/heavier?
Reply Share
OlivierDony 2yearsago
Withthelatestfontconfigversionyourfonts.conffilegenerateslotsofwarnings:"Havingmultiplevaluesin
<test>isn'tsupportedandmaynotworkasexpected".Iforkedyourgisttofixtheminwhatseemstobethe
expectedwayThoughtyoumightwanttohavealookandupdateyours.https://gist.github.com/odony/...
Reply Share
Johannes 2yearsago
Thanks,however,thereisoneproblemIamhaving:Withthis.fonts.conf,renderingofmostPDFfilesin
Firefox'/Iceweasel'sinternalPDFviewerisverymuchmessedup.Forsomereason,itdisplayshuge,
overlappingletters,makingthepagecompletelyunreadable.Ihavealreadycommentedoutsomesectionsof
the.fonts.conf,butsofartonoavail.Anyhint,whichsectionmightbetoblame?
Reply Share
theinbuiltpdfvieweroffirefoxdoeshaveitsownfontrenderingissues.
Notsurewhichfonts.confsettingismessingitup.Maybeyoucantrytoavoidthereplacementofarial
bynotosans.
Reply Share
Johannes>SilverMoon 2yearsago
Ihavetrackedtheproblemdowntolines517519ofthe.fonts.conf.IfIcommentthemout,the
viewerworksjustfine.Thelinesinquestiongo
<editname="autohint"mode="assign">
<bool>true</bool><\!\>
</edit>
Reply Share
Soyouhadtodisableautohintingforthefont'BookAntiqua'
Reply Share
rsking84>SilverMoon 2yearsago
Johannes,
Thatfixdoesn'tworkonmyinstall.NotethatI'musingOliverDony'sforkedversionof
fonts.conftoavoidthe"multiplevalues"warnings.Anyway,ifIdisableautohintingfor
BookAntiquaIstillhavetherenderingproblemsinFirefox.Anyotherideas?
Reply Share
anonBrian 3yearsago
InthelastcoupleofmonthsI'vereplaceDroidmonowithInconsolatait'smynewfavoritemonospacefont.I
useitinkonsole/yakuake,andinallmytexteditors/IDEs.http://www.google.com/fonts/sp...
Reply Share
Icompareddroidmonowithinconsolata,andfoundthatdroidmonoperformsbetterintermsofclarity
andniceness.HoweverDroidMonodoesnothaveaboldversionwithinconsolatahas.Thisisa
drawbackfordroidmonowhenusedonwebpages,whereboldversionslookbadwithwhatever
hinting.
Addedscreenshotsofbothfontsinthepost.
Reply Share
PopeRonPolypII>SilverMoon 3yearsago
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
10/11
12/7/2015
PopeRonPolypII>SilverMoon 3yearsago
MyprimarycomplaintwithDroidMonoisthatitisrelativelydifficulttodistinguishbetween"0"
and"O".
2
Reply Share
Anonymous 3yearsago
HelloSilverMoon,
thanksfortheniceread.
Oneadvisethough.Whilesubpixelsmoothingcanlookgreatshouldoneturnitoffforcreatingscreenshots.
Noteveryone'sdisplayuseslefttorightRGBorderinganditwillthencreatecolourfringesaroundlettersfor
thosewithadifferentordering.Turnoffsubpixelsmoothingandonlyusegreyscalecolourstomakeyour
screenshots"websafe".
Reply Share
Thanksforthesuggestion,butIwonder,aren'tmostdisplaydeviceslikelcdmonitors,laptopsand
padsusing"lefttoright"rgbbasedpixeldisplay?
Reply Share
jon_downfromthetrees 3yearsago
ThescreengrabsfromUbuntulookgreat.Aretheresultsequivalentonsystemsthatdon'thaveUbuntu'sfont
renderingpatches?
Reply Share
Therenderingpatchesarenotspecifictoubuntu.ItsthebcisupportinFreetypefontengine.
TheBCIpatentsarenowexpired,soitisavailableonallmajorlinuxdistros.
SotheresultsshouldbeidenticalonalllinuxsystemsthathaveBCIenabled.
Subscribe
Reply Share
AddDisqustoyoursite
Privacy
About us
Contact us
Faq
Advertise
Privacy Policy
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/
11/11