% !TeX TXS-program:compile = txs:///arara
% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}

\documentclass[11pt,a4paper]{ltxdoc}
\usepackage{bera}
\usepackage{inconsolata}
\usepackage[T1]{fontenc}
\usepackage[scale=0.875]{cabin}
\usepackage{tikz-decofonts}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{tabularray}
\usepackage{fontawesome5}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{\sffamily\small [tikz-decofonts]}
\cfoot{\sffamily\small - \thepage{} -}
\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
\usepackage{hologo}
\providecommand\tikzlogo{Ti\textit{k}Z}
\providecommand\TeXLive{\TeX{}Live\xspace}
\let\TikZ\tikzlogo

\usepackage{hyperref}
\urlstyle{same}
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
\def\TPversion{0.1.0}
\def\TPdate{14/10/2024}
\usepackage{tcolorbox}
\tcbuselibrary{breakable,skins,hooks,listingsutf8}

\lstset{
	language=[LaTeX]TeX,%
	basicstyle=\ttfamily,%
	keywordstyle={\color{blue}},%
	classoffset=0,%
	keywords={},%
	alsoletter={-},%
	keywordstyle={\color{blue}},%
	classoffset=1,%
	alsoletter={-},%
	morekeywords={commalists-tools},%
	keywordstyle={\color{violet}},%
	classoffset=2,%
	alsoletter={-},%
	morekeywords={\tkzbrush,\tkzink,\tkzpixl,\tkzpixletter,\tkzpixlquote},%
	keywordstyle={\color{green!50!black}},%
	classoffset=3,%
	morekeywords={},%
	keywordstyle={\color{orange}}
}

\newtcblisting{DemoCode}[1]{%
	enhanced,width=\linewidth,%
	bicolor,size=title,%
	colback=cyan!10!white,%
	colbacklower=cyan!5!white,%
	colframe=cyan!75!black,%
	listing options={%
		breaklines=true,%
		breakatwhitespace=true,%
		style=tcblatex,basicstyle=\small\ttfamily,%
		tabsize=4,%
		commentstyle={\itshape\color{gray}},
		keywordstyle={\color{blue}},%
		classoffset=0,%
		keywords={\usepackage,\includegraphics,xstring,listofitems,\readlist,\showitems,\xintFor,\xintSeq},%
		alsoletter={-},%
		keywordstyle={\color{blue}},%
		classoffset=1,%
		alsoletter={-},%
		morekeywords={euromoney},%
		keywordstyle={\color{violet}},%
		classoffset=2,%
		alsoletter={-},%
		morekeywords={\tkzbrush,\tkzink,\tkzpixl,\tkzpixletter,\tkzpixlquote},%
		keywordstyle={\color{green!50!black}},%
		classoffset=3,%
		morekeywords={color,lines,scale,height,offseth,offsetv,thick,gridcolor,gridafter,nospaceafter,border},%
		keywordstyle={\color{orange}}
	},%
	#1
}

