3

Previously, I had worked with XeTeXinterchartoks since I wanted to use a different font for uppercase letters. The code worked exactly as I wanted it to when compiling with xelatex.

However, I have recently changed laptops and have reinstalled texlive-full. Now, when I compile the code, I get missing characters and extra spaces in seemingly random places.

What is going on and how can I fix this?

I am attaching a MWE, one that I also used when figuring how to create this code in the first place (Different font for capital/upper case letters)

\documentclass[a4paper,11pt]{book}

\usepackage[default]{frcursive}


\XeTeXinterchartokenstate = 1\relax  
\newXeTeXintercharclass\ucletterclass  
\ExplSyntaxOn   
\int_step_inline:nnnn {"0041}{1}{"005A}
 { \XeTeXcharclass #1 = \ucletterclass }
\ExplSyntaxOff



\XeTeXinterchartoks 0 \ucletterclass = {\begingroup \fontfamily{phv}\fontseries{m}\fontshape{n}\selectfont}
\XeTeXinterchartoks \ucletterclass 0 = {\endgroup}
\XeTeXinterchartoks 4095 \ucletterclass = {\begingroup \fontfamily{phv}\fontseries{m}\fontshape{n}\selectfont}
\XeTeXinterchartoks \ucletterclass 4095= {\endgroup}


\begin{document}


This is some text.

This is some text with an acronym in it GMT

This is some text with a proper name in it: London


\end{document}

Here is what I get with the same code through the old (top) and new (bottom) installations.

2 Answers 2

3

The problem is unrelated to the interchar tokens

\documentclass[a4paper,11pt]{book}

\usepackage[default]{frcursive}

\showoutput

\begin{document}


This is some text.

This is some text with an acronym in it GMT

This is some text with a proper name in it: London


\end{document}

produces

enter image description here

with xelatex and

enter image description here

with pdflatex which looks OK but xpdf moans

Syntax Warning (27391): Badly formatted number
Syntax Warning (27393): Badly formatted number

which indicates (I suspect) a problem in the font, somewhere.

with xelatex the showoutput log is

....\T1/frc/m/n/10.95 s
....\T1/frc/m/n/10.95 ^^\ (ligature )
....\T1/frc/m/n/10.95 ^^@ (ligature )
....\T1/frc/m/n/10.95 o
....\T1/frc/m/n/10.95 ^^P (ligature )
....\T1/frc/m/n/10.95 m
....\T1/frc/m/n/10.95 ^^@ (ligature )
....\T1/frc/m/n/10.95 e
....\glue 5.65755 plus 1.88586 minus 1.88586
....\T1/frc/m/n/10.95 ^^F (ligature |)
....\T1/frc/m/n/10.95 t
....\T1/frc/m/n/10.95 ^^A (ligature )
....\T1/frc/m/n/10.95 e
....\T1/frc/m/n/10.95 ^^O (ligature )
....\T1/frc/m/n/10.95 x
....\T1/frc/m/n/10.95 ^^G (ligature )
....\T1/frc/m/n/10.95 t
....\glue 5.65755 plus 1.88586 minus 1.88586
....\T1/frc/m/n/10.95 ^^Q (ligature |)
....\T1/frc/m/n/10.95 w
....\T1/frc/m/n/10.95 ^^H (ligature )
....\T1/frc/m/n/10.95 i
....\T1/frc/m/n/10.95 ^^F (ligature )
....\T1/frc/m/n/10.95 t
....\T1/frc/m/n/10.95 ^^M (ligature )
....\T1/frc/m/n/10.95 h
....\T1/frc/m/n/10.95 ^^_ (ligature |)
....\glue 5.65755 plus 1.88586 minus 1.88586
....\T1/frc/m/n/10.95 ^^@ (ligature |)
....\T1/frc/m/n/10.95 a
....\T1/frc/m/n/10.95 ^^_ (ligature |)
....\glue 5.65755 plus 1.88586 minus 1.88586
....\T1/frc/m/n/10.95 ^^I (ligature |)
....\T1/frc/m/n/10.95 p
....\T1/frc/m/n/10.95 ^^F (ligature )
....\T1/frc/m/n/10.95 r
....\T1/frc/m/n/10.95 ^^@ (ligature )
....\T1/frc/m/n/10.95 o
....\T1/frc/m/n/10.95 ^^K (ligature )
....\T1/frc/m/n/10.95 p
....\T1/frc/m/n/10.95 ^^@ (ligature )
....\T1/frc/m/n/10.95 e
....\T1/frc/m/n/10.95 ^^G (ligature )
....\T1/frc/m/n/10.95 r
....\T1/frc/m/n/10.95 ^^_ (ligature |)
....\glue 5.65755 plus 1.88586 minus 1.88586
....\T1/frc/m/n/10.95 ^^Q (ligature |)
....\T1/frc/m/n/10.95 n
....\T1/frc/m/n/10.95 ^^@ (ligature )
....\T1/frc/m/n/10.95 a
....\T1/frc/m/n/10.95 ^^N (ligature )
....\T1/frc/m/n/10.95 m
....\T1/frc/m/n/10.95 ^^@ (ligature )
....\T1/frc/m/n/10.95 e

showing T1 encoding being used, which is not generally good with xelatex, but may be unavoidable for special fonts like this. You get no warnings from xetex as it "thinks" the characters are there but all the text after the ligature in position control K is not rendering.


With xelatex I get the full text in texlive 2020 and missing text in 2021,2022,2023

3

I can't tell you how to fix, only what has changed. The font itself is unchanged. But how XeTeX handles it is different. In texlive 2019 if you compile with --output-driver="xdvipdfmx -vv" you get warnings from xdvipdfmx (this is from a test with o and e):

xdvipdfmx:warning: Glyph width mismatch for TFM and font (frcr10)
xdvipdfmx:warning: TFM: -30.1361 vs. Type1 font: 32738

but xdvipfdmx nevertheless uses the TFM value in the PDF:

[... 0 0 -30.1 -30.1 0 0 ...]

In texlive 2023 the message has changed:

xdvipdfmx:warning: Intolerable difference in glyph width: font=frcr10, char=10
xdvipdfmx:warning: font: 32738 vs. tfm: -30.1361

and the PFB now contains the font values:

[... 0 32738 32738 0 ...]

And this moves the chars out of the page.

(with pdftex the values are odd: -30.-1 -30.-1, adobe readers seems not to mind but in pdf viewer of my editor the chars are lost too, lualatex outputs -30.1 -30.1).

On the whole I would say that it is a problem of the font (there has been other reports about lost ligatures and similar).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .