20

enter image description here

\documentclass[border=30pt]{standalone}
\usepackage[dvipsnames,x11names]{xcolor}
\definecolor{bittersweet}{HTML}{FE6F5E} 
\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\usepackage[rm,medium]{roboto}
\usepackage[outline]{contour}
\begin{document}
\pagecolor{black}
\begin{tikzpicture}[font=\sffamily]
\clip (-9.5,-10) rectangle (0,2.5);
\begin{scope}[overlay]
\node[scale=15,even odd rule] (F) at (-7.8,0) {\color{black}\contour{bittersweet}{F}};
\node[scale=15,node distance=2mm,right of= F] (E) {\color{black}\contour{bittersweet}{E}};
\node[scale=15,node distance=2.6mm,below of= F,xshift=.3pt] (B) {\color{black}\contour{bittersweet}{B}};
\node[scale=15,node distance=2mm,right of= B] (R) {\color{black}\contour{bittersweet}{R}};
\node[scale=15,node distance=2mm,right of= R] (U) {\color{black}\contour{bittersweet}{U}};
\node[scale=15,node distance=2.6mm,below of= B] (A) {\color{black}\contour{bittersweet}{A}};
\node[scale=15,node distance=2mm,right of= A] (r) {\color{black}\contour{bittersweet}{R}};
\node[scale=15,node distance=2mm,right of= r] (Y) {\color{black}\contour{bittersweet}{Y}};
\end{scope}
%\draw[red!50,step=5mm] (-9,-10) grid (8,10) ;
\draw[very thick,bittersweet] (-9,2)--(0,-10);
\end{tikzpicture}
\end{document}

enter image description here

29

I propose three ways, plus one variant that actually uses the positioning library. The first way is simpler, but the second and third ones have more knobs and allow you to specify the desired color in a central place (you could also do that with \colorlet, but this is done in the spirit of \pgfkeys here). All three ways give the exact same output. The variant with the positioning library gives slightly different letter placement, but this can of course be further adjusted.

screenshot

Since your letter placement technique doesn't use the positioning library, I have removed \usetikzlibrary{positioning} in the first three examples. At the end, I'll show you a way that uses the library and a different way to scale the font.

Simpler way

\documentclass[border=30pt]{standalone}
\usepackage[rm,medium]{roboto}
\usepackage[outline]{contour}
\usepackage{tikz}

\definecolor{bittersweet}{HTML}{FE6F5E}

\makeatletter
\let\myFirstOfOne\@firstofone
\makeatother

\begin{document}

