I'd like to set a custom font I acquired for all section and subsection headers in a scratcl paper I'm writing. It's a ttf and installed correctly on my Mac.

I know about \setkomafont and \addtokomafont, and I also have found the fontspec package, but all that seems to do is set the font for the entire document via \setmainfont, or for a section via \fontspec if I understand correctly.

I just can't seem to add one and one here, so to recap: how do I set (sub)section headers to a font installed on my Mac?


To use the system fonts you need to use xe(la)tex or lualatex instead of (pdf)latex. And with fontspec you can define a new family with \newfontfamily.

% I'm a UNICODE/UTF-8 encoded file!

\newfontfamily\atfamily{American Typewriter}


% for testing


Save this file as UTF-8 file and compile it with xelatex then you’ll get this.


  • Thanks for answering! Also thanks for using \addtokomafont, I hate having to figure out sizes and stuff :) – Zsub Mar 26 '12 at 10:44

If you want to use pdf(la)tex you will have to generate the various support files needed: metrics .tfm, encoding files, font definition files, map files, perhaps virtual font files.

With xelatex/lualatex you can use the font directly:

\setkomafont{subsection}{\color{red}\fontspec{Times New Roman}}

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.