2

MWE:

\documentclass{book}
\usepackage{lettrine}
\usepackage{xcolor}

\input GoudyIn.fd
\newcommand*\initfamily{\usefont{U}{GoudyIn}{xl}{n}}

\begin{document}
\thispagestyle{empty}
\LARGE

\lettrine[lines=3,loversize=.25]{\color{olive}{\initfamily{I}}}{s} it possible to have the letter (in this case, \textit{I}) appear in black? 
\end{document}

which produces the displayed lettrine

enter image description here

I would like to give a different color to the letter only; in this case, I would like to have the letter I appear in black with everything else remaining the same. Is there a straightforward way to do this, while compiling the code with pdflatex? (I thought, perhaps, using \color{black} adjacent to the letter might do it---but I was wrong.)

3
  • You would need to purchase a license to a layered font (and then go through the bother of setting the fonts up for pdftex — all unnecessary with luatex). Having purchased more than one, I’d recommend the version by P22. See tex.stackexchange.com/q/372790 for the problems with a less expensive version.
    – Thérèse
    Commented Jun 7, 2022 at 15:26
  • Not possible without a layered font unless, perhaps, you export the glyph as an .svg and do some tedious editing in a program such as Inkscape. No comment on the legality of that approach.
    – Thérèse
    Commented Jun 8, 2022 at 5:47
  • @Thérèse Thank you for your two comments and for providing the above links.
    – DDS
    Commented Jun 8, 2022 at 12:03

1 Answer 1

2

In the meantime, for a multi-tone effect, overprinting the character onto itself almost, but not quite, exactly could be a temporary option:

two tone

and can be done with any character.

Also - with lua, gradients can be applied.

MWE

\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage{lettrine}
\usepackage{xcolor}

