5

I've isolated a weird font-related issue that's coming from a blur shadow tikz node, which appears to be writing the value of some mystery counter in nullfont. The mystery counter starts at 17 and increments with each blur shadow node; non-blur shadow nodes do not seem to affect the mystery counter's value. There are some values that seem to equal 17 in my log file, but when I included enough blur shadow nodes to get the mystery counter up to 29, then my log file didn't contain 29 anywhere in it, so I don't have any surviving theory about what's happening or how to avoid it.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}

% I get the following warnings when I xelatex this document:
%    Missing character: There is no 1 ("31) in font nullfont!
%    Missing character: There is no 7 ("37) in font nullfont!
%    Missing character: There is no 1 ("31) in font nullfont!
%    Missing character: There is no 8 ("38) in font nullfont!
%    Missing character: There is no 1 ("31) in font nullfont!
%    Missing character: There is no 9 ("39) in font nullfont!
%
% Alternatively, if I uncomment the following line, I see a giant 17, 18, and 19 in the output.
%   \font\nullfont=cmr24 

\begin{document}
\tikz{\node[draw, fill=white, blur shadow] {A};}  % Writes 17 [in nullfont]

\tikz{\node[draw, fill=white, blur shadow] {B};}  % Writes 18 [in nullfont]

\tikz{\node[draw, fill=white, blur shadow] {C};}  % Writes 19 [in nullfont]
\end{document}
1
  • Welcome to TeX.SX and good catch! Dec 8 '21 at 2:49
7

It is a bug in pgfsys-dvipdfmx.def. They mixed up the \endcsname + \expandafter order:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}

\makeatletter
\def\pgf@sys@pdf@install@mask#1{%
  \pgfutil@addpdfresource@extgs{%
    /pgfsmask\csname pgfsmaskxform@#1\endcsname\space <<
      /SMask <<
        /S /Luminosity
        /G @pgfsmask\csname pgfsmaskxform@#1\endcsname
      >> >>}%<<
  %\expandafter\let\csname pgfsmask@#1\endcsname\expandafter\csname pgfsmaskxform@#1\endcsname%
  \expandafter\let\csname pgfsmask@#1\expandafter\endcsname\csname pgfsmaskxform@#1\endcsname%
}
\makeatother


\begin{document}
\tikz{\node[draw, fill=white, blur shadow] {A};}  % Writes 17 [in nullfont]
%
\tikz{\node[draw, fill=white, blur shadow] {B};}  % Writes 18 [in nullfont]
%
\tikz{\node[draw, fill=white, blur shadow] {C};}  % Writes 19 [in nullfont]
\end{document}

I opened an issue https://github.com/pgf-tikz/pgf/issues/1088

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.