[XeTeX] adding some diacritics to a font
Fr. Michael Gilmary
FrMichaelGilmary at MaroniteMonks.org
Wed Jan 7 17:14:49 CET 2009
Hi François:
Yesterday I sent you some code that works with Garamond Premier Pro to
produce the diacritics you were hoping to use.
Since I was pressed for time, I was unable to give the code for the
other glyphs you were hoping to combine, the dot *over* the letter n.
Nor was I able to give credit where it's due.
The code submitted yesterday, as well as what's below, was sent into
this list last fall by Juan Acevedo (25 Aug 2008), who got it from the
XeTeX archives long ago from no less a figure that JK himself!
I slightly modified the Jonathan's code below (named "\def\vontop") so
that it looks best.
So, for Garamond Premier Pro's own "dot above" glyph (Unicode 02D9), to
combine with n:
\def\dotontop#1{\leavevmode \vtop{\offinterlineskip \ialign{##\cr #1\cr
\setbox0=\hbox{\hbox{\char"02D9}}\ht0=0pt\dp0=0pt\hidewidth\box0
\hidewidth\cr}}}
%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
> %% for a missing character, gratia Musa Furber and JK, XTX archives
> 20051102
> \def\vontop#1{\leavevmode \vtop{\offinterlineskip \ialign{##\cr #1\cr
>
> \setbox0=\hbox{\raise.46ex\hbox{\char"EB0A}}\ht0=0pt\dp0=0pt\hidewidth\box0
> \hidewidth\cr}}}
>
> And then modified to get some others:
>
> %ring underneath
> \def\ounder#1{\leavevmode \vtop{\offinterlineskip \ialign{##\cr #1\cr
>
> \setbox0=\hbox{\raise-.1ex\hbox{{\IPA\char"02F3}}}\ht0=0pt\dp0=0pt\hidewidth\box0
> \hidewidth\cr}}}
> e
> %right half ring underneath
> \def\rhrunder#1{\leavevmode \vtop{\offinterlineskip \ialign{##\cr #1\cr
>
> \setbox0=\hbox{\raise-.1ex\hbox{{\IPA\kern6pt\char"0339}}}\ht0=0pt\dp0=0pt\hidewidth\box0
> \hidewidth\cr}}}
>
> \IPA here means simply this: \newfontfamily\IPA{Doulos SIL}. My main
> font did not have the diacritics, not even as separate characters, so
> I borrowed them from Doulos.
>
> With \def you name your command specifying it has 1 (#1) argument.
> E.g. \vontop, \ounder...You would then say \vontop{u}, to get a u
> with...obvious, no?
>
> I don't understand much of the rest (but don't mess with it, as it
> comes from "there where what is done is understood") except the
> positional \raise and \kern, whereby you can adjust appeareance.
>
> You just need to know what your Unicode character is and modify the
> code after \char"
%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
Hope that helps!
--
United in adoration of Jesus,
fr. michael gilmary, mma
Most Holy Trinity Monastery
67 Dugway Road
Petersham, MA 01366-97255
More information about the XeTeX
mailing list