\input{MorrisIn.fd}
\newcommand*\initfamily{\usefont{U}{MorrisIn}{xl}{n}}
\newlength{\goudycorr}
\newcommand{\egreglettrine}[1]{%
  \begingroup
  \setlength{\fboxsep}{0pt}%
  \fontsize{75}{0}\initfamily
  \colorbox{blue}{%
    \makebox[\height][c]{\color{yellow!40}#1}%
  }%
  \endgroup
}

\newcommand\eglett[2]{\sbox0{\egreglettrine{#1}}%
\lettrine[lines=6,loversize=0.85]{\colorbox{blue}{\usebox0}}{ #2}}

\begin{document}

\sbox0{\egreglettrine{T}}%
\lettrine[lines=5,loversize=0.55]{\colorbox{blue}{\usebox0}}{ he Lorem ipsum} \lipsum[3]

\eglett{O}{\bfseries nce} upon a time,  \lipsum[3]


\egreglettrine{A} 
  {\colorbox{yellow!40}{\color{blue}\fontsize{75}{0}\initfamily A}} 
  {\colorbox{yellow!40}{\color{blue}\fontsize{75}{0}\initfamily A}}\kern-0.35em\llap{{\color{red}\fontsize{75}{0}\initfamily A}} 

\end{document}


Addendum

As a side exploration, TikZ has shading and positioning capability.

TikZ shading examples

MWE

\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage{lettrine}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{shadings} % ball
\usetikzlibrary{fadings,patterns}

\input{MorrisIn.fd}
\newcommand*\initfamily{\usefont{U}{MorrisIn}{xl}{n}}
\newlength{\goudycorr}
\newcommand{\egreglettrine}[1]{%
  \begingroup
  \setlength{\fboxsep}{0pt}%
  \fontsize{75}{0}\initfamily
  \colorbox{blue}{%
    \makebox[\height][c]{\color{yellow!40}#1}%
  }%
  \endgroup
}

\newcommand\eglett[2]{\sbox0{\egreglettrine{#1}}%
\lettrine[lines=6,loversize=0.85]{\colorbox{blue}{\usebox0}}{ #2}}


\newcommand\shadetext[2][]{%
  \setbox0=\hbox{{\special{pdf:literal 7 Tr }#2}}%
  \tikz[baseline=0]\path [#1] \pgfextra{\rlap{\copy0}} (0,-\dp0) rectangle (\wd0,\ht0);%
}

\input{Elzevier.fd}
\newcommand*\initfamilye{\usefont{U}{Elzevier}{xl}{n}}
\input{Zallman.fd}
\newcommand*\initfamilyz{\usefont{U}{Zallman}{xl}{n}}


\begin{document}

\sbox0{\egreglettrine{T}}%
\lettrine[lines=5,loversize=0.55]{\colorbox{blue}{\usebox0}}{ he Lorem ipsum} \lipsum[3]

\eglett{O}{\bfseries nce} upon a time,  \lipsum[3]






\egreglettrine{A} 
  {\colorbox{yellow!40}{\color{blue}\fontsize{75}{0}\initfamily A}} 
%
  {\colorbox{yellow!40}{\color{blue}\fontsize{75}{0}\initfamily A}}\kern-0.35em\llap{{\color{red}\fontsize{75}{0}\initfamily A}} 
%

\newpage
TikZ

%---
  {\colorbox{yellow!40}{\begin{tikzpicture}
    \node (b) {\shadetext[left color =red,middle color = blue!50, right color = blue]{\fontsize{75}{0}\initfamily A}};
    \node [text=black!80]at (0,0) (c) {\fontsize{75}{0}\initfamily A};
    \node at (0,0) (b2) [xshift=0.5pt,yshift=-0.5pt] {\shadetext[left color =red!80!yellow,middle color = blue!20, right color = blue!50]{\fontsize{75}{0}\initfamily A}};
    \end{tikzpicture}} 
%
\begin{tikzpicture}
    \node [left color =red,middle color = blue!50, right color = blue, text=yellow] (a) {\fontsize{75}{0}\initfamily A};
    \end{tikzpicture}
%
\begin{tikzpicture}
    \node [left color =red,middle color = blue!50, right color = blue, ball color=green] (a) {\fontsize{75}{0}\initfamily A};
    \end{tikzpicture}
%
\begin{tikzpicture}
\shade [left color=red,right color=blue] (-2,-1) rectangle (2,1);
\begin{scope}[transparency group=knockout]
\fill [white] (-1.9,-.9) rectangle (1.9,.9);
\node [opacity=0.2,font=\fontsize{75}{0}\initfamily]
{A};
\end{scope}
\end{tikzpicture}
%
\begin{tikzpicture}
    \node (b) {\shadetext[left color =red,middle color = blue!50, right color = blue]{\fontsize{75}{0}\initfamily A}};
    \end{tikzpicture}




\bigskip
%---
  {\colorbox{yellow!40}{\begin{tikzpicture}
    \node (b) {\shadetext[left color =red,middle color = blue!50, right color = blue]{\fontsize{75}{0}\initfamilye I}};
    \node [text=black!80]at (0,0) (c) {\fontsize{75}{0}\initfamilye I};
    \node at (0,0) (b2) [xshift=0.5pt,yshift=-0.5pt] {\shadetext[left color =red!80!yellow,middle color = blue!20, right color = blue!50]{\fontsize{75}{0}\initfamilye I}};
    \end{tikzpicture}} 
%
\begin{tikzpicture}
    \node [left color =red,middle color = blue!50, right color = blue, text=yellow] (a) {\fontsize{75}{0}\initfamilye I};
    \end{tikzpicture}
%
\begin{tikzpicture}
    \node [left color =red,middle color = blue!50, right color = blue, ball color=green] (a) {\fontsize{75}{0}\initfamilye I};
    \end{tikzpicture}
%
\begin{tikzpicture}
\shade [left color=red,right color=blue] (-2,-1) rectangle (2,1);
\begin{scope}[transparency group=knockout]
\fill [white] (-1.9,-.9) rectangle (1.9,.9);
\node [opacity=0.2,font=\fontsize{75}{0}\initfamilye]
{I};
\end{scope}
\end{tikzpicture}
%
\begin{tikzpicture}
    \node (b) {\shadetext[left color =red,middle color = blue!50, right color = blue]{\fontsize{75}{0}\initfamilye I}};
    \end{tikzpicture}





\bigskip
%---
  {\colorbox{yellow!40}{\begin{tikzpicture}
    \node (b) {\shadetext[left color =red,middle color = blue!50, right color = blue]{\fontsize{75}{0}\initfamilyz O}};
    \node [text=black!80]at (0,0) (c) {\fontsize{75}{0}\initfamilyz O};
    \node at (0,0) (b2) [xshift=0.5pt,yshift=-0.5pt] {\shadetext[left color =red!80!yellow,middle color = blue!20, right color = blue!50]{\fontsize{75}{0}\initfamilyz O}};
    \end{tikzpicture}} 
%
\begin{tikzpicture}
    \node [left color =red,middle color = blue!50, right color = blue, text=yellow] (a) {\fontsize{75}{0}\initfamilyz O};
    \end{tikzpicture}
%
\begin{tikzpicture}
    \node [left color =red,middle color = blue!50, right color = blue, ball color=green] (a) {\fontsize{75}{0}\initfamilyz O};
    \end{tikzpicture}
%
\begin{tikzpicture}
\shade [left color=red,right color=blue] (-2,-1) rectangle (2,1);
\begin{scope}[transparency group=knockout]
\fill [white] (-1.9,-.9) rectangle (1.9,.9);
\node [opacity=0.2,font=\fontsize{75}{0}\initfamilyz]
{O};
\end{scope}
\end{tikzpicture}
%
\begin{tikzpicture}
    \node (b) {\shadetext[left color =red,middle color = blue!50, right color = blue]{\fontsize{75}{0}\initfamilyz O}};
    \end{tikzpicture}



\end{document}

Text shading code from: How to place a color gradient text node inside a tikzpicture (absolute positioning)

1
  • Thank you for your helpful addendum which relates in a way to my question; which I gather, may not be possible without an additional purchase of Goudy Init, layers from an external source.
    – DDS
    Commented Jun 9, 2022 at 14:05

You must log in to answer this question.

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