summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/textpath/textpathfigs.mp
blob: 0e09b6c3b23289e77f5c7f59e9ae46cde8fe1bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
input latexmp
setupLaTeXMP(preamblefile="textpathfigs");
input textpath

prologues := 1;

beginfig(1);
  draw textpath("Greetings from MetaPost!", fullcircle scaled 50bp, 0)
    withcolor (0.2,0.2,0.6);
endfig;

beginfig(2);
path p;
  p := reverse fullcircle rotated -90 scaled 50bp;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(3);
path p;
  p := reverse fullcircle rotated -90;
  draw textpathFont("\usefont{T1}{pzc}{m}{n}\huge", "Happy Birthday to",
    p scaled 400bp, 0.5) withcolor (1, 0.6, 0.2);
  draw textpathFont("\usefont{T1}{bch}{m}{n}\large", "Daisy Duck!",
    p scaled 350bp, 0.5) withcolor (0.9, 0.3, 0.1);
endfig;


beginfig(4);
path p;
  p := (origin--(1bp,0bp)) scaled 75bp;
  draw p withcolor .8white;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
  p := p shifted (0,-20bp);
  draw p withcolor .8white;
  textpathClip := 0;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;

textpathClip := 1;


beginfig(5);
path p;
string f;
  f := "\usefont{T1}{pzc}{m}{n}\Large";
  p := subpath (5.7,6.3) of fullcircle scaled 1400bp;
  draw p withcolor .8white;
  textpathRepeat := 3;
  textpathStretch := 0;
  textpathHSpace := 10pt;
  draw textpathFont(f, "Happy Birthday", p, 0.5) withcolor (1, 0.6, 0.2);
endfig;

textpathRepeat := 1;
textpathStretch := 1;


beginfig(6);
string f;
path p;
picture pic;
numeric lenp, lenpic, tb, k;
color daisy;
  daisy := (0.9, 0.3, 0.1);
  f := "\usefont{T1}{bch}{m}{n}\fontsize{40pt}{40pt}\selectfont";
  p := subpath (2.7,5.3) of reverse fullcircle rotated -90 scaled 100bp;
  draw p withcolor .8white;
  textpathAbsRotation := 1;
  draw textpathFont(f, "Daisy", p, 0.5) withcolor (white-daisy) + 0.8daisy;
  textpathAbsRotation := 0;
  draw textpathFont(f, "Daisy", p, 0.5) withcolor daisy;
  pic := strToPic(f & "\spaced{Daisy}");
  draw textpathPic(pic, p, 0.5, "debug");
endfig;


beginfig(7);
string f, t;
path heart;
  f := "\usefont{T1}{pzc}{m}{it}\tiny";
  t := "Love";
  heart := halfcircle shifted (-0.5bp,0bp)..{dir-50}(0bp,-1.5bp);
  heart := heart--reverse heart reflectedabout ((0,0),(0,1))--cycle;
  heart := heart scaled 60bp;
  textpathRotation := 90;
  textpathLetterSpace := 1pt;
  textpathRepeat := 30;
  draw textpathFont(f, t, heart, 0.5) withcolor red+0.1green;
endfig;

textpathRepeat := 1;


beginfig(8);
path p;
string f, t;
picture pic;
  f := "\usefont{T1}{fwb}{m}{n}\Large";% From the emerald package
  t := "Don't panic! Don't panic! Don't panic!";
  p := origin
  for i:=1 upto 20: ..(i, sind(i*45)) endfor;
  p := p xscaled 20 yscaled 35;
  textpathRotation := 0;
  textpathAbsRotation := 1;
  textpathLetterSpace := 6pt;
  pic := textpathFont(f, t, p, 0);
  background := black;
  bboxmargin := 30bp;
  unfill bbox pic;
  draw pic withcolor red+green;
endfig;

textpathAbsRotation := 0;
textpathLetterSpace := 0pt;


beginfig(9);
string f;
path p;
  f := "\usefont{T1}{pzc}{m}{it}\fontsize{56pt}{56pt}\selectfont";
  p := reverse fullcircle rotated 33 scaled 150bp;
  textpathLetterSpace := -3pt;
  draw textpathFont(f, "Pro \&", p, 1) withcolor (1, 0.6, 0.2);
  textpathLetterSpace := 0pt;
  f := "\usefont{T1}{pzc}{m}{it}\fontsize{48pt}{48pt}\selectfont";
  p := fullcircle rotated 33 scaled 145bp;
  draw textpathFont(f, "Con\<{\kern-2pt}tra", p, 0.0) withcolor (1, 0.6, 0.2);
endfig;


beginfig(10);
string f;
path p;
numeric r,h,w;
picture pic;
% Font Brush Script Italic is available on CTAN.
  f := "\usefont{T1}{pbsi}{xl}{n}\fontsize{2.1pt}{2.1pt}\selectfont";
  w := 210bp;
  h := .276w;
  r := .19h;
  p := (-.5w,0)--(-.5w,.5h-r)--quartercircle rotated -90 scaled (2r)
    shifted (-.5w,.5h)--(0,.5h);
  p := p--reverse p reflectedabout ((0,-1),(0,1));
  p := p--reverse p reflectedabout ((-1,0),(1,0))--cycle;
  draw p withpen pensquare scaled 3.5pt;
  textpathRepeat := 30;
  textpathShift := -.6pt;
  draw textpathFont(f, "Fa\ss' Dich kurz!", p, 0.5) withcolor white;
  label(textext
    ("\usefont{T1}{bfu}{mb}{n}\fontsize{22pt}{22pt}\selectfont Telephonzelle"),
    origin);% Bitstream Futura
endfig;

textpathRepeat := 1;
textpathShift := 0pt;


beginfig(11);
path p;
  p := reverse fullcircle rotated -90 scaled 50bp;
  draw p withcolor .8white;
  draw textpathRaw("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(12);
path p;
  p := reverse halfcircle scaled 80bp;
  draw p withcolor .8white;
  draw textpathRaw("\LARGE$x^2+y^2=r^2$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(13);
path p;
  p := reverse halfcircle xscaled 160bp yscaled 80;
  draw p withcolor .8white;
  textpathShift := 7pt;
  draw textpathRaw("\Large$\frac{(x-u)^2}{a^2}+\frac{(y-v)^2}{b^2}=1$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(14);
path p;
  p := reverse halfcircle xscaled 160bp yscaled 80;
  draw p withcolor .8white;
  textpathShift := 9pt;
  textpathFancyStrokes := 0;
  draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2})}$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(15);
path p;
  p := reverse halfcircle xscaled 160bp yscaled 80;
  draw p withcolor .8white;
  textpathShift := 9pt;
  textpathFancyStrokes := 1;
  textpathCureSqrt := 0;
  draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2})}$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;

beginfig(16);
path p;
  p := reverse halfcircle xscaled 160bp yscaled 80;
  draw p withcolor .8white;
  textpathShift := 9pt;
  textpathFancyStrokes := 1;
  textpathCureSqrt := 1;
  draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2})}$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;

textpathShift := 0pt;

end