# Customising the Person symbol

This is a bit of strange one, and not one I expect there will be an answer to. But you gotta try right?

I am trying to dress the little person symbol. I want to put a t-shirt on him - and preferable by able to change the colour of said t-shirt. I am using the \Gentsroom symbol from MarVoSym package which looks like this:

I want to put a yellow shirt on him, so that he looks like this:

Can anyone helps? Thanks.

10pt version

\documentclass{article}
\usepackage{stackengine,marvosym,xcolor,trimclip}
\begin{document}
\stackinset{c}{}{c}{0.9pt}{%
\color{yellow!80!orange}\clipbox{0pt 4.0pt 0pt 2.2pt}{\Gentsroom}}{%
\stackinset{c}{}{c}{}{%
\color{yellow!80!orange}\clipbox{1.1pt 2.2pt 1.1pt 2.2pt}{\Gentsroom}}{%
\Gentsroom}}
\end{document}


12pt version

Since clips are performed in pts, different font sizes require different \clipbox values.

\documentclass[12pt]{article}
\usepackage{stackengine,marvosym,xcolor,trimclip}
\begin{document}
\stackinset{c}{}{c}{1pt}{%
\color{yellow!80!orange}\clipbox{0pt 4.6pt 0pt 2.6pt}{\Gentsroom}}{%
\stackinset{c}{}{c}{}{%
\color{yellow!80!orange}\clipbox{1.3pt 2.6pt 1.3pt 2.6pt}{\Gentsroom}}{%
\Gentsroom}}
\end{document}


Of course, I see where you are going with this...

Just grab your favorite team logo in png form and, voila!

\documentclass[12pt]{article}
\usepackage{stackengine,marvosym,xcolor,trimclip,graphicx}
\begin{document}
\stackinset{c}{}{c}{}{\includegraphics[width=2pt]{Ravens}}{%
\stackinset{c}{}{c}{1pt}{%
\color{purple!55!blue}\clipbox{0pt 4.6pt 0pt 2.6pt}{\Gentsroom}}{%
\stackinset{c}{}{c}{}{%
\color{purple!55!blue}\clipbox{1.3pt 2.6pt 1.3pt 2.6pt}{\Gentsroom}}{%
\Gentsroom}}}
\end{document}


To automate the process, for color and scalablity, Here is \Tshirt[<size>]{<color>}

