[XeTeX] Coloured fonts

Philip Taylor P.Taylor at Hellenic-Institute.Uk
Thu Mar 18 22:28:32 CET 2021


David Carlisle wrote:

> Sigh, I thought you'd like the challenge:-)
>
> with luahbtex:
>
>
>
> \input luaotfload.sty
> \font\chess=BabelStoneXiangqiColour.ttf:mode=harf
>
>
> testing {\chess ^^^^^^01fa64}
>
> \bye

But does that give a coloured glyph, as did your LuaLaTeX version ? I 
ask because I have integrated your code into my book source (see below) 
and I get (a) a warning that the font is not found, and (b) a monochrome 
glyph.

** Phil.
--------
% !TeX Program=LuaTeX

\magnification 900

\input luaotfload.sty

\font \bodyfont = "Minion Pro"
\font \tenit = "MinionPro-IT"
\font \smallcaps = "Minion Pro/ICU:+smcp"
\font \oldstyle = "Minion Pro/ICU:+onum"
\font \pieces = "BabelStone Xiangqi Colour:mode=harf"
\font \pieces = BabelStoneXiangqiColour.ttf:mode=harf
%\pdfpagewidth = 35 true pc
%\pdfpageheight = 59 true pc
\hsize = 25 true pc
\advance \hoffset by -1 true in
\advance \voffset by -1 true in
\advance \hoffset by 5 pc
\advance \voffset by 13 true pc
\pretolerance = 9999
\spaceskip = 0,333 em plus 0,3 em minus 0,1 em
\xspaceskip = 1 em plus 0,3 em minus 0,1 em
\def \lineturn {\unskip {\parfillskip = 0 pt \endgraf 
\noindent}\ignorespaces}
\def \ignore #1{}
\catcode `\“ = \active
\catcode `\” = \active
\catcode `\; = \active
\catcode `\: = \active
\def \Prespace #1{\def #1{$\;$\char `#1\relax}}
\def \prespace #1{\def #1{$\,$\char `#1\relax}}
\def \postspace #1{\def #1{\char `#1\relax $\,$}}
\prespace ”
\Prespace ;
\Prespace :
\postspace “
\bodyfont
\parskip = 0 pt
\noindent
{\smallcaps Chinese} Chess has been regarded, from the times of Hyde and
Daines Barrington to our own, rather as a fit subject for the
antiquarian or the magazine writer than a practicable, or what an
American would more \lineturn forcibly call it, “a real live” game. It 
is true
that in his work on {\it Ancient \lineturn and~Oriental Games\/} 
published last
year Mr.~Edward Falkener has endeavoured to illustrate its very great
attractions, but unfortunately he had been misinformed as to the
movements of some of the pieces (notably the Cannon) and the games he
gives cannot be taken to represent Chinese Chess. Here in China foreign
writers have so far contented themselves with describing the board and
men and adding a few endings or problems.  Beyond a vague intimation that
“the Chinese usually commence the \lineturn attack by a Cannon to the 
middle file”
no idea of the recognised openings has been afforded. One reason for
this reticence is the scarcity of native works on the subject. Works on
end-games abound, being in large demand for gambling purposes. Your true
Chinaman looks upon a pastime as flat and unprofitable unless it can be
made to bring in cash. Even Chess is utilised for this praiseworthy
purpose, and there are few towns in China where the professional player
is not prepared to set up an \lineturn end-game on the board, give you 
choice of
men, and beat you for a wager. Manuals showing the opening are, however,
to be had, and from one of these {\it The Secrets of the Orange Grove},
published originally in {\oldstyle 1632} but  \lineturn still on sale, 
has been compiled for the
present pamphlet.

This is offered not as a final Handbook of Chinese Chess, but as the raw
material of such a book. It has, indeed, been reprinted just as it
appeared from time to time in the North-China Herald where it formed a
Chess column. In some places it stands in need of revision, in others of
addition or compression. For example on page~{\oldstyle 9} the rule that 
perpetual
check is barred—for it is a rule—should be stated positively and not
tentatively; and such careless comments as the last line of 
p.~{\oldstyle 37} should
be \lineturn struck out. In fact there is room and enough for a Second 
Edition,
towards the compiling of which both author and publisher, with all
proper (but metaphorical) head-knockings, invite the kindly co-operation
of every Chess lover.
\vskip 2\baselineskip
{\smallcaps Shanghai}, {\oldstyle 1893}.

\pieces
\centerline {\char "1FA60\relax}

\end


More information about the XeTeX mailing list.