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.

Caramdir
  • 89,023
  • 26
  • 255
  • 291

2 Answers2

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}
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}
cgnieder
  • 66,645
  • 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. – Andrey Vihrov Mar 08 '12 at 21:52
  • @AndreyVihrov Ah, I should have thought of that. It's quite obvious, actually... – cgnieder Mar 08 '12 at 21:54
  • 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 08 '12 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 08 '12 at 22:54
  • @doncherry I haven't tried it out (I can't say why, actually) but I guess it does. But if it doesn't there's still kahen's suggestion. – cgnieder Mar 08 '12 at 23:04
  • 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 08 '12 at 23:17
  • @AndreyVihrov How in the world did you find the code for that letter? Can you share your wizard ways... – Andriy Drozdyuk Mar 08 '12 at 23:27
  • 1
    @drozzy You find it in the libertine manual in the »Glyphs« section – cgnieder Mar 08 '12 at 23:32