Fonts & Character SetsStandard Font DIN OT Regular

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
Moruk
Posts: 18
Joined: Sun Jun 12, 2011 2:00 pm

Standard Font DIN OT Regular

Post by Moruk »

Hi,

How can I use an external (commercial) font like DIN OT Regular (OpenType) as Standard-Font?

Code: Select all

\renewcommand{\familydefault}{\???}
lg
Last edited by Stefan Kottwitz on Sat Sep 10, 2011 1:40 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Standard Font DIN OT Regular

Post by Frits »

There are multiple ways to do this, but I prefer XeTeX when using non-standard fonts.
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Moruk
Posts: 18
Joined: Sun Jun 12, 2011 2:00 pm

Standard Font DIN OT Regular

Post by Moruk »

Code: Select all

\usepackage[cm-default]{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}

Code: Select all

\setmainfont[Mapping=tex-text]{DIN OT}
I get this error: not loadable (metric-tfm) file not found

how do I have to install the font?
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Standard Font DIN OT Regular

Post by frabjous »

You either need to install the font, or use the font's file name. See page 6 of the fontspec manual.
Moruk
Posts: 18
Joined: Sun Jun 12, 2011 2:00 pm

Standard Font DIN OT Regular

Post by Moruk »

Ok, I installed the Font in Ubuntu.

Code: Select all

\setmainfont{/pathtofile/DINOT.otf}
does not work...
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Standard Font DIN OT Regular

Post by frabjous »

Does it work when installed on Ubuntu?

Does the path to the file have spaces in it?
Moruk
Posts: 18
Joined: Sun Jun 12, 2011 2:00 pm

Standard Font DIN OT Regular

Post by Moruk »

Yes, I can use the font in OpenOffice.

Code: Select all

%%This is a very basic article template.
%%There is just one section and two subsections.
\documentclass{article}

\usepackage[cm-default]{fontspec} % OpenType Fonts
\usepackage{xunicode} % OpenType Fonts
\usepackage{xltxtra} % ÓpenType Fonts

\setmainfont{/home/user/.fonts/DINOT.otf}

\begin{document}

\section{Title}

\subsection{Subtitle}

Plain text.

\subsection{Another subtitle}

More plain text.


\end{document}
missfont.log:

Code: Select all

mktextfm /home/user/.fonts/DINOT.otf/B
mktextfm /home/user/.fonts/DINOT
mktextfm /home/user/.fonts/DINOT.otf/I
mktextfm /home/user/.fonts/DINOT
mktextfm /home/user/.fonts/DINOT.otf/BI
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Standard Font DIN OT Regular

Post by frabjous »

You are compiling with xelatex, right?

Anyway, the idea was to either give the full path to the font OR install it on Ubuntu and use the normal \setmainfont line, not both.

Now that it's installed on Ubuntu, what does:

Code: Select all

fc-list | grep -i DIN
Yield from the terminal? Are you using exactly that (before the colon) in the argument to \setmainfont?
Moruk
Posts: 18
Joined: Sun Jun 12, 2011 2:00 pm

Re: Standard Font DIN OT Regular

Post by Moruk »

Ok, now it works with \setmainfont{DIN OT}.

Perfect, thank you :D
millesogni
Posts: 1
Joined: Sun Jan 29, 2012 7:37 pm

Re: Standard Font DIN OT Regular

Post by millesogni »

Hi!
I need to use the font DIN, but I use LaTeX and a Macintosh... Can you help me?

I would like to use Xelatex, but I have the LaTex class in which I use the minion package and I don't know if it's a problem...

Thank you!
Post Reply