Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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

\documentclass{scrartcl}
\usepackage{fontspec} % Allows font customization
\usepackage{xltxtra}

\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Ubuntu} % Main document font

\begin{document}

A one-line test.

\end{document}
share|improve this answer
    
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... –  Martin Betz Feb 13 '13 at 14:17
1  
Also, see this longer explanation for Lyx: askubuntu.com/a/8331/78383 –  Martin Betz Feb 13 '13 at 14:19
    
the ubuntu font does exist. thanks –  KOF Feb 13 '13 at 14:40
    
@KOF: Fine! If my answer works for you, you may tick the solved button so everyone sees that it's been solved. –  Martin Betz Feb 13 '13 at 14:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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