7

If i compile a document with lualatex that contains specific utf-8 characters most pdf-viewers (okular, evince, xpdf) don't show them. For example if i compile the following example i just see a bank page.

My tex/latex distribution is texlive 2014 and runs on a debian (jessie) system.

Maybe someone around here have a solution how to make those glyphs visible?

\documentclass{scrartcl}

\usepackage{luatextra}
\usepackage{fontspec}
\setmainfont{Linux Libertine Display O}
\setsansfont{Linux Biolinum O}

\begin{document}
%
% specific unicode characters
%
✧ ⎘ ✲
\end{document}
  • 4
    Use a font that has the symbols. E.g. \setmainfont{Arial Unicode MS}. – Ulrike Fischer Jul 23 '14 at 15:38
  • 3
    Set \tracinglostchars=2, then TeX reports, if characters are missing in the font. – Heiko Oberdiek Jul 23 '14 at 15:40
  • 3
    The NEXT PAGE symbol U+2398 is not in my copy of Arial Unicode MS; it is in Code2000, FreeSerif and FreeMono. – egreg Jul 23 '14 at 15:41
  • 2
    This comment is perhaps a bit off-topic, but... What are 6-byte utf-8 chars? According to what I know about UTF-8, the longest possible sequence is 4 bytes. Indeed, the characters you pasted (✧ ⎘ ✲) require only 3 bytes each (e2 9c a7; e2 8e 98 and e2 9c b2, respectively) – JLDiaz Jul 23 '14 at 16:47
  • @egreg & Ulrike: Thank you both, you get me on the right track. I have to blame gnome's font-manager application for the problem. The character maps of all fonts show these special symbols in this app. I'll inform the author about that... Best regards – user1146332 Jul 24 '14 at 9:03
7

You have to use a font that has the required glyphs. They are in FreeSerif, for instance. Here's how you can use them directly, by hiding the font change in a macro:

\documentclass{scrartcl}

\usepackage{fontspec}
\usepackage{newunicodechar}

\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}

\newfontface{\freeserif}{FreeSerif} % for the required symbols
\newunicodechar{✧}{{\freeserif ✧}}
\newunicodechar{⎘}{{\freeserif ⎘}}
\newunicodechar{✲}{{\freeserif ✲}}

\begin{document}
✧ ⎘ ✲
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.