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 have attempted to install a new font (source-sans-pro) onto my gentoo server, however when I run xelatex test.tex the PDF file it generates uses the font but does not give the expected output - i.e. the words "this is a test" show as the attached image:

http://i.stack.imgur.com/QkaI4.png

The code I am using is as follows:

\documentclass[12pt]{article}
\usepackage{fontspec}
\setromanfont[Mapping=tex-text]{Source Sans Pro Light}

\begin{document}

This is a test.

\end{document}

Nothing ground breaking there - I'm wondering if perhaps the font has not been installed correctly, after a bit of googleing I found the following website - however following said instructions doesn't really give me anything other than the same result again..does anyone have any ideas? or even links to some documentation on how to install XeLaTeX fonts on gentoo correctly?

share|improve this question
    
Welcome to TeX.SX. Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  Claudio Fiandrino Jan 23 '13 at 14:05
    
Did you download Source Sans Pro from here?. Also: does the same happen when you use \usepackage[default,otf,light]{sourcesanspro}? –  Silex Jan 23 '13 at 15:02
    
Tried that - and I get the following error: ! LaTeX Error: File `sourcesanspro.sty' not found. –  andy99998 Jan 23 '13 at 15:21

1 Answer 1

up vote 1 down vote accepted

I suppose that the fonts are already installed in your system. XeTeX does not like it when fonts are installed twice. Delete the otf-fonts in your tex tree or in /usr/share/fonts/opentype/ and it should work.

after deleting the system fonts: run fc-cache -fv

after deleting the tex fonts: run texhash

share|improve this answer
    
Thanks - that worked. :) –  andy99998 Jan 23 '13 at 15:31

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.