[XeTeX] Coloured fonts

Paul A Norman paul.a.norman at gmail.com
Fri Mar 19 07:37:28 CET 2021


Thanks Jonathan,

Absolutely correct.
Ross's link covers the previously competing technologies for this (which
are still around), and much the same can apply to any of them depending on
how things are processed right through to end product.

Paul

On Fri, 19 Mar 2021 at 13:57, Jonathan Kew <jfkthame at gmail.com> wrote:

> On 18/03/2021 23:50, Paul A. Norman wrote:
> > If a pdf (pre)viewer component is not coded to do it by itself, the
> > underlying operating system may be called to do the rendering.
> >
> > As per link in Ross More's posting, that may mean sometimes that a
> > minimum of:
> > macOS 10.14+, iOS 12+, Windows 10+
> > – is required.
> >
> > It's one thing to get it showing in a pdf, it's quite another sometimes
> > to get it into print ...
> >
> > "OpenType SVG Fonts in Print: Known Issues and Recommendations
> > by Laura Baker
> >
> > "OpenType SVG (scalable vector graphics) fonts are nothing new.
> > Initially intended for web-based design, OpenType SVG fonts are
> > beginning to appear in printed works and are causing concern in the
> > printing industry among designers, publishers, printers, and software
> > companies alike.
> > ..."
>
> It's perhaps worth pointing out, though, that the colour font Philip is
> trying to use is *not* an OpenType-SVG font; it's a layered colour font
> using the Microsoft-originated COLR and CPAL tables. This is a quite
> different technology, and tools/documentation regarding the SVG table
> are not relevant to it.
>
> JK
>
> >
> > Here's a workout for anyone interested, as it also has tools for
> > outputting the SVG table and so for inspection of the colour 'glyphs'
> > directly if necessary for some fonts ...
> >
> > "Tools and sample files for making OpenType-SVG fonts"
> >
> > MIT License
> >
> > addsvg – adds an SVG table to a font, using SVG files provided. The
> > font's format can be either OpenType or TrueType.
> >
> > dumpsvg – saves the contents of a font's SVG table as individual SVG
> > files. The font's format can be either OpenType, TrueType, WOFF, or
> WOFF2.
> >
> > fonts2svg – generates a set of SVG glyph files from one or more fonts
> > and hex colors for each of them. The fonts' format can be either
> > OpenType, TrueType, WOFF, or WOFF2.
> >
> > With process instructions under —
> >
> > "How to make OpenType-SVG fonts?"
> >
> > https://github.com/adobe-type-tools/opentype-svg
> > <https://github.com/adobe-type-tools/opentype-svg>
> > ------------------------------------------------------------------------
> > http://PaulANorman.info <http://PaulANorman.info>
> >
> >
> > On March 19, 2021 10:44:57 AM GMT+13:00, Philip Taylor
> > <P.Taylor at Hellenic-Institute.Uk> wrote:
> >
> >     David Carlisle wrote:
> >
> >>     I see colour here in windows firefox, widows chrome  and xpdf
> >>     using cygwin X
> >>
> >>     attached luahbtex file and result
> >>
> >>     in Chrome it looks like this
> >>
> >>     image.png
> >>
> >>
> >
> >     OK, so it could be the TeXworks previewer that is failing to shew
> >     the colour.  But to get your plain LuaTeX code to work, and not
> >     report a missing font, I had to remove the ".ttf" extension :
> >
> >     % !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"
> >     \relax
> >     \font \pieces = "BabelStoneXiangqiColour:mode=harf"
> >     \relax
> >     \pagewidth = 35 true pc
> >     \pageheight = 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
> >
> >     % snip
> >
> >     \pieces
> >     \centerline {\char "1FA60\relax}
> >     \centerline {🩠}
> >
> >     \end
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20210319/9ef88908/attachment.html>


More information about the XeTeX mailing list.