Options for pairing Concrete Roman with a .ttf font

Jim Hefferon jim.hefferon at gmail.com
Wed Sep 15 00:01:52 CEST 2021


I have a document (from 2016-ish) that paired Concrete Roman and Euler math
with a web-downloaded .ttf for code listings (it used fontspec to access
that file, and compiled with xelatex).  I find that when I installed a 2021
TeXLive  on a fresh Ubuntu 20, it does not compile.  Can I ask if there is,
today, a way to use ccr with an arbitrary .ttf font?

I have been struggling with this for an embarasingly long time, and I'd be
delighted to be corrected (I apologize if some of what I say doesn't make
any sense), but I find the following.

1) When I put this in the preamble


it results in in the ccr choice being forgotten.  By that I mean  that in
the PDF, Properties> Fonts does not say concrete.

2) I tried then to go all in with fontspec, to install ccr into my font
manager.   I clicked on "+" and added
and then ran this file.

\IfFontExistsTF{Computer Modern Concrete}{\typeout{!!!! Yes, it
exists}}{\typeout{!!!! No, it doesn't exist}}

%% \setmainfont{sform10.pfb}[
%%   Path = /usr/local/texlive/2021/texmf-dist/fonts/type1/public/cm-super/]
%% \setmainfont{sform10.pfb}[Path =
\setmainfont{Computer Modern Concrete}


I ran xelatex (with a diagnostic because I don't understand the error

$ xelatex -output-driver="xdvipdfmx -vv" test.tex
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021) (preloaded
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2021-06-01> patch level 1
L3 programming layer <2021-08-27>
Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
(|extractbb --version))))
!!!! Yes, it exists
(./test.aux) (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd)

Package lipsum Warning: Hyphenation patterns for 'latin' cannot be used
(lipsum)                because babel is not loaded. The default document
(lipsum)                language will be used for hyphenation instead.
(lipsum)                This message won't be shown again.

Overfull \hbox (5.30357pt too wide) in paragraph at lines 26--26
[]\TU/ComputerModernConcrete(0)/m/n/10 Nulla malesuada porttitor diam.
Donec fe
lis erat, congue
[1] [2] [3] (./test.aux) )
dvi filename specified, reading standard input.
No pdf filename specified, writing to standard output.
DVI Comment:  XeTeX output 2021.09.14:1723
stdin -> test.pdf
<AGL:texglyphlist.txt><AGL:pdfglyphlist.txt><AGL:glyphlist.txt>[1</usr/local/share/fonts/type1/cm-super/sform5.pfb at 9.96pt
fontmap: /usr/local/share/fonts/type1/cm-super/sform5.pfb/0/H/65536/0/0 ->
xdvipdfmx:fatal: Invalid font: -1 (0)

No output PDF file written.
(see the transcript file for additional information)
Error 256 (driver return code) generating output;
file test.pdf may not be valid.
Transcript written on test.log.

(What could "xdvipdfmx:fatal: Invalid font: -1 (0)" possibly mean?)

3) I even tried converting the .ttf via otftotfm so I could just use
pdflatex, but frankly how to get the T1 encoding baffled me.

Is there a reasonable way to get concrete along with a random .ttf?  If the
answer is "no" then that would save me a lot of struggle, so that would be
useful to me also.


"Does not the Captain seek your advice sir?"
"Not always," said Stephen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20210914/9012c526/attachment.html>

More information about the texhax mailing list.