10

Related to these previous my questions A special annulment (i.e., cancellation) of a stamp and Date time in two rows in Italian format and time zone I have created another MWE to have some different choices and a more professional timbre.

\documentclass[12pt,margin=3mm,italian]{standalone}
\usepackage{newtxtext}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage[useregional=numeric,showseconds=true,showzone=false]{datetime2}
\usepackage{fontawesome5}

\begin{document} \begin{tikzpicture} \draw (0,0) node[minimum size=4cm, draw=black, circle, line width=.5mm, text width=3cm, align=center] {\large \bfseries \mbox{\DTMtoday} \DTMcurrenttime}; \draw [black,line width=.35mm] (0,0) circle[radius=1.75cm]; {\large \bfseries \mbox{\DTMtoday} \DTMcurrenttime};
\node at (0,1) (A) {\textcolor{Green}{\large Visto}}; \node at (0,-1) (B) {\small \textsc{Non approvato}}; \end{tikzpicture} \end{document}

enter image description here

I would to have

https://i1.wp.com/images-na.ssl-images-amazon.com/images/I/61aM4kg3x2L.AC_SL1000.jpg?resize=840%2C840&ssl=1

the circumferences in relief, deleting "non approvato" and "visto" in the middle part, putting them between the two circumferences.

Sebastiano
  • 54,118
  • 1
    Possibly related: https://tex.stackexchange.com/questions/53369/how-to-create-text-with-shadows – Steven B. Segletes Oct 22 '20 at 20:20
  • @StevenB.Segletes Hi, :-) thank you for the link..I am not able to make a relief and put the text into two circumferences :-( – Sebastiano Oct 22 '20 at 20:23
  • 1
    The pointer may provide an approach for the appearance of relief text, perhaps. But the circumference writing is clearly a tikz thing, not addressed in the referenced question. – Steven B. Segletes Oct 22 '20 at 20:25
  • @StevenB.Segletes I thought the question was clear. Now I edit my question. Thank you very much for the advice. – Sebastiano Oct 22 '20 at 20:28
  • 1
    Like that? https://i.stack.imgur.com/uvJew.png – leandriis Oct 22 '20 at 20:40
  • @leandriis Yes :-) I smile when you send me the previews :-) :-) The image was all with the black background but I think it's with a transparent option your code. Does the relief stand up? – Sebastiano Oct 22 '20 at 20:48
  • 1
    @Sebastiano: I completely missed the part of the relief like text. I just focused on getting the text to follow the curve. – leandriis Oct 22 '20 at 20:51

1 Answers1

17

With quite a lot of help from https://tex.stackexchange.com/a/545988/87678, it's possible to come up with something that looks a bit like your picture. You could further tweak the various settings to your liking.

It's pretty slow to compile though! It would probably be quicker, easier, and nicer looking to to script something with ImageMagick.

\documentclass[italian]{standalone}
\usepackage[useregional=numeric,showseconds=true,showzone=false]{datetime2}
\usepackage{tikz}
\usetikzlibrary{decorations.text, shadows.blur}
\pgfmathsetmacro{\shadowangle}{132}
\newlength{\shadowdistance}
\pgfmathsetlength{\shadowdistance}{0.3pt}
\pgfmathsetmacro{\shadowopacity}{0.7}
\pgfmathsetmacro{\shadowspread}{0.02}
\pgfmathsetmacro{\shadowsize}{0}
\pgfmathtruncatemacro{\totshadow}{100}
\begin{document}
\begin{tikzpicture}[
    datetime/.style={
      align=center,
      font=\scriptsize\sffamily\bfseries
    },
    pathtext/.style={
      opacity={\shadowopacity/\totshadow},
      shift={({\shadowangle-180}:\shadowdistance)},
      scale={1+\shadowsize}
    },
    pathblur/.style={
      fill=white,
      blur shadow={%
        shadow xshift=0.3pt,
        shadow yshift=-0.3pt,
        shadow scale=1,
        shadow blur radius=1.5pt
      }
    }
  ]
  \path [use as bounding box] (-45pt,-45pt) rectangle (45pt,45pt);
  \begin{scope}[even odd rule]
    \path [pathblur] (0,0) circle (26pt) circle (24pt); 
    \path [pathblur] (0,0) circle (41pt) circle (39pt); 
  \end{scope}
  \foreach \nshadow [evaluate=\nshadow as \angshadow using \nshadow/\totshadow*360] in {1,...,\totshadow}{
    \path[pathtext,
      rotate=-90,
      postaction={
        decorate,
        decoration={
          transform={shift=(\angshadow:\shadowspread)},
          text effects along path,
          text effects/every character/.style={text along path},
          text effects/font = {\sffamily\bfseries},
          text align/align=center,
          raise=-7pt, 
          reverse path=true,
          text={VISTO}
        }
      }
    ] (0,0) circle (36pt);}
  \path[
      rotate=-90,
      postaction={
        decorate,
        decoration={
          text effects along path,
          text effects/every character/.style={text along path},
          text effects/font = {\sffamily\bfseries},
          text align/align=center,
          raise=-7pt, 
          reverse path=true,
          text effects/color=white,
          text={VISTO}
        }
      }
    ] (0,0) circle (36pt);
  \foreach \nshadow [evaluate=\nshadow as \angshadow using \nshadow/\totshadow*360] in {1,...,\totshadow}{
    \path[pathtext,
      rotate=90,
      postaction={
        decorate,
        decoration={
          transform={shift=(\angshadow:\shadowspread)},
          text effects along path,
          text effects/every character/.style={text along path},
          text effects/font = {\sffamily\bfseries},
          text align/align=center,
          text={NON APPROVATO}
        }
      }
    ] (0,0) circle (36pt);}
  \path[
      rotate=90,
      postaction={
        decorate,
        decoration={
          text effects along path,
          text effects/every character/.style={text along path},
          text effects/font = {\sffamily\bfseries},
          text align/align=center,
          text effects/color=white,
          text={NON APPROVATO}
        }
      }
    ] (0,0) circle (36pt);
  \path[pathtext]
    foreach \nshadow [evaluate=\nshadow as \angshadow using \nshadow/\totshadow*360] in {1,...,\totshadow}
      {node [datetime] at (\angshadow:\shadowspread) {\DTMtoday\\\DTMcurrenttime}};
  \node [datetime, text=white] {\DTMtoday\\\DTMcurrenttime};
  \path [pathblur] (25:32.5pt) circle (2pt); 
  \path [pathblur] (155:32.5pt) circle (2pt); 
\end{tikzpicture}
\end{document}

output

David Purton
  • 25,884
  • 1
    +1 Very nice job ! – AndréC Oct 23 '20 at 15:27
  • Sorry for the delay but having 6 classes and with so many commitments I was not able to connect. Thank you very much. I would not have been able to do it even after 1 a.l. Thank you very much David. – Sebastiano Oct 29 '20 at 21:52