[XeTeX] supplying missing glyphs?

Steve Peter speter at mac.com
Fri Dec 3 03:25:31 CET 2010


On Dec 2, 2010, at 7:20 PM, Adam McCollum wrote:

>  Is there any way at all to "fake" these glyphs or otherwise supply them? Any and all suggestions welcome!

Well, yes: brute force, but it isn't pretty. (You'd probably be better off with another typeface, unless Hoefler Text has already been specified.) Basically, you need to compose a macro for each missing character, adjusting spacing as needed, which ends up being a major pain, since italics won't space identically. Sometimes, you can define generic variants, but other times, you have to be more character specific.

\documentclass{article}

\usepackage{xltxtra}

\def\Long#1{\kern.15em\raisebox{.6ex}[0pt][0pt]{-}\kern-.45em{#1}\kern.15em}
\def\Hacek#1{\kern.1em\raisebox{0ex}[0pt][0pt]{\v{~}}\kern-.45em{#1}\kern.45em}
\def\Short#1{\kern.015em\raisebox{0ex}[0pt][0pt]{\u{~}}\kern-.45em{#1}\kern.25em}
\def\UBar#1{\kern.1em\raisebox{-1.15ex}[0pt][0pt]{-}\kern-.45em{#1}\kern.15em}
\def\UBart{\raisebox{-1.15ex}[0pt][0pt]{-}\kern-.375em{t}\kern.015em}
\def\Dotd{\kern.15em\raisebox{-.625ex}[0pt][0pt]{.}\kern-.45em{d}}
\def\Doth{\kern.01em\raisebox{-.625ex}[0pt][0pt]{.}\kern-.425em{h}}
\def\DotH{\kern.35em\raisebox{-.625ex}[0pt][0pt]{.}\kern-.525em{H}}
\def\Dotk{\kern.15em\raisebox{-.625ex}[0pt][0pt]{.}\kern-.42em{k}}
\def\Dotr{\kern.075em\raisebox{-.625ex}[0pt][0pt]{.}\kern-.26em{r}}
\def\Dot#1{\kern.15em\raisebox{-.625ex}[0pt][0pt]{.}\kern-.33em{#1}}
\def\Fud#1{\kern.125em\raisebox{-1.7667ex}[0pt][0pt]{\u{~}}\kern-.45em{#1}\kern.325em}
\def\Barl{\kern.05em\raisebox{-.1ex}[0pt][0pt]{-}\kern-.3em{l}}

\defaultfontfeatures{Scale=MatchLowercase}

\setromanfont{Hoefler Text}

\begin{document}

\title{Test for Hoefler Text with Diacritical Marks}
\author{Yours truly}
\maketitle

ā å ḇ ḍ ē ǵ ḡ ğ ġ ǧ ḥ ḫ ħ ḳ ł ƚ ō ŏ œ ṛ š ṣ ṭ ṯ ẓ Š Ḥ

ā å \UBar{b}\ \Dotd\ ē ǵ \Long{g} ğ ġ \Hacek{g} \Doth{} \Fud{h} ħ \Dotk{} ł \Barl{} ō \Short{o} œ \Dotr{} š \Dot{s} \Dot{t} \UBart{} \Dot{z} Š \DotH{}

% a a b d e g g g g g h h h k l l o o œ r s s t t z Š H  <-- to test for spacing

\end{document}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Untitled.pdf
Type: application/pdf
Size: 19685 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20101202/f22d786a/attachment-0001.pdf>


More information about the XeTeX mailing list