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.

Im using latex to automate some report generation. We use the font Rockwell as a default font. Im not used to latex and I found many different ways of changing the default font but many of them seemed very strange and none of it worked for me! So what is a simple way to change the font and can I include a font like Rockwell without any problems or do I need to import not that standard fonts in a special way?

share|improve this question
2  
I don't think that support files for (pdf)latex exists. So I would suggest: Use xelatex and \usepackage{fontspec}\setmainfont{Rockwell} (or whatever is the internal name of the font). –  Ulrike Fischer Feb 6 '12 at 14:04
    
Thank you! I tried it but it still cannt find the Font-File. Where should I put the files so its recognised by xelatex? Error => ! I can't find file `Rockwell'. –  davidb Feb 6 '12 at 14:15
1  
I presume the font is installed on your System (by the way, which one? Windows?) If you have a quite new Distribution and are able to run XeTeX, then the command \usepackage{fontspec} \setromanfont[Ligatures={Common}]{Rockwell} should work. Edit: Sorry, my solution is quite similar to the one Ulrike already posted, though mine does change the roman font only. –  Ronny Feb 6 '12 at 14:25
1  
Run fc-list | grep Rockwell or otherwise examine the fc-list output. If your font is installed properly, you will see the name by which you can select it with fontspec. If your font is not listed, place it in ~/.fonts (create the directory if needed) and run fc-cache. –  Andrey Vihrov Feb 6 '12 at 18:49
1  
this solved it! Thank you! Post it as an answer and I will accept it! –  davidb Feb 7 '12 at 13:28

1 Answer 1

up vote 3 down vote accepted

The problem, as described in comments, is to determine the correct font name for use with fontspec.

Mini-Howto on selecting fonts with fontconfig

XeTeX relies on OS-specific libraries to load fonts. In case of Linux it is the fontconfig library. It's quite easy for basic use.

  • If the font is already installed in the system (and many will be), it can be selected simply by its name. You can find out the precise name to use by issuing fc-list and examining the output (perhaps with the help of grep).
  • If the font is not listed, it can be installed manually. Fonts can be installed system-wise or user-wise. I recommend the second way, because it does not require additional privileges and won't pollute the system directories. To install a font, simply place it in the .fonts directory in your home directory. You may need to create the directory if it doesn't exist, and you may need to enable display of hidden files to see this directory in your file manager. Once the font has been placed in the directory, run fc-cache to regenerate the font cache, then try the first step again.
share|improve this answer

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.