\newtcbinputlisting\DemoCodeFile[1]{%
	enhanced,width=\linewidth,%
	bicolor,size=title,%
	colback=lightgray!10!white,%
	colbacklower=lightgray!5!white,%
	colframe=lightgray!75!black,%
	listing options={%
		breaklines=true,%
		breakatwhitespace=true,%
		style=tcblatex,
		basicstyle=\scriptsize\ttfamily,%
		tabsize=4,%
		commentstyle={\itshape\color{gray}},%
		%lastline=148
	},%
	breakable,
	listing only,%
	listing file={#1}
}

\NewDocumentCommand\ShowCode{ m }{%
	\lstinline{#1}%
}

\begin{document}

\thispagestyle{empty}

\begin{center}
	\begin{minipage}{0.88\linewidth}
		\begin{tcolorbox}[colframe=yellow,colback=yellow!15]
			\begin{center}
				\renewcommand{\arraystretch}{1.25}%
				\begin{tabular}{c}
					{\Huge \texttt{tikz-decofonts}}\\
					\\
					{\LARGE Simple "decoration" fonts, made} \\
					{\LARGE with Ti\textit{k}Z, for small texts\ldots} \\
					\\
					{\small \texttt{Version \TPversion{} -- \TPdate}}
				\end{tabular}
			\end{center}
		\end{tcolorbox}
	\end{minipage}
\end{center}

\begin{center}
	\begin{tabular}{c}
		\texttt{Cédric Pierquet}\\
		{\ttfamily c pierquet -- at -- outlook . fr}\\
		\texttt{\url{https://github.com/cpierquet/tikz-decofonts}} \\
	\end{tabular}
\end{center}

\hrule

\vfill

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
%paintbrush effect
\tkzbrush[color=blue]{DECORATION}

%paintink effect
\tkzink[color=orange]{DECORATION}

%pixeletter effect
\tkzpixl[color=violet]{DECORATION}
\end{tcblisting}

\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
\tkzbrush[color=blue]{DECORATION}
\end{tcolorbox}

\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
\hfill\tkzink[color=orange]{DECORATION}\hfill~
\end{tcolorbox}

\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
\hfill\tkzpixl[color=violet]{Decoration}
\end{tcolorbox}

\vfill~

\hrule

\vspace*{5mm}

\textit{Ideas and parts of codes, with \texttt{CC\,BY-SA\,4.0} licenses, come from :}

\begin{itemize}
	\item \href{https://tex.stackexchange.com/questions/475141/simulating-paintbrush-strokes-in-tikz}{[link on tex.stackexchange]} from \textsf{user121799} for paintbrush;
	\item \href{https://tex.stackexchange.com/questions/460836/custom-line-cap-to-simulate-inked-line-in-tikz/460842#460842}{[link on tex.stackexchange]} from \textsf{user121799} for inkbrush.
\end{itemize}

\pagebreak

\phantomsection

\hypertarget{matoc}{}

\tableofcontents

\vspace*{5mm}

%\hrule

\pagebreak

\section{Loading, useful packages, purposes and acknowledgments}

\subsection{Loading and useful packages}

In order to load \texttt{tikz-decofonts}, simply use:

\begin{DemoCode}{listing only}
\usepackage{tikz-decofonts}
\end{DemoCode}

Loaded packages are \texttt{tikz}, \texttt{xintexpr}, \texttt{simplekv} and \texttt{xstring}.

Loaded \texttt{tikz.librairies} are \texttt{decorations}, \texttt{decorations.pathreplacing}, \texttt{calc}, \texttt{positioning}, \texttt{bbox}, \texttt{arrows.meta} and \texttt{bending}.

\smallskip

Globally, height of rendering is about 1cm, but some customization are available.

\subsection{Purposes and acknowledgments}

The purposes of this small package is not to provide full fonts, with all characters, but give restricted possibility to present \textbf{short} texts of title with \textit{cute} effects.

\smallskip

These decorations are not destined to be use for whole paragraphs or texts, but just for fun for small titles or small texts.

\smallskip

Since many calculations are required internally, compilation time can be increased, so be careful with intensive use!

\smallskip

\textit{Ideas and parts of codes, with \texttt{CC\,BY-SA\,4.0} licenses, come from:}

\begin{itemize}
	\item \href{https://tex.stackexchange.com/questions/475141/simulating-paintbrush-strokes-in-tikz}{[link on tex.stackexchange]} from \textsf{user121799} for paintbrush;
	\item \href{https://tex.stackexchange.com/questions/460836/custom-line-cap-to-simulate-inked-line-in-tikz/460842#460842}{[link on tex.stackexchange]} from \textsf{user121799} for inkbrush.
\end{itemize}

Some adjustments (keys, paths) are maid from original code, but the global usage is due to the links above !

\pagebreak

\section{The different effects}

\subsection{Paint brush}

{\small\faBomb} The effect is \textbf{very} \textit{time-consuming} to compile !!

\begin{DemoCode}{listing only}
%only uppercase letters allowed
\tkzbrush[color=...,lines=...,scale=...]<tikzpicture options>{short text}

%color = black by default
%lines = 12 by default
%scale = 1 by default
\end{DemoCode}

\begin{DemoCode}{listing only}
%default output
\tkzbrush{TIKZ DECORATION}
\end{DemoCode}

\begin{DemoCode}{text only}
%default output
\tkzbrush{TIKZ DECORATION}

\end{DemoCode}

\begin{DemoCode}{listing only}
%customization(s) (external file for speeding rendering ^^)
\tkzbrush[color=red,lines=20,scale=1.5]{CUSTOM TEXT}
\end{DemoCode}

\begin{DemoCode}{text only}
%customization(s) (external file for speeding rendering ^^)
\includegraphics{tkzbrushA.pdf}
\end{DemoCode}

\pagebreak

\subsection{Ink brush}

\begin{DemoCode}{listing only}
%only uppercase letters allowed
\tkzink[color=...,thick=...,scale=...]<tikzpicture options>{short text}

%color = black by default
%thick = 3 by default
%scale = 1 by default
\end{DemoCode}

\begin{DemoCode}{}
%default output
\tkzink{TIKZ DECORATION}
\end{DemoCode}

\begin{DemoCode}{}
%customization(s)
\tkzink[color=olive,thick=5,scale=2]{TIKZ DECORATION}
\end{DemoCode}

\pagebreak

\subsection{Pixl brush}

\begin{DemoCode}{listing only}
%regular letters allowed (upper and/or lower), rendered characters are 5 columns x 7 lines
\tkzpixl%
    [height=...,thick=...,color=...,gridcolor=...,border=...,
    offseth=...,offsetv=...,gridafter=...,nospaceafter=...]
    <tikzpicture options>{short text}

\tkzpixletter%
    [height=...,thick=...,color=...,gridcolor=...,border=...,
    offseth=...,offsetv=...,gridafter=...,nospaceafter=...]
    <tikzpicture options>{letter}

\tkzpixlquote%if problem with '...
    [height=...,thick=...,color=...,gridcolor=...,
    offseth=...,offsetv=...,gridafter=...,nospaceafter=...]
    <tikzpicture options>

%height = 11mm by default, thick = 0.1mm by default
%color = black by default, gridcolor = gray by default
%offseth = 1 by default (squares left/right of regular character)
%offsetv = 2 by default (squares above/below of regular character)
%boder = false by default (boolean for adding border)
%gridafter = false by default (boolean for showing grid after pixls)
%nospaceafter = false by default (boolean for removeing hspace after pixls)
\end{DemoCode}

\begin{DemoCode}{}
%default output, comparaison with character w/o offsets (5*7)
\tkzpixl{And then, 1+1=2 !?!} and \tkzpixletter[offseth=0,offsetv=0]{*}
\end{DemoCode}

\begin{DemoCode}{}
%customization(s)
\tkzpixl[color=violet,height=1.75cm,gridafter,offsetv=3,border]{Small custo'm text}
\end{DemoCode}

\pagebreak

\section{History}

\texttt{0.1.0: Initial version}

\end{document}
