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.

MWE:

\documentclass{article}
\usepackage{iftex}
\ifXeTeX\else
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
\fi
\usepackage{libertine}

\begin{document}
\ifXeTeX \addfontfeatures{Variant=01} \fi
ÖÜ
\end{document}

If you compile this with XeLaTeX, you get a different looking Ö and Ü character. It is very nice from the creators of Libertine that they included this alternate version that does not look weird for Hungarian eyes. Is there a way to use this in PDFLaTeX as the default Ö and Ü?

share|improve this question
    
You should create an alternative set of .pfb files with accompanying .tfm and .vf files that use the glyph Odieresis.alt and Udieresis.alt instead of Odieresis and Udieresis. Such a conversion can be done with otftotfm. –  egreg Oct 8 '13 at 20:32
    
@egreg So there is no "paste this into your preamble" hackery solution. Well then, I'm going for XeLaTeX. –  marczellm Oct 10 '13 at 7:49
    
No, unless you convince Bob Tennent to add a new variant besides tlf, tos and so on, where otftotfm uses the ss01 feature. –  egreg Oct 10 '13 at 10:40
add comment

1 Answer

up vote 2 down vote accepted

One should create a new font set with otftotfm; as a proof of concept, I tried to do

otftotfm -e texnansx --no-updmap --coding-scheme='EXTENDED TEX FONT ENCODING - LATIN' --feature=kern --feature=liga --feature=lnum --feature=tnum --feature=ss01 LinLibertine_R.otf LinLibertineT-tlf-t1

and received as output the line

LinLibertineT-tlf-t1--base LinLibertineO "AutoEnc_l6dd3wk7q223pbmgrvq427ywmd ReEncodeFont" <[a_l6dd3w.enc <LinLibertineO.pfb

that I added as argument to \pdfmapline in the test file. The difference with the original call made by Bob Tennent (this can be found in the .enc file generated by otftotfm and read during a run of pdflatex) is that I added the option --feature=ss01.

Here's the test file

\documentclass{article}
\pdfmapline{LinLibertineT-tlf-t1--base LinLibertineO "AutoEnc_l6dd3wk7q223pbmgrvq427ywmd ReEncodeFont" <[a_l6dd3w.enc <LinLibertineO.pfb}

\usepackage{iftex}
\ifXeTeX\else
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
\fi
\usepackage{libertine}

\begin{document}
\ifXeTeX \addfontfeatures{Variant=01} \fi
ÖÜ
\end{document}

I ran this in the directory where the various fonts had been created. Here's the output.

enter image description here

Of course this would overwrite the files in the distribution, so a whole new font family should be created (changing -tlf- in the name or something like it) with a suitable style file and so on. What I did for the upright font should be repeated for the other fonts of the family.

Definitely not for the faint of heart. Use XeLaTeX.

share|improve this answer
add comment

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.