\pagecolor{black}
\begin{tikzpicture}[
  font=\sffamily,
  pics/my letters/.style={code={
    \begin{scope}[nodes={scale=15}]
       \node                                   (F) at (-7.8,0)   {#1{F}};
       \node[node distance=2mm, right of=F]    (E)               {#1{E}};
       \node[node distance=2.721mm, below of=F, xshift=.3pt] (B) {#1{B}};
       \node[node distance=2mm, right of=B]    (R)               {#1{R}};
       \node[node distance=2mm, right of=R]    (U)               {#1{U}};
       \node[node distance=2.721mm, below of=B]  (A)             {#1{A}};
       \node[node distance=2mm, right of=A]    (r)               {#1{R}};
       \node[node distance=2mm, right of=r]    (Y)               {#1{Y}};
    \end{scope}
  }},
 pics/my letters/.default=\myFirstOfOne]

\begin{scope}[overlay]
  \pic {my letters={\color{black}\contour{bittersweet}}};
  \begin{scope}
    \clip (-9,2) -- (0,-10) |- cycle;
    \pic {my letters={\color{bittersweet}\contour{bittersweet}}};
  \end{scope}
\end{scope}

\draw[very thick, bittersweet] (-9,2)--(0,-10);
\end{tikzpicture}

\end{document}

Flexible way (1)

\documentclass[border=30pt]{standalone}
\usepackage[rm,medium]{roboto}
\usepackage[outline]{contour}
\usepackage{tikz}

\definecolor{bittersweet}{HTML}{FE6F5E}

\makeatletter
\newif\ifmylettersdrawoutline

\tikzset{
  pics/my letters/.style={code={
    \begin{scope}[nodes={scale=15}]
       \ifmylettersdrawoutline
         \edef\myLettersHandler{%
           % You might want to use /tikz/color instead of
           % /tikz/pics/my letters/inside.
           \noexpand\color{\pgfkeysvalueof{/tikz/pics/my letters/inside}}%
           \noexpand\contour{\pgfkeysvalueof{/tikz/pics/my letters/outline}}}
       \else
         \let\myLettersHandler\@firstofone
       \fi
       %
       \node (F) at (-7.8,0)                             {\myLettersHandler{F}};
       \node[node distance=2mm, right of=F]     (E)      {\myLettersHandler{E}};
       \node[node distance=2.721mm, below of=F, xshift=.3pt]
                                                (B)      {\myLettersHandler{B}};
       \node[node distance=2mm, right of=B]     (R)      {\myLettersHandler{R}};
       \node[node distance=2mm, right of=R]     (U)      {\myLettersHandler{U}};
       \node[node distance=2.721mm, below of=B] (A)      {\myLettersHandler{A}};
       \node[node distance=2mm, right of=A]     (r)      {\myLettersHandler{R}};
       \node[node distance=2mm, right of=r]     (Y)      {\myLettersHandler{Y}};
    \end{scope}
  }, my letters/.cd, #1},
  pics/my letters/outline/.initial=bittersweet,
  pics/my letters/inside/.initial=black,
  % This one sets both colors in one go
  pics/my letters/outline and inside/.style={
    /tikz/pics/my letters/.cd, outline=#1, inside=#1},
  pics/my letters/draw outline/.is if=mylettersdrawoutline,
  pics/my letters/draw outline=false, % initial value
}
\makeatother

\begin{document}

\pagecolor{black}
% /tikz/my logo color determines the color of the letters *and* the line
\begin{tikzpicture}[font=\sffamily,
                    my logo color/.style={
                      color={#1},
                      pics/my letters/outline and inside={#1}},
                    my logo color=bittersweet]

\coordinate (upper left)  at (-9,2);
\coordinate (lower right) at (0,-10);

\begin{scope}[overlay, pics/my letters/draw outline]
  \pic {my letters={inside=black}}; % override the inside color here
  \begin{scope}
    \clip (upper left) -- (lower right) |- cycle;
    \pic {my letters};
  \end{scope}
\end{scope}

\draw[very thick] (upper left) -- (lower right);
\end{tikzpicture}

\end{document}

Flexible way (2)

\documentclass[border=30pt]{standalone}
\usepackage[rm,medium]{roboto}
\usepackage[outline]{contour}
\usepackage{tikz}

\definecolor{bittersweet}{HTML}{FE6F5E}

\makeatletter
\newif\ifmylettersdrawoutline

\tikzset{
  pics/my letters/.style={code={
    \begin{scope}[nodes={scale=15}]
       \ifmylettersdrawoutline
         \edef\myLettersHandler{%
           % You might want to use /tikz/color instead of
           % /tikz/pics/my letters/inside.
           \noexpand\color{\pgfkeysvalueof{/tikz/pics/my letters/inside}}%
           \noexpand\contour{\pgfkeysvalueof{/tikz/pics/my letters/outline}}}
       \else
         \let\myLettersHandler\@firstofone
       \fi
       %
       \node (F) at (-7.8,0)                             {\myLettersHandler{F}};
       \node[node distance=2mm, right of=F]     (E)      {\myLettersHandler{E}};
       \node[node distance=2.721mm, below of=F, xshift=.3pt]
                                                (B)      {\myLettersHandler{B}};
       \node[node distance=2mm, right of=B]     (R)      {\myLettersHandler{R}};
       \node[node distance=2mm, right of=R]     (U)      {\myLettersHandler{U}};
       \node[node distance=2.721mm, below of=B] (A)      {\myLettersHandler{A}};
       \node[node distance=2mm, right of=A]     (r)      {\myLettersHandler{R}};
       \node[node distance=2mm, right of=r]     (Y)      {\myLettersHandler{Y}};
    \end{scope}
  }, my letters/.cd, #1},
  pics/my letters/outline/.initial=bittersweet,
  pics/my letters/inside/.initial=black,
  % This one sets both colors in one go
  pics/my letters/outline and inside/.style={
    /tikz/pics/my letters/.cd, outline=#1, inside=#1},
  pics/my letters/draw outline/.is if=mylettersdrawoutline,
  pics/my letters/draw outline=false, % initial value
}
\makeatother

\begin{document}

\pagecolor{black}
% /tikz/my logo color determines the color of the letters *and* the line
\begin{tikzpicture}[font=\sffamily, my logo color/.initial=bittersweet]

\coordinate (upper left)  at (-9,2);
\coordinate (lower right) at (0,-10);

\begin{scope}[overlay,
              pics/my letters/.cd, draw outline,
              outline and inside/.expanded={%
                \pgfkeysvalueof{/tikz/my logo color}}]
  \pic {my letters={inside=black}}; % override the inside color here
  \begin{scope}
    \clip (upper left) -- (lower right) |- cycle;
    \pic {my letters};
  \end{scope}
\end{scope}

\draw[very thick, color=\pgfkeysvalueof{/tikz/my logo color}] (upper left) -- (lower right);
\end{tikzpicture}

\end{document}

Using the positioning library

If you want to use the positioning library, placement works differently. In this case, I removed the scale=15 and used font={\sffamily\fontsize{150}{150}\selectfont} instead. Also, I used node distance=-4mm to make the letters closer to each other, and adjusted the lower right coordinate a bit.

\documentclass[border=30pt]{standalone}
\usepackage[rm,medium]{roboto}
\usepackage[outline]{contour}
\usepackage{tikz}
\usetikzlibrary{positioning}

\definecolor{bittersweet}{HTML}{FE6F5E}

\makeatletter
\newif\ifmylettersdrawoutline

\tikzset{
  pics/my letters/.style={code={
    \begin{scope}[nodes={font={\sffamily\fontsize{150}{150}\selectfont},
                         node distance=-4mm}]
       \ifmylettersdrawoutline
         \edef\myLettersHandler{%
           % You might want to use /tikz/color instead of
           % /tikz/pics/my letters/inside.
           \noexpand\color{\pgfkeysvalueof{/tikz/pics/my letters/inside}}%
           \noexpand\contour{\pgfkeysvalueof{/tikz/pics/my letters/outline}}}
       \else
         \let\myLettersHandler\@firstofone
       \fi
       %
       \node (F) at (-7.8,0)      {\myLettersHandler{F}};
       \node[right=of F]      (E) {\myLettersHandler{E}};
       \node[below right=0.7mm and 0mm of F.south west] (B)
                                  {\myLettersHandler{B}};
       \node[right=-6mm of B] (R) {\myLettersHandler{R}};
       \node[right=of R]      (U) {\myLettersHandler{U}};
       \node[below right=0.7mm and 0mm of B.south west] (A)
                                  {\myLettersHandler{A}};
       \node[right=of A]      (r) {\myLettersHandler{R}};
       \node[right=-5mm of r] (Y) {\myLettersHandler{Y}};
    \end{scope}
  }, my letters/.cd, #1},
  pics/my letters/outline/.initial=bittersweet,
  pics/my letters/inside/.initial=black,
  % This one sets both colors in one go
  pics/my letters/outline and inside/.style={
    /tikz/pics/my letters/.cd, outline=#1, inside=#1},
  pics/my letters/draw outline/.is if=mylettersdrawoutline,
  pics/my letters/draw outline=false, % initial value
}
\makeatother

\begin{document}

\pagecolor{black}
% /tikz/my logo color determines the color of the letters *and* the line
\begin{tikzpicture}[my logo color/.style={
                      color={#1},
                      pics/my letters/outline and inside={#1}},
                    my logo color=bittersweet]

\coordinate (upper left)  at (-9,2);
\coordinate (lower right) at (0.3,-10.2);

\begin{scope}[overlay, pics/my letters/draw outline]
  \pic {my letters={inside=black}}; % override the inside color here
  \begin{scope}
    \clip (upper left) -- (lower right) |- cycle;
    \pic {my letters};
  \end{scope}
\end{scope}

\draw[very thick] (upper left) -- (lower right);
\end{tikzpicture}

\end{document}

variant using positioning

You may of course further adjust the placement of individual letters to your taste. :-)

  • 1
    I wonder, why you nor exploit positioning library and set nodes distances in tikzpicture options for example to node distance=2.71pt and 2pt and than for letters wrote for example: \node[right=of F] (E) {\myLettersHandler{E}}; – Zarko Jan 13 at 18:07
  • @Zarko I kept this part from the OP's code. Did you actually try these changes? I found that the scale=15 doesn't make it very straightforward this way. I can do the pic with nodes={font={\fontsize{150}{150}\selectfont},node distance=2mm} and ... – frougon Jan 13 at 18:38
  • @Zarko \node (F) at (-7.8,0) {\myLettersHandler{F}}; \node[right=of F] (E) {\myLettersHandler{E}}; \node[below=2.721mm of F, xshift=.3pt] (B) {\myLettersHandler{B}}; \node[right=of B] (R) {\myLettersHandler{R}}; \node[right=of R](U) {\myLettersHandler{U}}; \node[below=2.721mm of B] (A) {\myLettersHandler{A}}; \node[right=of A] (r) {\myLettersHandler{R}}; \node[right=of r] (Y) {\myLettersHandler{Y}};, but the \fontsize{150}{150} has a rather different (in my opinion unpleasant) result on the font appearance, as compared to the scale=15. – frougon Jan 13 at 18:39
  • 6
    Spectacular and impressive :-). Very very good. – Sebastiano Jan 13 at 20:09
  • 1
    @frougon, you are right. Letters is better to positioning to their center. Consequently, tilz library positioning is not needed. – Zarko Jan 13 at 20:48

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.