1

This question is an extension of How to Automatically Produce Separated Words Using the Mathcal or Pazocal Fonts which egreg provides some answers.

Consider the following code which uses the pazocal font:

\documentclass[a4paper,12pt]{article}

\newcommand{\textpazocal}[1]{%
  \begingroup
  \setlength{\spaceskip}{0.5em plus 0.2em minus 0.1em}%
  \usefont{OMS}{zplm}{bx}{n}#1%
  \endgroup
}

\begin{document}
\Huge
\textpazocal{EACH DAY}
\end{document}

which gives the output

enter image description here

Now, I would like to fancy it up a little by adding some color shadowing; however, the output of the following code (which works nicely for other fonts such as bsifamily) is not what one would expect with pazocal:

\documentclass{article}
\usepackage{tikz}
\usepackage{xcolor}

\newcommand{\textpazocal}[1]{%
  \begingroup
  \setlength{\spaceskip}{0.5em plus 0.2em minus 0.1em}%
  \usefont{OMS}{zplm}{bx}{n}#1%
  \endgroup
}

\newcommand\titleshading[3]{
    \newcommand\xoffset{0.3}
    \newcommand\yoffset{-0.25}
    % Blur
    \foreach \x in {-0.1,0.1} {
        \foreach \y in {-0.1,0.1} {         
            \node[blue!65!white] at (#1em+\xoffset em+\x em,#2em+\yoffset em+\y em) {
                \scalebox{2.5}{\Huge\textpazocal{#3}} 
            };
        }
    }

    % Main Shadow
    \node[blue!40!white] at (#1em+0.3em,#2em-0.2em) {
        \scalebox{2.5}{\Huge\textpazocal{#3}} 
    };
    \node[red] at (#1em,#2em) {% <-- here put the color you like 
        \scalebox{2.5}{\Huge\textpazocal{#3}} 
    };
}

\begin{document}
\begin{tikzpicture}[remember picture,overlay]   
    \titleshading{15}{0}{Each Day}
\end{tikzpicture} 
\end{document}

enter image description here

If I run adjust the code for, say, the bsifamily font, the output looks like this---

enter image description here

QUESTION: What is the cause of the strange output with the pazocal font, and how may I fix it?

Thank you.

4
  • 1
    Have you tried without fancy colors? Already \textpazocal{a} will fail because only the uppercase calligraphic letters are available.
    – egreg
    Nov 10, 2021 at 9:29
  • @egreg Many thanks. I didn't know that about the uppercase letters. And alas, the colors are desired for the project I'm working on.
    – DDS
    Nov 10, 2021 at 14:53
  • @egreg Would you know if color shadowing is possible with this font?
    – DDS
    Nov 10, 2021 at 14:58
  • You got it, didn't you? There is no lowercase letter available, that's the problem.
    – egreg
    Nov 10, 2021 at 15:06

1 Answer 1

2

In your first example you used only uppercase letters. In your real code you are using lowercase letters. OMS is a math encoding and it has math symbols at these positions. Try to find a font which supports T1 or OT1 or another text font encoding.

\documentclass[a4paper,12pt]{article}

\newcommand{\textpazocal}[1]{%
  \begingroup
  \setlength{\spaceskip}{0.5em plus 0.2em minus 0.1em}%
  \usefont{OMS}{zplm}{bx}{n}#1%
  \endgroup
}

\begin{document}
\Huge
\textpazocal{EACH DAY} \\
\textpazocal{Each Day}
\end{document}

enter image description here

2
  • Thank you for your answer. As egreg pointed out, I have learned that this font only is applicable to uppercase letters. I noticed in your code that the colorized shadowing commands are removed? Is such impossible, to the best of your knowledge, with this font?
    – DDS
    Nov 10, 2021 at 15:01
  • Naturally you can color the font, your own screenshot in the question shows it. But your problem is not the color but the missing a. Nov 10, 2021 at 15:34

You must log in to answer this question.

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