How can I stretch a letter asymmetrically?

Here is an example of what I would like to obtain:

I know how to manipulate boxes to scale the 'E' and to lower it, but is there a package to perform this kind of asymmetrical stretch, or apply scaling only to a part of the box?

-
I have a feeling you should go TiKz for this... – Mario S. E. Jun 23 '14 at 8:37

Example with TikZ:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[
baseline=(T.base),
line cap=round,
semithick,
inner sep=1pt,
]
\pgfmathsetmacro\WidthE{0.75*width("E")}
\def\SerifWidth{1.25pt}
\node (T) {%
\hspace{\WidthE pt}\vphantom{\"E}% width and height of "E"
arth%
\hspace{-1pt}\null % inner sep subtracted from the right
};
\draw (T.north east) -- (T.north west) -- (T.south west) -- (T.south east)
(T.west) -- ++(\WidthE pt,0)
;
\draw (T.north east) -- +(\SerifWidth,\SerifWidth)
(T.north west) -- +(-\SerifWidth,\SerifWidth)
(T.south west) -- +(-\SerifWidth,-\SerifWidth)
(T.south east) -- +(\SerifWidth,-\SerifWidth)
;
\end{tikzpicture}
\end{document}


Some improvements:

• Package pict2e gets rid of many restrictions of LaTeX's picture mode (e.g. more sizes, slopes, ... for circles, lines, ...).

• Round line caps can be simulated by small filled circles.

• Bounding box corrected.

• Smaller serifs.

Full example:

\documentclass{article}

\usepackage{pict2e}

\begin{document}

\begin{picture}(71.5,41.5)(14.25,4.25)

\linethickness{1.5pt}
\put(20,10){\line(0,1){30}}

\put(20,10){\line(1,0){60}}
\put(20,40){\line(1,0){60}}
\put(20,25){\line(1,0){15}}

\put(20,10){\line(-1,-1){5}}
\put(80,10){\line(1,-1){5}}
\put(20,40){\line(-1,1){5}}
\put(80,40){\line(1,1){5}}

\put(20,10){\circle*{1.5}}
\put(20,40){\circle*{1.5}}
\put(35,25){\circle*{1.5}}
\put(80,10){\circle*{1.5}}
\put(80,40){\circle*{1.5}}

\put(15,5){\circle*{1.5}}
\put(15,45){\circle*{1.5}}
\put(85,5){\circle*{1.5}}
\put(85,45){\circle*{1.5}}

\put(37,15){\Huge arth}
\end{picture}

\end{document}
\usepackage{pict2e}

\begin{document}

\begin{picture}(71.5,41.5)(14.25,4.25)

\linethickness{1.5pt}
\put(20,10){\line(0,1){30}}

\put(20,10){\line(1,0){60}}
\put(20,40){\line(1,0){60}}
\put(20,25){\line(1,0){15}}

\put(20,10){\line(-1,-1){5}}
\put(80,10){\line(1,-1){5}}
\put(20,40){\line(-1,1){5}}
\put(80,40){\line(1,1){5}}

\put(20,10){\circle*{1.5}}
\put(20,40){\circle*{1.5}}
\put(35,25){\circle*{1.5}}
\put(80,10){\circle*{1.5}}
\put(80,40){\circle*{1.5}}

\put(15,5){\circle*{1.5}}
\put(15,45){\circle*{1.5}}
\put(85,5){\circle*{1.5}}
\put(85,45){\circle*{1.5}}

\put(37,15){\Huge arth}
\end{picture}

\end{document}


A "red flashy" variant for Paulo

\documentclass{article}

\usepackage{pict2e}
\usepackage{color}
\pagestyle{empty}

\begin{document}

\newcommand*{\red}[1]{\ifnum#1=\redstatus\color{red}\fi}
\newcommand*{\redflash}[1]{%
\chardef\redstatus=#1\relax
\begin{picture}(71.5,41.5)(14.25,4.25)

\linethickness{1.5pt}

\put(20,10){\red2\red3\red4\circle*{1.5}}
\put(20,40){\red4\red6\red7\circle*{1.5}}
\put(20,25){\red5\circle*{1.5}}
\put(35,25){\red5\circle*{1.5}}
\put(80,10){\red1\red2\circle*{1.5}}
\put(80,40){\red7\red8\circle*{1.5}}

\put(20,10){\red4\line(0,1){30}}

\put(20,10){\red2\line(1,0){60}}
\put(20,40){\red7\line(1,0){60}}
\put(20,25){\red5\line(1,0){15}}

\ifnum4=\redstatus
\put(20,10){\red4\line(0,1){30}}%
\fi

\put(20,10){\red3\line(-1,-1){5}}
\put(80,10){\red1\line(1,-1){5}}
\put(20,40){\red6\line(-1,1){5}}
\put(80,40){\red8\line(1,1){5}}

\put(15,5) {\red3\circle*{1.5}}
\put(15,45){\red6\circle*{1.5}}
\put(85,5) {\red1\circle*{1.5}}
\put(85,45){\red8\circle*{1.5}}

\put(37,15){\Huge{\red9a}{\red{10}r}{\red{11}t}{\red{12}{h}}}
\end{picture}%
\newpage
}

\redflash1
\redflash2
\redflash3
\redflash4
\redflash5
\redflash6
\redflash7
\redflash8
\redflash9
\redflash{10}
\redflash{11}
\redflash{12}

\end{document}


Command line:

pdflatex test
pdfcrop test.pdf test-crop.pdf
gs -sDEVICE=png256 -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -dPDFSETTINGS=/prepress -dUseFastColor=true -r288x288 -sOutputFile=test%d.png -ftest-crop.pdf


-
Fantastic, as always! :) – Paulo Cereda Jun 23 '14 at 11:27

picture mode to the rescue (to save you from tikz, perhaps:-)

\documentclass{article}

\begin{document}

\begin{picture}(100,60)

\linethickness{1.5pt}
\put(20,10){\line(0,1){30}}

\put(20,10){\line(1,0){60}}
\put(20,40){\line(1,0){60}}
\put(20,25){\line(1,0){15}}

\put(20,10){\line(-1,-1){10}}
\put(80,10){\line(1,-1){10}}
\put(20,40){\line(-1,1){10}}
\put(80,40){\line(1,1){10}}

\put(35,15){\Huge arth}
\end{picture}

\end{document}

-
Plus some filled circles to smooth line joins and simulate round line caps. And package pict2e for better lines. – Heiko Oberdiek Jun 23 '14 at 9:09
@HeikoOberdiek I wondered about using pict2e, but the OP is going to accept a tikz answer anyway, so I thought I'd stick to classic. – David Carlisle Jun 23 '14 at 9:13
+1 for a very classic solution. :-) – Przemysław Scherwentke Jun 23 '14 at 9:30
@Heiko: how about David including a blinking red version? :) – Paulo Cereda Jun 23 '14 at 10:11
@PauloCereda: Done, see my answer. – Heiko Oberdiek Jun 23 '14 at 10:40

You mean like what \resizebox from graphicx does?

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\resizebox{5cm}{1cm}{E}

\end{document}


If this is not what you want, then I probably don't understand what "asymmetric" means.

However, I don't think this is what you really want since the result is very ugly. You better stick to some drawing tools and design a new shape of the letter E.

-
resizebox scales independently horizontally and vertically, but symetrically in each direction independently. My need is a different scale in the right direction than in the left direction, with the ability to set up the origin in the vertical bar of the letter. – lalebarde Jun 23 '14 at 9:16