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.

I have a XeLaTeX document with lower half brackets ⸤⸥ (U+2E24,U+2E25) and upper half brackets ⸢⸣ (U+2E22,U+2E23). In the log file I get the complaint like Missing character: There is no ⸤ in font... when I use Gentium or FreeSerif. However, in other contexts (Gnome Terminal, LibreOffice) these characters show up in those fonts. How can I get these characters to appear in my document?

\documentclass[12pt,letterpaper]{article}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{FreeSerif}
\begin{document}
\paragraph{} These are ⸤lower half-brackets⸥. These are ⸢upper half-brackets⸣.
It seems that other symbols work—such as ê.
\end{document}

Result

Relevant portion of the log file:

Missing character: There is no ⸤ in font Free Serif/ICU:mapping=tex-text,!
Missing character: There is no ⸥ in font Free Serif/ICU:mapping=tex-text,!
Missing character: There is no ⸢ in font Free Serif/ICU:mapping=tex-text,!
Missing character: There is no ⸣ in font Free Serif/ICU:mapping=tex-text,!
share|improve this question
    
How do you load the fonts? Are you sure they are also used in math mode? A minimal working example (MWE) would help. –  Andrey Vihrov Oct 8 '11 at 18:57
    
@AndreyVihrov I am not using math mode...is that the problem? I added the MWE you requested. –  Kazark Oct 8 '11 at 19:16
2  
The other contexts probably use some fall-back font; specifically the symbols are available in DejaVu Sans. –  Caramdir Oct 8 '11 at 19:24
    
@Caramdir that is an incredibly helpful comment! When I used DejaVu Sans, everything showed. I had no idea that applications used that as a fallback font. Of course, I don't actually want to typeset the document in DejaVu Sans... –  Kazark Oct 8 '11 at 19:35

2 Answers 2

up vote 5 down vote accepted

Not to hijack Caramdir's answer, but only to show a simpler solution, from the point of view of user input (it's equivalent from the TeXnical point of view):

\newfontfamily\fallbackfont{DejaVu Sans} % or any other font having the glyphs

\usepackage{newunicodechar}

\newunicodechar{⸤}{{\fallbackfont ⸤}}
\newunicodechar{⸥}{{\fallbackfont ⸥}}
\newunicodechar{⸢}{{\fallbackfont ⸢}}
\newunicodechar{⸣}{{\fallbackfont ⸣}}
share|improve this answer
    
Well, this is clearly an easier solution. I always forget about newunicodechar... –  Caramdir Oct 8 '11 at 21:36
2  
@Caramdir Curiously, I don't. :) –  egreg Oct 8 '11 at 21:40

The following is adapted from Importing missing glyphs in font. It makes the ⸤⸥⸢⸣ symbols use DejaVu Sans. I'm not particularly happy about how it looks since DejaVu Sans doesn't mix well with Gentium. Maybe you can find a better fall-back font (though few text fonts seem to contain these symbols).

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Gentium}

\newfontfamily\fallbackfont{DejaVu Sans}
\let\swbrackchar=⸤
\catcode`⸤=\active
\protected\def⸤{{\fallbackfont\swbrackchar}}
\let\sebrackchar=⸥
\catcode`⸥=\active
\protected\def⸥{{\fallbackfont\sebrackchar}}
\let\nwbrackchar=⸢
\catcode`⸢=\active
\protected\def⸢{{\fallbackfont\nwbrackchar}}
\let\nebrackchar=⸣
\catcode`⸣=\active
\protected\def⸣{{\fallbackfont\nebrackchar}}

\begin{document}
These are ⸤lower half-brackets⸥. These are ⸢upper half-brackets⸣.
\end{document}

result

I'd be interested to know whether there is a mechanism to specify a global fall-back font, but that should be a separate question.

(Btw, \paragraph{...} is a sectioning command and isn't needed to start a paragraph.)

share|improve this answer

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.