[XeTeX] AMS/CM fonts in OpenType/CFF format
Philip Taylor (Hellenic Institute)
P.Taylor at Hellenic-Institute.Uk
Wed Nov 17 11:29:09 CET 2021
On 17/11/2021 09:48, Marcel Fabian Krüger wrote:
> The string quotes don't have any special meaning in XeTeX. The font name
> is read using TeX's normal file scanning routine which (at least for TeX
> Live) uses string quotes to allow embedding spaces in the name and then
> discards them. Therefore they never reach the parts of XeTeX where the
> decision between system fonts and classical fonts is made.
>
> If you want to load the font by fontname, you can try to add a colon
> instead to add an empy feature string. Then the TFM file isn't found. So
> you would have e.g. `\font \cmr = "cmr10:"` (I haven't checked if the
> font is actually found by that name, but if you have an OpenType font
> with fontname cmr10 installed than this would work)
Many thanks for your comments, Marcel, but I am still somewhat
confused. The XeTeX manual says :
> This distinction between file name lookups and system font name
> lookups is crucial
> to understanding XƎTEX’s behavior and to writing portable documents
> (in short: don’t
> use system fonts).
> System font name lookups use (except on Mac OS X) the fontconfig
> library; running
> fc-list should show you the font names available. E.g.,
>
> \font\1="Liberation Serif" /look for OS-installed font/
which suggested to me that it was the string quotes that were forcing
XeTeX to look for an OS-installed (i.e., system) font. And when I try :
> \font \cmr = "cmr10:"
>
> \cmr
>
> The quick brown fox jumps right over the laxy dog's back.
>
> \end
>
I am told :
> This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021/W32TeX)
> (preloaded format=xetex)
>
> restricted \write18 enabled.
>
> entering extended mode
>
> (./untitled-5.tex
>
> ! Font \cmr=cmr10: not loadable: Metric (TFM) file or installed font
> not found.
>
> <to be read again>
>
> \cmr
>
> l.4 \cmr
>
> ?
>
As reported earlier, Tom's "cmr10.otf" /is/ installed, but your
suggested syntax appears not to find it. And it is not found with
"\font \cmr = "CMR10 Regular:", but /is/ found with \font \cmr =
"CMR10:". Curiouser and curiouser !
Oh, and \font \cmr = "CMR9:" fails, so at least I have a way of forcing
a system font to be used, even if I have to upper-case the name. But I
am still very concerned that \font \cmr = "CMR10.xyz:" finds the font
and reports no error.
--
/Philip Taylor/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20211117/9266b7df/attachment-0001.html>
More information about the XeTeX
mailing list.