\documentclass[12pt]{article}
\usepackage{stackengine,marvosym,xcolor,trimclip,scalerel}
\newcommand\Tshirt[2][8.8pt]{\savestack\theTshirt{%
\stackinset{c}{}{c}{1pt}{%
\color{#2}\clipbox{0pt 4.6pt 0pt 2.6pt}{\Gentsroom}}{%
\stackinset{c}{}{c}{}{%
\color{#2}\clipbox{1.3pt 2.6pt 1.3pt 2.6pt}{\Gentsroom}}{%
\Gentsroom}}}%
\scaleto{\theTshirt}{#1}}
\begin{document}
\Gentsroom \Tshirt{yellow!80!orange}%
\Tshirt[18pt]{red}\Tshirt[30pt]{purple!55!blue}
\end{document}


• This is great thanks. It comes out a little wonky though. There is t-shirt' on his head on my version. – PercyF2519 Jun 29 '17 at 11:50
• @PercyF2519 Is your document a different point size (e.g., 12pt vs. 10 pt, for example)? Since my clips are done in points, it will matter. – Steven B. Segletes Jun 29 '17 at 11:58
• Yeah, 12pt in my document – PercyF2519 Jun 29 '17 at 12:03
• @PercyF2519 See my edit. – Steven B. Segletes Jun 29 '17 at 12:03
• @PercyF2519 I tweaked a number, make sure you get the latest. – Steven B. Segletes Jun 29 '17 at 12:07

You can use picture mode. This scales with the font size, but you can also decide an “absolute” height.

\documentclass{article}

\usepackage{pict2e,xcolor}
\usepackage{marvosym}% for comparison

\definecolor{yellowshirt}{RGB}{255,211,6}

\newcommand{\Person}[1][0.87\ht\strutbox]{%
\begingroup\setlength\unitlength{#1}%
\begin{picture}(0.6,1)
\put(0.3,0.85){\circle*{0.28}}
\polygon*(0.075,0.3)(0.15,0.3)(0.15,0.55)(0.075,0.55)% left arm
\polygon*(0.45,0.3)(0.525,0.3)(0.525,0.55)(0.45,0.55)% right arm
\polygon*(0.17,0)(0.29,0)(0.29,0.3)(0.17,0.3)% left leg
\polygon*(0.31,0)(0.43,0)(0.43,0.3)(0.31,0.3)% right leg
\color{yellowshirt}
\polygon*(0.17,0.32)(0.43,0.32)(0.43,0.7)(0.17,0.7)% torso
\polygon*(0.075,0.55)(0.15,0.55)(0.15,0.7)(0.075,0.7)% left arm
\polygon*(0.45,0.55)(0.525,0.55)(0.525,0.7)(0.45,0.7)% right arm
\end{picture}\endgroup
}

\begin{document}

\Gentsroom\ \Person {\Huge\Gentsroom\ \Person} \Person[2cm]

\end{document}


The following example uses FontForge and TikZ to get the SVG path description of the Gentroom's glyph.

1. The font file TDS:fonts/type1/public/marvosym/marvosym.pfb is opened in FontForge.
2. The glyph Gentroom can be found at position 120 and is opened.
3. The glyph description is exported as SVG:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg viewBox="0 -200 1000 1000">
<g transform="matrix(1 0 0 -1 0 800)">
<path fill="currentColor"
d="M220 728c53 0 101 -44 103 -99c0 -58 -34 -101 -87 -109h-32c-20 3 -37 11 -54 24l-19 25c-10 19 -14 33 -14 53c0 60 42 103 103 106zM49 504l52 -2v-294h-52v296zM117 504l206 -2v-278h-206v280zM338 504l52 -2v-294h-52v296zM117 208h94v-208h-94v208zM228 208h95v-208h-95v208z" />
</g>
</svg>


The path description, the value of attribute d of the path element can also be parsed by the TikZ library svg.path. The language is quite easy. An operator letter is followed by arguments. Here, we need:

• M : absolute move-to
• l : relative line-to
• h : horizontal relative line-to
• v : vertical relative line-to
• z: close path (cycle in TikZ)
4. The SVG path is copied and modified in TikZ.

The LaTeX file result with comments:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{svg.path}
\usepackage{xcolor}
\definecolor{GentRoomTShirtColor}{HTML}{FFD800}

\begin{document}
\fill svg{%
M220 728c53 0 101 -44 103 -99c0 -58 -34 -101 -87 -109h-32c-20 3 -37 %
11 -54 24l-19 25c-10 19 -14 33 -14 53c0 60 42 103 103 106z%
% Left arm [original]
% M49 504l52 -2v-294h-52v296z
% Black part (two thirds) of left arm [new]
M49 405h52v-196h-52z%
% Torso [original]
% M117 504l206 -2v-278h-206v280z
% Right arm, original
% M338 504l52 -2v-294h-52v296z
% Black part (two thirds) of right arm [new]
M338 405h52v-196h-52z%
% Left leg [original]
% M117 208h94v-208h-94v208z
% Left leg [optimized]
M117 208h94v-208h-94z%
% Right leg [original]
% M228 208h95v-208h-95v208z
% Right leg [optimized]
M228 208h95v-208h-95z%
};
\fill[GentRoomTShirtColor] svg {%
% Upper part (one third) of left arm [new]
M49 503h52v-98h-52z%
% Torso [optimized]
M117 503h206v-277h-206z% torso
% Upper part (one third) of right arm [new]
M338 503h52v-98h-52z%
% of the original glyph or comment it , if you do not need them.
M0 0M439 0%
};
\end{tikzpicture}
\end{document}


Remarks:

• The coordinates are the same as in FontForge.
• The glyph description contains an oddity (bug): The upper right corners of the arms and the torso are lowered by 2pt in comparison to the upper left corners. This is fixed in the LaTeX example to get clear horizontal lines.
• I have omitted code to scale the result down to the actual glyph size or similar, because I do not know the purpose of the new symbol. (Scaling down to glyph size does not make sense, if the symbol is needed as large image.)
• The original side bearings of the glyph are added, but they can be easily removed if needed, see the comments.
• The close-path operator (z) connects to the start point, thus it is not necessary to go to the start point explicitly. The marker [optimized] means that the last line-to operation to the starting point before z is removed.

Making rules:

\documentclass{article}
\usepackage{wasysym,xcolor,graphicx}
\parindent0pt

\newcommand\Gent[1]{\resizebox{!}{#1em}{\parbox[b]{4em}{\makebox[3.2em]{\Huge$\CIRCLE$}\\
\rule[-.2em]{.5em}{3.2em}\,%
\rule{2em}{3em}\,\rule[-.2em]{.5em}{3.2em}\\[-2pt]
\rule{.5em}{0em}\,\rule{.8em}{3.2em}\,\,\rule{.8em}{3.2em}}}}

\newcommand\Tshirt[1]{\resizebox{!}{#1em}{\parbox[b]{4em}{\makebox[3.2em]{\color{orange}\Huge$\CIRCLE$}\\
\rlap{\color{yellow}\rule[-.2em]{.5em}{3.2em}}%
{\color{orange}\rule[-.2em]{.5em}{2.2em}}\,{\color{yellow}\rule{2em}{3em}}\,%
\rlap{\color{yellow}\rule[-.2em]{.5em}{3.2em}}%
{\color{orange}\rule[-.2em]{.5em}{2.2em}}\\[-2pt]
\rule{.5em}{0em}\,\rule{.8em}{3.2em}\,\,\rule{.8em}{3.2em}}}}

\begin{document}
\Gent{4} \Tshirt{4}
\Gent{3} \Tshirt{3}
\Gent{2} \Tshirt{2}
\Gent{1} \Tshirt{1}

\end{document}
`