[XeTeX] XeTeX, fontspec, OTF, and fontdimens
Peter Dyballa
Peter_Dyballa at Web.DE
Sun Feb 20 17:31:01 CET 2011
Am 20.02.2011 um 15:50 schrieb mskala at ansuz.sooke.bc.ca:
> With fontspec and not WordSpace,
> the space scales but is stretchable; with fontspec and an appropriate
> WordSpace setting, the space is non-stretchable, but doesn't scale.
I've noticed these effects before, which become clearly visible with
your
\noindent
x x x\\
xxxxx\\
x x x\\
xxxxx
test pattern, that is when the 'x x x' lines are shorter than the
'xxxxx' lines, and thought they might come from some wrongly coded
dimension in the font file which XeTeX picks up. This should not
happen with a mono-spaced font. And the Latin Modern Mono fonts are
recognised as mono-spaced by Mac OS X, as ftxinstalledfonts from the
Apple Font Tools suite reports.
Could be it's a fontspec bug. With \XeTeXtracingfonts=1 I see in the
LOG file:
Requested font "[lmroman12-regular]:mapping=tex-text" at 14.4pt
Loaded mapping `tex-text.tec' for font `[lmroman12-
regular]:mapping=tex-text'.
-> /usr/local/texlive/2010/texmf-dist/fonts/opentype/public/lm/
lmroman12-regular.otf
although by default it should have been a 10 pt font, when using for
example the article class without font size option. And *I* never
wanted any mapping to be used...
Anyway, I can load Latin Modern without fontspec:
\font\1="Latin Modern Mono"
\1
Now the LOG file for your test case (at normal size and at \Large
size) tells me:
Requested font "Latin Modern Mono" scaled 1000
-> /usr/local/texlive/2010/texmf-dist/fonts/opentype/public/lm/
lmmono10-regular.otf
Requested font "cmr12" at 14.4pt
-> /usr/local/texlive/2010/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
and the Large test case does not look OK. One would need to
\renewcommand{\Large} to load the same font for \Large, but LaTeX and
TeX don't team up here. But this (overloading?) works:
\font\Large="Latin Modern Mono" at 14.4pt
The LOG file tells:
Requested font "Latin Modern Mono" scaled 1000
-> /usr/local/texlive/2010/texmf-dist/fonts/opentype/public/lm/
lmmono10-regular.otf
Requested font "Latin Modern Mono" at 14.4pt
-> /usr/local/texlive/2010/texmf-dist/fonts/opentype/public/lm/
lmmono12-regular.otf
and both test cases look OK! (Even Watson could name the culprit now.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.tiff
Type: image/tiff
Size: 81074 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20110220/5310e768/attachment-0001.tiff>
-------------- next part --------------
>
> I wonder if the difference is simply that there are TFM files for
> Postscript Computer Modern and not for OpenType Latin Roman; and in
> that
> case maybe it could be addressed by creating TFM files for Latin
> Roman.
> I don't know if XeTeX will look for and load a TFM file in the case
> of an
> OpenType font, but if it could, maybe that would be a solution. One
> sticking point, of course, would be the 256-character limit of TFM
> files.
It's possible to check with some trace utility which files xetex or
xelatex open and read, but with Apple's Font Book I can activate Latin
Modern from different TeX Live distributions. Always files from the
active set were logged, so I presume that XeTeX only then uses TFM
files when it has to use non-OT, non-TT fonts. And it look's, as you
suspicioned, like another fontspec bug.
pTeX and cjkTeX are (partly) TFM files based. Did you try these
variants?
--
Greetings
Pete
A morning without coffee is like something without something else.
More information about the XeTeX
mailing list