Options for pairing Concrete Roman with a .ttf font
David Carlisle
d.p.carlisle at gmail.com
Wed Sep 22 01:16:54 CEST 2021
% fc-list | grep 'CMU Concrete' | grep opentype
lists the four otf fonts,
what do you get without the grep opentype? the xdvipdfmx error (I
think) is telling you that it picked up a non opentype font that;s why
I recommend not including the type1 line that is in the fontconfig
file distributed with texlive
On Tue, 21 Sept 2021 at 23:49, Bob Tennent <rdtennent at gmail.com> wrote:
>
> 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
More information about the texhax
mailing list.