# Half Brackets Not Showing in XeLaTeX

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}


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,!

-
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
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

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 ⸣}}

-
Well, this is clearly an easier solution. I always forget about newunicodechar... – Caramdir Oct 8 '11 at 21:36
@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}


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.)

-