Options for pairing Concrete Roman with a .ttf font

Bob Tennent rdtennent at gmail.com
Wed Sep 22 00:49:34 CEST 2021


I did this and now

   %  fc-list | grep 'CMU Concrete' | grep opentype

lists the four otf fonts,

but I'm still getting

   xdvipdfmx:fatal: Invalid font: -1 (0)

using xelatex.


On Tue, Sep 21, 2021 at 5:26 PM David Carlisle <d.p.carlisle at gmail.com>
wrote:

> On Tue, 21 Sept 2021 at 18:30, Bob Tennent <rdtennent at gmail.com> wrote:
> >
> > David Carlisle writes
> >
> > >The error here is in the font name, the Opentype Computer Modern
> > Concrete from the Computer Modern Unicode collection is CMU Concrete.
> >
> > As far as I can tell, the "collection" referred to is the cm-unicode
> package.
> >
> > \setmainfont{CMU Concrete}
> >
> > works with lualatex but apparently not with xelatex.  It might help if
> we used the
> > file name of the otf font rather than the font name!
> >
> > Bob T.
> >
>
> It works with xelatex but to find texlive fonts by font name xetex
> needs the font directories to be added to the fontconfig configuration
> texlive supplies a fontconfig file for that purpose installed at
> /usr/local/texlive/2021/texmf-var/fonts/conf/texlive-fontconfig.conf
> or equivalent place but it is not added to the fontconfig by default
> you need to do that post install
>
> it contains
>
> <?xml version="1.0"?>
> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
> <fontconfig>
>   <dir>/usr/local/texlive/2021/texmf-dist/fonts/opentype</dir>
>   <dir>/usr/local/texlive/2021/texmf-dist/fonts/truetype</dir>
>   <dir>/usr/local/texlive/2021/texmf-dist/fonts/type1</dir>
> </fontconfig>
>
> (although I'd recommend not including the type1 line)
>
>
> see section 3.4.4 of the texlive manual.
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20210921/b5481265/attachment.html>


More information about the texhax mailing list.