Custom line cap to simulate inked line in TikZ
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
Looking for a way to add a custom line cap (slight bulbous) like one would get when inking a line on real paper.
tikz-pgf
add a comment |
up vote
3
down vote
favorite
Looking for a way to add a custom line cap (slight bulbous) like one would get when inking a line on real paper.
tikz-pgf
Related: tex.stackexchange.com/questions/14283
– Andrew
Nov 19 at 22:47
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Looking for a way to add a custom line cap (slight bulbous) like one would get when inking a line on real paper.
tikz-pgf
Looking for a way to add a custom line cap (slight bulbous) like one would get when inking a line on real paper.
tikz-pgf
tikz-pgf
asked Nov 19 at 22:29
user2501235
395
395
Related: tex.stackexchange.com/questions/14283
– Andrew
Nov 19 at 22:47
add a comment |
Related: tex.stackexchange.com/questions/14283
– Andrew
Nov 19 at 22:47
Related: tex.stackexchange.com/questions/14283
– Andrew
Nov 19 at 22:47
Related: tex.stackexchange.com/questions/14283
– Andrew
Nov 19 at 22:47
add a comment |
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
Can one add such arrow tips? Sure. Am I sure that my proposal is the best inky tip ever? Absolutely not. However, this should give you an idea how to approach the "best inky tip ever". ;-)
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.05pgfarrowlength-0.95pgflinewidth%
pgfpoint-0.2pgfarrowlength-0.9pgflinewidth
pgfpathcurvetopgfpoint-0.3pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
Or, if you wish to have a more pronounced tip, this can also be done.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-1.35pgflinewidth%
pgfpoint-0.3pgfarrowlength-1.1pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
And one could also add some randomness.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
BONUS: Some quick and dirty "inky" letters.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
usetikzlibrarypositioning
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
tikzsetpics/.cd,
A/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.55) -- (0.3,0.4) -- (0.6,-0.55);
draw[line width=5](0.1,1/3-0.45) --
(0.5,1/3-0.45);
path (0.7,0);,
B/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0) to[out=0,in=0,looseness=3] cycle;,
C/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5,-ink[bend]](0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.25);
path (0.7,0);,
D/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.25] cycle;
path (0.7,0);,
E/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0.5,-0.45) --(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
F/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
G/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5] (0,0) to[out=-90,in=-110,looseness=2]
(0.5,-0.25);
draw[line width=5,-ink[bend]] (0.54,-0.25) to (0.3,-0.25);
path (0.7,0);,
H/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.5) -- (0,0.5);
draw[line width=5,ink[bend]-ink[bend]] (0.5,-0.5) -- (0.5,0.5);
draw[line width=5] (0,0) -- (0.5,0);
path (0.7,0);,
I/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45);
path (0.25,0);,
J/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.2,0.45) -- (0.2,-0.35) to[out=-90,in=0]
(0.1,-0.45) to[out=180,in=-90] (0,-0.35);
path (0.45,0);,
K/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.4,0.45) -- (0.02,0) -- (0.4,-0.45);
path (0.6,0);,
L/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.5) -- (0,-0.45) -- (0.4,-0.45);
path (0.6,0);,
M/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) --
(0.3,0.25) -- (0.6,0.45) -- (0.6,-0.45);
path (0.8,0);,
N/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) -- (0.6,-0.4) --
(0.6,0.45);
path (0.8,0);,
O/.style=code=draw[line width=5] (0.3,0) circle(0.3 and 0.48);
path (0.8,0);,
P/.style=code=draw[line width=5,ink[bend]-] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0);
path (0.6,0);,
Q/.style=code=draw[line width=5]
(0.3,0) circle(0.3 and 0.48);
draw[line width=5,ink[bend]-ink[bend]](0.35,-0.25) -- (0.6,-0.45);
path (0.8,0);,
R/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0.05,0) -- (0.4,-0.45);
path (0.6,0);,
S/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.5,0.4)
to[out=160,in=165,looseness=2] (0.3,0)
to[out=-15,in=-20,looseness=2] (0.1,-0.4);
path (0.65,0);,
T/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.35,-0.45) -- (0.35,0.45) (0,0.45) -- (0.7,0.45);
path (0.85,0);,
U/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0,0) to[out=-90,in=-90,looseness=2.5]
(0.6,0) -- (0.6,0.5);
path (0.8,0);,
V/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0.3,-0.4) -- (0.6,0.5);
path (0.8,0);,
W/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) -- (0.3,-0.4) -- (0.45,-0.1)
-- (0.6,-0.4) -- (0.9,0.45);
path (1.1,0);,
X/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.6,-0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Y/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.3,0);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Z/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) --(0.6,0.45) -- (0,-0.45)
-- (0.6,-0.45);
path (0.8,0);,
space/.style=code=path (0,0) (0.2,0);,
begintikzpicture[blue!80!black]
pic[local bounding box=box1,scale=2] at (0,0) A;
foreach X [count=Y,evaluate=Y as Z using int(Y+1)] in B,...,Z
edeftempnoexpandpic[right=0mm of boxY,local bounding box=boxZ,scale=2]
X;
temp
endtikzpicture
enddocument
(Yes, obviously these are not at all as beautiful as dedicated fonts. However, one can subject them to nonlinear transformation, such as those of this impressive master piece. I spare this application for another day. Also because arrow tips and nonlinear transformations require some extra work.)
Wow, perfect thank you! And, in my book, those would count as some pretty perfect inky tips to me.
– user2501235
Nov 19 at 23:31
How to convert your font such that it becomes install-able on my machine?
– Artificial Stupidity
Nov 20 at 6:07
@ArtificialStupidity There is no font that you need to install. You can compile the code on your machine, I think, without adding anything e.g. withpdflatex
. And there is no font, I just drew the characters (very quickly and in a very dirty way) with TikZ. And since this is no font, you can not do anything sophisticated with it, in particular not typeset any formulae, which TeX is originally made for. The only conceivable use of this is that you can subject the "characters" to nontrivial transformations.
– marmot
Nov 20 at 6:15
@marmot: My idea is to create a font with TikZ and use it everywhere. :-)
– Artificial Stupidity
Nov 20 at 6:34
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
Can one add such arrow tips? Sure. Am I sure that my proposal is the best inky tip ever? Absolutely not. However, this should give you an idea how to approach the "best inky tip ever". ;-)
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.05pgfarrowlength-0.95pgflinewidth%
pgfpoint-0.2pgfarrowlength-0.9pgflinewidth
pgfpathcurvetopgfpoint-0.3pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
Or, if you wish to have a more pronounced tip, this can also be done.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-1.35pgflinewidth%
pgfpoint-0.3pgfarrowlength-1.1pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
And one could also add some randomness.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
BONUS: Some quick and dirty "inky" letters.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
usetikzlibrarypositioning
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
tikzsetpics/.cd,
A/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.55) -- (0.3,0.4) -- (0.6,-0.55);
draw[line width=5](0.1,1/3-0.45) --
(0.5,1/3-0.45);
path (0.7,0);,
B/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0) to[out=0,in=0,looseness=3] cycle;,
C/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5,-ink[bend]](0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.25);
path (0.7,0);,
D/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.25] cycle;
path (0.7,0);,
E/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0.5,-0.45) --(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
F/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
G/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5] (0,0) to[out=-90,in=-110,looseness=2]
(0.5,-0.25);
draw[line width=5,-ink[bend]] (0.54,-0.25) to (0.3,-0.25);
path (0.7,0);,
H/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.5) -- (0,0.5);
draw[line width=5,ink[bend]-ink[bend]] (0.5,-0.5) -- (0.5,0.5);
draw[line width=5] (0,0) -- (0.5,0);
path (0.7,0);,
I/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45);
path (0.25,0);,
J/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.2,0.45) -- (0.2,-0.35) to[out=-90,in=0]
(0.1,-0.45) to[out=180,in=-90] (0,-0.35);
path (0.45,0);,
K/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.4,0.45) -- (0.02,0) -- (0.4,-0.45);
path (0.6,0);,
L/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.5) -- (0,-0.45) -- (0.4,-0.45);
path (0.6,0);,
M/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) --
(0.3,0.25) -- (0.6,0.45) -- (0.6,-0.45);
path (0.8,0);,
N/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) -- (0.6,-0.4) --
(0.6,0.45);
path (0.8,0);,
O/.style=code=draw[line width=5] (0.3,0) circle(0.3 and 0.48);
path (0.8,0);,
P/.style=code=draw[line width=5,ink[bend]-] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0);
path (0.6,0);,
Q/.style=code=draw[line width=5]
(0.3,0) circle(0.3 and 0.48);
draw[line width=5,ink[bend]-ink[bend]](0.35,-0.25) -- (0.6,-0.45);
path (0.8,0);,
R/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0.05,0) -- (0.4,-0.45);
path (0.6,0);,
S/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.5,0.4)
to[out=160,in=165,looseness=2] (0.3,0)
to[out=-15,in=-20,looseness=2] (0.1,-0.4);
path (0.65,0);,
T/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.35,-0.45) -- (0.35,0.45) (0,0.45) -- (0.7,0.45);
path (0.85,0);,
U/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0,0) to[out=-90,in=-90,looseness=2.5]
(0.6,0) -- (0.6,0.5);
path (0.8,0);,
V/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0.3,-0.4) -- (0.6,0.5);
path (0.8,0);,
W/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) -- (0.3,-0.4) -- (0.45,-0.1)
-- (0.6,-0.4) -- (0.9,0.45);
path (1.1,0);,
X/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.6,-0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Y/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.3,0);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Z/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) --(0.6,0.45) -- (0,-0.45)
-- (0.6,-0.45);
path (0.8,0);,
space/.style=code=path (0,0) (0.2,0);,
begintikzpicture[blue!80!black]
pic[local bounding box=box1,scale=2] at (0,0) A;
foreach X [count=Y,evaluate=Y as Z using int(Y+1)] in B,...,Z
edeftempnoexpandpic[right=0mm of boxY,local bounding box=boxZ,scale=2]
X;
temp
endtikzpicture
enddocument
(Yes, obviously these are not at all as beautiful as dedicated fonts. However, one can subject them to nonlinear transformation, such as those of this impressive master piece. I spare this application for another day. Also because arrow tips and nonlinear transformations require some extra work.)
Wow, perfect thank you! And, in my book, those would count as some pretty perfect inky tips to me.
– user2501235
Nov 19 at 23:31
How to convert your font such that it becomes install-able on my machine?
– Artificial Stupidity
Nov 20 at 6:07
@ArtificialStupidity There is no font that you need to install. You can compile the code on your machine, I think, without adding anything e.g. withpdflatex
. And there is no font, I just drew the characters (very quickly and in a very dirty way) with TikZ. And since this is no font, you can not do anything sophisticated with it, in particular not typeset any formulae, which TeX is originally made for. The only conceivable use of this is that you can subject the "characters" to nontrivial transformations.
– marmot
Nov 20 at 6:15
@marmot: My idea is to create a font with TikZ and use it everywhere. :-)
– Artificial Stupidity
Nov 20 at 6:34
add a comment |
up vote
5
down vote
accepted
Can one add such arrow tips? Sure. Am I sure that my proposal is the best inky tip ever? Absolutely not. However, this should give you an idea how to approach the "best inky tip ever". ;-)
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.05pgfarrowlength-0.95pgflinewidth%
pgfpoint-0.2pgfarrowlength-0.9pgflinewidth
pgfpathcurvetopgfpoint-0.3pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
Or, if you wish to have a more pronounced tip, this can also be done.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-1.35pgflinewidth%
pgfpoint-0.3pgfarrowlength-1.1pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
And one could also add some randomness.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
BONUS: Some quick and dirty "inky" letters.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
usetikzlibrarypositioning
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
tikzsetpics/.cd,
A/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.55) -- (0.3,0.4) -- (0.6,-0.55);
draw[line width=5](0.1,1/3-0.45) --
(0.5,1/3-0.45);
path (0.7,0);,
B/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0) to[out=0,in=0,looseness=3] cycle;,
C/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5,-ink[bend]](0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.25);
path (0.7,0);,
D/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.25] cycle;
path (0.7,0);,
E/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0.5,-0.45) --(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
F/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
G/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5] (0,0) to[out=-90,in=-110,looseness=2]
(0.5,-0.25);
draw[line width=5,-ink[bend]] (0.54,-0.25) to (0.3,-0.25);
path (0.7,0);,
H/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.5) -- (0,0.5);
draw[line width=5,ink[bend]-ink[bend]] (0.5,-0.5) -- (0.5,0.5);
draw[line width=5] (0,0) -- (0.5,0);
path (0.7,0);,
I/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45);
path (0.25,0);,
J/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.2,0.45) -- (0.2,-0.35) to[out=-90,in=0]
(0.1,-0.45) to[out=180,in=-90] (0,-0.35);
path (0.45,0);,
K/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.4,0.45) -- (0.02,0) -- (0.4,-0.45);
path (0.6,0);,
L/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.5) -- (0,-0.45) -- (0.4,-0.45);
path (0.6,0);,
M/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) --
(0.3,0.25) -- (0.6,0.45) -- (0.6,-0.45);
path (0.8,0);,
N/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) -- (0.6,-0.4) --
(0.6,0.45);
path (0.8,0);,
O/.style=code=draw[line width=5] (0.3,0) circle(0.3 and 0.48);
path (0.8,0);,
P/.style=code=draw[line width=5,ink[bend]-] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0);
path (0.6,0);,
Q/.style=code=draw[line width=5]
(0.3,0) circle(0.3 and 0.48);
draw[line width=5,ink[bend]-ink[bend]](0.35,-0.25) -- (0.6,-0.45);
path (0.8,0);,
R/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0.05,0) -- (0.4,-0.45);
path (0.6,0);,
S/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.5,0.4)
to[out=160,in=165,looseness=2] (0.3,0)
to[out=-15,in=-20,looseness=2] (0.1,-0.4);
path (0.65,0);,
T/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.35,-0.45) -- (0.35,0.45) (0,0.45) -- (0.7,0.45);
path (0.85,0);,
U/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0,0) to[out=-90,in=-90,looseness=2.5]
(0.6,0) -- (0.6,0.5);
path (0.8,0);,
V/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0.3,-0.4) -- (0.6,0.5);
path (0.8,0);,
W/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) -- (0.3,-0.4) -- (0.45,-0.1)
-- (0.6,-0.4) -- (0.9,0.45);
path (1.1,0);,
X/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.6,-0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Y/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.3,0);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Z/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) --(0.6,0.45) -- (0,-0.45)
-- (0.6,-0.45);
path (0.8,0);,
space/.style=code=path (0,0) (0.2,0);,
begintikzpicture[blue!80!black]
pic[local bounding box=box1,scale=2] at (0,0) A;
foreach X [count=Y,evaluate=Y as Z using int(Y+1)] in B,...,Z
edeftempnoexpandpic[right=0mm of boxY,local bounding box=boxZ,scale=2]
X;
temp
endtikzpicture
enddocument
(Yes, obviously these are not at all as beautiful as dedicated fonts. However, one can subject them to nonlinear transformation, such as those of this impressive master piece. I spare this application for another day. Also because arrow tips and nonlinear transformations require some extra work.)
Wow, perfect thank you! And, in my book, those would count as some pretty perfect inky tips to me.
– user2501235
Nov 19 at 23:31
How to convert your font such that it becomes install-able on my machine?
– Artificial Stupidity
Nov 20 at 6:07
@ArtificialStupidity There is no font that you need to install. You can compile the code on your machine, I think, without adding anything e.g. withpdflatex
. And there is no font, I just drew the characters (very quickly and in a very dirty way) with TikZ. And since this is no font, you can not do anything sophisticated with it, in particular not typeset any formulae, which TeX is originally made for. The only conceivable use of this is that you can subject the "characters" to nontrivial transformations.
– marmot
Nov 20 at 6:15
@marmot: My idea is to create a font with TikZ and use it everywhere. :-)
– Artificial Stupidity
Nov 20 at 6:34
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
Can one add such arrow tips? Sure. Am I sure that my proposal is the best inky tip ever? Absolutely not. However, this should give you an idea how to approach the "best inky tip ever". ;-)
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.05pgfarrowlength-0.95pgflinewidth%
pgfpoint-0.2pgfarrowlength-0.9pgflinewidth
pgfpathcurvetopgfpoint-0.3pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
Or, if you wish to have a more pronounced tip, this can also be done.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-1.35pgflinewidth%
pgfpoint-0.3pgfarrowlength-1.1pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
And one could also add some randomness.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
BONUS: Some quick and dirty "inky" letters.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
usetikzlibrarypositioning
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
tikzsetpics/.cd,
A/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.55) -- (0.3,0.4) -- (0.6,-0.55);
draw[line width=5](0.1,1/3-0.45) --
(0.5,1/3-0.45);
path (0.7,0);,
B/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0) to[out=0,in=0,looseness=3] cycle;,
C/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5,-ink[bend]](0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.25);
path (0.7,0);,
D/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.25] cycle;
path (0.7,0);,
E/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0.5,-0.45) --(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
F/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
G/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5] (0,0) to[out=-90,in=-110,looseness=2]
(0.5,-0.25);
draw[line width=5,-ink[bend]] (0.54,-0.25) to (0.3,-0.25);
path (0.7,0);,
H/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.5) -- (0,0.5);
draw[line width=5,ink[bend]-ink[bend]] (0.5,-0.5) -- (0.5,0.5);
draw[line width=5] (0,0) -- (0.5,0);
path (0.7,0);,
I/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45);
path (0.25,0);,
J/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.2,0.45) -- (0.2,-0.35) to[out=-90,in=0]
(0.1,-0.45) to[out=180,in=-90] (0,-0.35);
path (0.45,0);,
K/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.4,0.45) -- (0.02,0) -- (0.4,-0.45);
path (0.6,0);,
L/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.5) -- (0,-0.45) -- (0.4,-0.45);
path (0.6,0);,
M/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) --
(0.3,0.25) -- (0.6,0.45) -- (0.6,-0.45);
path (0.8,0);,
N/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) -- (0.6,-0.4) --
(0.6,0.45);
path (0.8,0);,
O/.style=code=draw[line width=5] (0.3,0) circle(0.3 and 0.48);
path (0.8,0);,
P/.style=code=draw[line width=5,ink[bend]-] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0);
path (0.6,0);,
Q/.style=code=draw[line width=5]
(0.3,0) circle(0.3 and 0.48);
draw[line width=5,ink[bend]-ink[bend]](0.35,-0.25) -- (0.6,-0.45);
path (0.8,0);,
R/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0.05,0) -- (0.4,-0.45);
path (0.6,0);,
S/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.5,0.4)
to[out=160,in=165,looseness=2] (0.3,0)
to[out=-15,in=-20,looseness=2] (0.1,-0.4);
path (0.65,0);,
T/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.35,-0.45) -- (0.35,0.45) (0,0.45) -- (0.7,0.45);
path (0.85,0);,
U/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0,0) to[out=-90,in=-90,looseness=2.5]
(0.6,0) -- (0.6,0.5);
path (0.8,0);,
V/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0.3,-0.4) -- (0.6,0.5);
path (0.8,0);,
W/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) -- (0.3,-0.4) -- (0.45,-0.1)
-- (0.6,-0.4) -- (0.9,0.45);
path (1.1,0);,
X/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.6,-0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Y/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.3,0);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Z/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) --(0.6,0.45) -- (0,-0.45)
-- (0.6,-0.45);
path (0.8,0);,
space/.style=code=path (0,0) (0.2,0);,
begintikzpicture[blue!80!black]
pic[local bounding box=box1,scale=2] at (0,0) A;
foreach X [count=Y,evaluate=Y as Z using int(Y+1)] in B,...,Z
edeftempnoexpandpic[right=0mm of boxY,local bounding box=boxZ,scale=2]
X;
temp
endtikzpicture
enddocument
(Yes, obviously these are not at all as beautiful as dedicated fonts. However, one can subject them to nonlinear transformation, such as those of this impressive master piece. I spare this application for another day. Also because arrow tips and nonlinear transformations require some extra work.)
Can one add such arrow tips? Sure. Am I sure that my proposal is the best inky tip ever? Absolutely not. However, this should give you an idea how to approach the "best inky tip ever". ;-)
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.05pgfarrowlength-0.95pgflinewidth%
pgfpoint-0.2pgfarrowlength-0.9pgflinewidth
pgfpathcurvetopgfpoint-0.3pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
Or, if you wish to have a more pronounced tip, this can also be done.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-1.35pgflinewidth%
pgfpoint-0.3pgfarrowlength-1.1pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.8pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.55pgflinewidth%
pgfpoint-01pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
And one could also add some randomness.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
begintikzpicture
draw [line width=1mm,ink[bend]-ink[bend],blue!80!black] (0,0) to [bend left] (3,0);
endtikzpicture
enddocument
BONUS: Some quick and dirty "inky" letters.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryarrows.meta
usetikzlibrarybending
usetikzlibrarypositioning
pgfdeclarearrow
name=ink,
parameters= thepgfarrowlength,
setup code=
pgfarrowssettipend0pt
pgfarrowssetlineend-pgfarrowlength
pgfarrowlinewidth=pgflinewidth
pgfarrowssavethepgfarrowlength
,
drawing code=
pgfpathmovetopgfpoint-pgfarrowlength0.5pgflinewidth
pgfpathcurvetopgfpoint-0.75pgfarrowlength0.6pgflinewidth%
pgfpoint-0.01pgfarrowlength0.6pgflinewidth%
pgfpoint0pt0pt
pgfpathcurvetopgfpoint-0.01pgfarrowlength-0.5pgflinewidth%
pgfpoint-0.2pgfarrowlength-(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.3pgfarrowlength-0.8*(1+0.3*rnd)*pgflinewidth
pgfpathcurvetopgfpoint-0.4pgfarrowlength-0.6*(1+0.3*rnd)*pgflinewidth%
pgfpoint-0.6pgfarrowlength-0.3*(1+0.3*rnd)*pgflinewidth%
pgfpoint-1pgfarrowlength-0.5pgflinewidth
pgfusepathqfill
,
defaults = length = 12pt
begindocument
tikzsetpics/.cd,
A/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.55) -- (0.3,0.4) -- (0.6,-0.55);
draw[line width=5](0.1,1/3-0.45) --
(0.5,1/3-0.45);
path (0.7,0);,
B/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0) to[out=0,in=0,looseness=3] cycle;,
C/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5,-ink[bend]](0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.25);
path (0.7,0);,
D/.style=code=draw[line width=5] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.25] cycle;
path (0.7,0);,
E/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0.5,-0.45) --(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
F/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45) -- (0.5,0.45);
draw[line width=5,-ink[bend]] (0,0) -- (0.5,0);
path (0.7,0);,
G/.style=code=draw[line width=5,-ink[bend]]
(0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
draw[line width=5] (0,0) to[out=-90,in=-110,looseness=2]
(0.5,-0.25);
draw[line width=5,-ink[bend]] (0.54,-0.25) to (0.3,-0.25);
path (0.7,0);,
H/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.5) -- (0,0.5);
draw[line width=5,ink[bend]-ink[bend]] (0.5,-0.5) -- (0.5,0.5);
draw[line width=5] (0,0) -- (0.5,0);
path (0.7,0);,
I/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45);
path (0.25,0);,
J/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.2,0.45) -- (0.2,-0.35) to[out=-90,in=0]
(0.1,-0.45) to[out=180,in=-90] (0,-0.35);
path (0.45,0);,
K/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.4,0.45) -- (0.02,0) -- (0.4,-0.45);
path (0.6,0);,
L/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.5) -- (0,-0.45) -- (0.4,-0.45);
path (0.6,0);,
M/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) --
(0.3,0.25) -- (0.6,0.45) -- (0.6,-0.45);
path (0.8,0);,
N/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,-0.45) -- (0,0.45) -- (0.6,-0.4) --
(0.6,0.45);
path (0.8,0);,
O/.style=code=draw[line width=5] (0.3,0) circle(0.3 and 0.48);
path (0.8,0);,
P/.style=code=draw[line width=5,ink[bend]-] (0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0,0);
path (0.6,0);,
Q/.style=code=draw[line width=5]
(0.3,0) circle(0.3 and 0.48);
draw[line width=5,ink[bend]-ink[bend]](0.35,-0.25) -- (0.6,-0.45);
path (0.8,0);,
R/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,-0.45) -- (0,0.45)
to[out=0,in=0,looseness=2.5] (0.05,0) -- (0.4,-0.45);
path (0.6,0);,
S/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.5,0.4)
to[out=160,in=165,looseness=2] (0.3,0)
to[out=-15,in=-20,looseness=2] (0.1,-0.4);
path (0.65,0);,
T/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0.35,-0.45) -- (0.35,0.45) (0,0.45) -- (0.7,0.45);
path (0.85,0);,
U/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0,0) to[out=-90,in=-90,looseness=2.5]
(0.6,0) -- (0.6,0.5);
path (0.8,0);,
V/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.5) -- (0.3,-0.4) -- (0.6,0.5);
path (0.8,0);,
W/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) -- (0.3,-0.4) -- (0.45,-0.1)
-- (0.6,-0.4) -- (0.9,0.45);
path (1.1,0);,
X/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.6,-0.45);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Y/.style=code=draw[line width=5,ink[bend]-ink[bend]]
(0,0.45) -- (0.3,0);
draw[line width=5,ink[bend]-ink[bend]] (0.6,0.45)
-- (0,-0.45);
path (0.8,0);,
Z/.style=code=draw[line width=5,ink[bend]-ink[bend]] (0,0.45) --(0.6,0.45) -- (0,-0.45)
-- (0.6,-0.45);
path (0.8,0);,
space/.style=code=path (0,0) (0.2,0);,
begintikzpicture[blue!80!black]
pic[local bounding box=box1,scale=2] at (0,0) A;
foreach X [count=Y,evaluate=Y as Z using int(Y+1)] in B,...,Z
edeftempnoexpandpic[right=0mm of boxY,local bounding box=boxZ,scale=2]
X;
temp
endtikzpicture
enddocument
(Yes, obviously these are not at all as beautiful as dedicated fonts. However, one can subject them to nonlinear transformation, such as those of this impressive master piece. I spare this application for another day. Also because arrow tips and nonlinear transformations require some extra work.)
edited Nov 20 at 3:33
answered Nov 19 at 22:59
marmot
77.7k487166
77.7k487166
Wow, perfect thank you! And, in my book, those would count as some pretty perfect inky tips to me.
– user2501235
Nov 19 at 23:31
How to convert your font such that it becomes install-able on my machine?
– Artificial Stupidity
Nov 20 at 6:07
@ArtificialStupidity There is no font that you need to install. You can compile the code on your machine, I think, without adding anything e.g. withpdflatex
. And there is no font, I just drew the characters (very quickly and in a very dirty way) with TikZ. And since this is no font, you can not do anything sophisticated with it, in particular not typeset any formulae, which TeX is originally made for. The only conceivable use of this is that you can subject the "characters" to nontrivial transformations.
– marmot
Nov 20 at 6:15
@marmot: My idea is to create a font with TikZ and use it everywhere. :-)
– Artificial Stupidity
Nov 20 at 6:34
add a comment |
Wow, perfect thank you! And, in my book, those would count as some pretty perfect inky tips to me.
– user2501235
Nov 19 at 23:31
How to convert your font such that it becomes install-able on my machine?
– Artificial Stupidity
Nov 20 at 6:07
@ArtificialStupidity There is no font that you need to install. You can compile the code on your machine, I think, without adding anything e.g. withpdflatex
. And there is no font, I just drew the characters (very quickly and in a very dirty way) with TikZ. And since this is no font, you can not do anything sophisticated with it, in particular not typeset any formulae, which TeX is originally made for. The only conceivable use of this is that you can subject the "characters" to nontrivial transformations.
– marmot
Nov 20 at 6:15
@marmot: My idea is to create a font with TikZ and use it everywhere. :-)
– Artificial Stupidity
Nov 20 at 6:34
Wow, perfect thank you! And, in my book, those would count as some pretty perfect inky tips to me.
– user2501235
Nov 19 at 23:31
Wow, perfect thank you! And, in my book, those would count as some pretty perfect inky tips to me.
– user2501235
Nov 19 at 23:31
How to convert your font such that it becomes install-able on my machine?
– Artificial Stupidity
Nov 20 at 6:07
How to convert your font such that it becomes install-able on my machine?
– Artificial Stupidity
Nov 20 at 6:07
@ArtificialStupidity There is no font that you need to install. You can compile the code on your machine, I think, without adding anything e.g. with
pdflatex
. And there is no font, I just drew the characters (very quickly and in a very dirty way) with TikZ. And since this is no font, you can not do anything sophisticated with it, in particular not typeset any formulae, which TeX is originally made for. The only conceivable use of this is that you can subject the "characters" to nontrivial transformations.– marmot
Nov 20 at 6:15
@ArtificialStupidity There is no font that you need to install. You can compile the code on your machine, I think, without adding anything e.g. with
pdflatex
. And there is no font, I just drew the characters (very quickly and in a very dirty way) with TikZ. And since this is no font, you can not do anything sophisticated with it, in particular not typeset any formulae, which TeX is originally made for. The only conceivable use of this is that you can subject the "characters" to nontrivial transformations.– marmot
Nov 20 at 6:15
@marmot: My idea is to create a font with TikZ and use it everywhere. :-)
– Artificial Stupidity
Nov 20 at 6:34
@marmot: My idea is to create a font with TikZ and use it everywhere. :-)
– Artificial Stupidity
Nov 20 at 6:34
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460836%2fcustom-line-cap-to-simulate-inked-line-in-tikz%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Related: tex.stackexchange.com/questions/14283
– Andrew
Nov 19 at 22:47