[Tex/LaTex] Accessing Private Use Area Character by fontspec in XeTeX

fontspecopentypexetex

I am using XeTeX to encode Opentype fonts. One of the feature of opentype font is availability of Private Use Area.

Generally, Private Use Area in most cases contains different variants of same characters and different ligatures. It also contains characters that has not been defined by Unicode.
This Private Use Area comes in great application when encoding many Indic Texts(Sanskrit and others), which have many variants of same text and many more text left to be encoded by Unicode. So, font provider supply those characters in Private Use Area.

Question: How do I access Private Use Area by using fontspec in XeTeX ?
Yes! I check the manual of fontspec but didn't seem to find this ?

Any help would be appreciated.

Best Answer

You can either insert the character itself into the source, since XeTeX expects unicode-encoded source (provided your editor is compliant), or you can use \char"#### where #### is the unicode hex number.

\documentclass{article} 
\usepackage{fontspec}
\setmainfont{Linux Libertine O}

\begin{document}
 %Here I have the character itself, which may or may not show up on your end
\char"E000 % here is the unicode reference number
\end{document}

produces:

alt text

There are probably other ways too, but these work for me.