I really like the Ubuntu sans font, I want it be the section and title font as a replacement of Linux-Biolinum?

With Ubuntu 12.04 LTS + Texlive 2012, how to figure this out?


Use XeTeX, it comes with TeXLive 2012 and can use any system font automatically.

Here is a MWE that should work on Ubuntu. Copy to a new file, save as test.tex and compile it with xelatex test.tex from your console:

% !TEX TS-program = xelatex
% !TEX encoding =UTF-8 Unicode

\usepackage{fontspec} % Allows font customization

\setmainfont{Ubuntu} % Main document font


A one-line test.

  • Xelatex error The font "Ubuntu Regular" cannot be found. – KOF Feb 13 '13 at 14:14
  • 1
    Try \setmainfont{Ubuntu}. You have to look for the font's name in the system directory. Sorry, I got to no Ubuntu machine to check right now... – mcbetz Feb 13 '13 at 14:17
  • 1
    Also, see this longer explanation for Lyx: askubuntu.com/a/8331/78383 – mcbetz Feb 13 '13 at 14:19
  • @KOF: Fine! If my answer works for you, you may tick the solved button so everyone sees that it's been solved. – mcbetz Feb 13 '13 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.