21

How can I get the Wikipedia-looking crossing-w from Linux Libertine font?

They talk about it on their homepage and in the wikipedia article, but I can't find an example of how to actually produce it.

Fyi I'm using xetex with fontspec.

3
  • 5
    I guess you're looking for this:\libertineGlyph{W.alt}
    – cgnieder
    Mar 8, 2012 at 21:01
  • 1
    @cgnieder You could turn this into an answer. (And it assumes you've loaded the libertineotf package.) Is there a way to do it without?
    – Alan Munn
    Mar 8, 2012 at 21:21
  • @AlanMunn: It should be possible with fontspec's Alternate feature. Mar 8, 2012 at 21:22

2 Answers 2

24

The “official” way, is to activate stylistic set 5 feature, StylisticSet=5 fontspec option. If you to use it locally then you can define a “font family” with that option, and if you want it globally you should pass it to \setmainfont. This is also the most portable way, as the glyph name (W.alt) or the private use area code point (U+E02F) can change in the future since they are “internal” to the font and should not concern its users, only the OpenType features are the “public” interface.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\newfontfamily\libertinew[StylisticSet=5]{Linux Libertine O}
\begin{document}
\textsc{Wikipedia}\par
\textsc{\libertinew Wikipedia}
\end{document}
8
  • 9
    How did you know to use 5 as the StylisticSet?
    – Alan Munn
    Mar 9, 2012 at 0:57
  • 2
    I couldn't find it in the documentation (not mentioned explicitly, but I don't know German anyway), so I opened the font in FontForge and checked the alternates of the W glyph :). Mar 9, 2012 at 1:06
  • 4
    Man, there is got to be an easier way of doing these things... Mar 9, 2012 at 1:12
  • 11
    @drozzy: yes, it is called proper documentations (which reminds me to properly document my own fonts :p). Mar 9, 2012 at 1:21
  • 1
    What would be the official way if one doesn't use XeLaTeX? \libertineGlyph works with pdflatex as well...
    – cgnieder
    Mar 9, 2012 at 8:21
9

The character is accessible through \libertineGlyph{W.alt} or \libertineGlyph{uniE02F}

\documentclass{scrartcl}
\usepackage{fontspec}
\usepackage{libertineotf}
\setmainfont{Linux Libertine O}

\begin{document}

\libertineGlyph{W.alt}\textsc{ikipedia} \libertineGlyph{uniE02F}\textsc{ikipedia}

\end{document}

enter image description here

As Andrey Vihrov pointed out in his comment you can also access the glyph with \char"E02F without having to load libertineotf.

\documentclass{scrartcl}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}

\begin{document}

\char"E02F\relax\textsc{ikipedia}

\end{document}
8
  • 1
    I found out that Alternate doesn't quite work. But you can get the glyph with \char"E02F\relax, then libertineotf is not needed. Mar 8, 2012 at 21:52
  • 1
    Does it work as well if you put the W in the \textsc? The way it is, the kerning looks a little off, repositioning it might help.
    – doncherry
    Mar 8, 2012 at 22:43
  • 2
    Well, one probably wants to put everything in a macro called \WikipediaMark, say, so you stick a manual \kern -0.05em or something in there.
    – kahen
    Mar 8, 2012 at 22:54
  • 1
    @cgnieder: Hmm, with the \libertineGlyph versions, it fixes the kerning, but the W appears strangely, I'd say it's italic. No idea why. \textsc{\char"E02F\relax ikipedia} looks good -- correct letter and right kerning.
    – doncherry
    Mar 8, 2012 at 23:17
  • 1
    @drozzy You find it in the libertine manual in the »Glyphs« section
    – cgnieder
    Mar 8, 2012 at 23:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .