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.

This is a followup to Are the Lido STF font installation instructions up-to-date?. I have the Lido STF fonts installed as described there. I also have them installed in OpenType format in C:\Windows\Fonts. I'm using MiKTeX.

This code compiled with PDFLaTeX gives correct output, while compiling with XeLaTeX makes the first sentence bold italic and the second sentence regular.

\documentclass{article}
\usepackage{iftex}
\ifXeTeX
    \usepackage{fontspec}
    \setmainfont[Ligatures=TeX]{Lido STF}
\else
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \renewcommand{\rmdefault}{sld}
\fi

\begin{document}
{\itshape This is supposed to be italic.}
{\bfseries And this bold.}

\end{document}

Additionally Adobe Reader tells me that even when I use XeTeX, the Type1 fonts are used.

What is the problem and how do I fix it permanently?

share|improve this question
1  
If you have two version of a font (e.g. in your case a type1 and a opentype version) then it can happen that xetex gets confused and uses the wrong one or mixed them in the steps of the compilation. Use the filename in the \setmainfont to force xetex to use the open type version. –  Ulrike Fischer Nov 12 '13 at 11:06

1 Answer 1

up vote 1 down vote accepted

I ended up writing a style file for loading the font (save as lidostf.sty):

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lidostf}[2013/11/12]
\RequirePackage{iftex}
\ifXeTeX
    \RequirePackage{unicode-math}
    \setmainfont[Extension=.otf,
                 BoldFont = *bold,
                 ItalicFont = *italic,
                 BoldItalicFont = *bolditalic,
                 Scale=0.93,
                 Ligatures=TeX]
                 {lidostf}
    \setmathfont{XITS Math} % or TeX Gyre Termes Math
\else
    \renewcommand{\rmdefault}{sld}
    \RequirePackage[cmintegrals]{newtxmath}
\fi

These issues are yet to be solved:

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.