1

I am using XeLaTeX and fontspec and trying to insert a Turkish Lira symbol ₺ into my document. Minimal example:

\documentclass{report}

\usepackage{fontspec}
\usepackage{xspace}

\newfontfamily\djvuserif{DejaVu Serif}
\newcommand{\Lira}[0]{{\djvuserif ₺}\xspace}

\begin{document}
\Lira 2
\end{document}

It just outputs ? 2 (with the question mark in the DejaVu font!). How do I do this properly?

3
  • Possibly, the font you are using does not contain that specific glyph (cf. message in the log: Missing character: There is no ₺ (U+20BA) in font DejaVu Serif/OT:script=latn;language=dflt;! Commented Jul 13, 2023 at 14:35
  • @lacobus1983, no. U+20BA in DejaVu Serif is displayed in the Character Map and it can be typed in Word. Unless XeLaTeX is using a different version of the font from the one in C:\Windows\Fonts ?
    – noxewa
    Commented Jul 13, 2023 at 14:54
  • That message does not appear in my .log file, either...
    – noxewa
    Commented Jul 13, 2023 at 14:55

1 Answer 1

1

The character is not available in DejaVu Serif.

You can see what fonts on your system have it by using

albatross ₺

from a command line. Here I use Noto Serif, you choose the one you like the most. But no hope with DejaVu Serif.

\documentclass{report}

\usepackage{fontspec}
\usepackage{xspace}

\newfontfamily\lirafont{Noto Serif}
\newcommand{\Lira}[0]{{\lirafont ₺}\xspace}

\begin{document}
\Lira 2
\end{document}

enter image description here

To be honest, I'd not use \xspace.

\documentclass{report}

\usepackage{fontspec}
\usepackage{xspace}

\newfontfamily\lirafont{Noto Serif}
\newcommand{\Lira}{{\lirafont ₺}}
\newcommand{\TL}[1]{\Lira~#1}

\begin{document}

\Lira

\TL{2}

\end{document}

enter image description here

9
  • Well, I'm not sure what to say... Character Map clearly displays it as part of the font: imgur.com/JbVUUnw
    – noxewa
    Commented Jul 13, 2023 at 15:08
  • @noxewa Never trust Character Map. It fills in missing glyphs with font substitution.
    – egreg
    Commented Jul 13, 2023 at 15:14
  • DejaVu Serif also appears in the output of albatross ₺
    – noxewa
    Commented Jul 13, 2023 at 15:14
  • @noxewa I checked and the DejaVu Serif font distributed with TeX Live doesn't have the character.
    – egreg
    Commented Jul 13, 2023 at 15:20
  • however, I have the latest version 2.37 of DejaVu Serif installed on Windows, which does.
    – noxewa
    Commented Jul 13, 2023 at 15:27

You must log in to answer this question.

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