| 1 |
input latexmp |
| 2 |
setupLaTeXMP(preamblefile="textpathfigs"); |
| 3 |
input textpath |
| 4 |
|
| 5 |
prologues := 0; |
| 6 |
|
| 7 |
beginfig(1); |
| 8 |
draw textpath("Greetings from MetaPost!", fullcircle scaled 50bp, 0) |
| 9 |
withcolor (0.2,0.2,0.6); |
| 10 |
endfig; |
| 11 |
|
| 12 |
|
| 13 |
beginfig(2); |
| 14 |
path p; |
| 15 |
p := reverse fullcircle rotated -90 scaled 50bp; |
| 16 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 17 |
endfig; |
| 18 |
|
| 19 |
|
| 20 |
beginfig(3); |
| 21 |
path p; |
| 22 |
p := reverse fullcircle rotated -90; |
| 23 |
draw textpathFont("\usefont{T1}{pzc}{m}{n}\huge", "Happy Birthday to", |
| 24 |
p scaled 400bp, 0.5) withcolor (1, 0.6, 0.2); |
| 25 |
draw textpathFont("\usefont{T1}{bch}{m}{n}\large", "Daisy Duck!", |
| 26 |
p scaled 350bp, 0.5) withcolor (0.9, 0.3, 0.1); |
| 27 |
endfig; |
| 28 |
|
| 29 |
|
| 30 |
beginfig(4); |
| 31 |
path p; |
| 32 |
p := reverse fullcircle rotated -90 scaled 50bp; |
| 33 |
draw p withcolor .8white; |
| 34 |
draw textpathRaw("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 35 |
endfig; |
| 36 |
|
| 37 |
|
| 38 |
beginfig(5); |
| 39 |
path p; |
| 40 |
p := reverse halfcircle scaled 80bp; |
| 41 |
draw p withcolor .8white; |
| 42 |
draw textpathRaw("\LARGE$x^2+y^2=r^2$", p, 0.5) withcolor (0.2,0.2,0.6); |
| 43 |
endfig; |
| 44 |
|
| 45 |
|
| 46 |
beginfig(6); |
| 47 |
path p; |
| 48 |
p := reverse halfcircle xscaled 150bp yscaled 80; |
| 49 |
draw p withcolor .8white; |
| 50 |
interim textpathShift := 7pt; |
| 51 |
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); |
| 52 |
endfig; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
beginfig(7); |
| 57 |
path p; |
| 58 |
string f; |
| 59 |
f := "\usefont{T1}{pzc}{m}{n}\Large"; |
| 60 |
p := subpath (5.7,6.3) of fullcircle scaled 1400bp; |
| 61 |
draw p withcolor .8white; |
| 62 |
interim textpathRepeat := 3; |
| 63 |
interim textpathStretch := 0; |
| 64 |
interim textpathHSpace := 10pt; |
| 65 |
draw textpathFont(f, "Happy Birthday!", p, 0.5) withcolor (1, 0.6, 0.2); |
| 66 |
endfig; |
| 67 |
|
| 68 |
|
| 69 |
beginfig(8); |
| 70 |
path p[]; |
| 71 |
string f; |
| 72 |
f := "\usefont{T1}{pzc}{m}{n}\Large"; |
| 73 |
p1 := subpath (5.7,6.3) of fullcircle scaled 1400bp; |
| 74 |
p2 := p1 shifted (0bp,-30bp); |
| 75 |
draw p1 withcolor .8white; |
| 76 |
draw p2 withcolor .8white; |
| 77 |
interim textpathRepeat := 3; |
| 78 |
interim textpathStretch := 1; |
| 79 |
draw textpathFont(f, "Happy Birthday!", p1, 0.5) withcolor (1, 0.6, 0.2); |
| 80 |
draw textpathFont(f, "Happy Birthday!", p2, 0) withcolor (1, 0.6, 0.2); |
| 81 |
endfig; |
| 82 |
|
| 83 |
|
| 84 |
beginfig(9); |
| 85 |
string f; |
| 86 |
path p; |
| 87 |
numeric r,h,w; |
| 88 |
picture pic; |
| 89 |
% Font Brush Script Italic is available on CTAN. |
| 90 |
f := "\usefont{T1}{pbsi}{xl}{n}\fontsize{2.1pt}{2.1pt}\selectfont"; |
| 91 |
w := 210bp; |
| 92 |
h := .276w; |
| 93 |
r := .19h; |
| 94 |
p := (-.5w,0)--(-.5w,.5h-r)--quartercircle rotated -90 scaled (2r) |
| 95 |
shifted (-.5w,.5h)--(0,.5h); |
| 96 |
p := p--reverse p reflectedabout ((0,-1),(0,1)); |
| 97 |
p := p--reverse p reflectedabout ((-1,0),(1,0))--cycle; |
| 98 |
draw p withpen pensquare scaled 3.5pt; |
| 99 |
interim textpathRepeat := 30; |
| 100 |
interim textpathShift := -.6pt; |
| 101 |
draw textpathFont(f, "Fa\ss' Dich kurz!", p, 0.5) withcolor white; |
| 102 |
label(textext |
| 103 |
("\usefont{T1}{bfu}{mb}{n}\fontsize{22pt}{22pt}\selectfont Telephonzelle"), |
| 104 |
origin);% Bitstream Futura |
| 105 |
endfig; |
| 106 |
|
| 107 |
|
| 108 |
beginfig(10); |
| 109 |
string f; |
| 110 |
path p; |
| 111 |
picture pic; |
| 112 |
numeric lenp, lenpic, tb, k; |
| 113 |
color daisy; |
| 114 |
daisy := (0.9, 0.3, 0.1); |
| 115 |
f := "\usefont{T1}{bch}{m}{n}\fontsize{48pt}{48pt}\selectfont"; |
| 116 |
p := subpath (2.7,5.3) of reverse fullcircle rotated -90 scaled 120bp; |
| 117 |
draw p withcolor .8white; |
| 118 |
interim textpathAbsRotation := 1; |
| 119 |
draw textpathFont(f, "Daisy", p, 0.5) withcolor daisy + 0.85(white-daisy); |
| 120 |
textpathAbsRotation := 0; |
| 121 |
interim textpathDebug := 2; |
| 122 |
pickup pencircle scaled .2bp; |
| 123 |
draw textpathFont(f, "Daisy", p, 0.5) withcolor .6white; |
| 124 |
textpathDebug := 1; |
| 125 |
draw textpathFont(f, "Daisy", p, 0.5) withcolor daisy; |
| 126 |
textpathDebug := 4; |
| 127 |
draw textpathFont(f, "Daisy", p, 0.5) withcolor .6white; |
| 128 |
endfig; |
| 129 |
|
| 130 |
|
| 131 |
beginfig(11); |
| 132 |
string f, t; |
| 133 |
path heart; |
| 134 |
f := "\usefont{T1}{pzc}{m}{it}\tiny"; |
| 135 |
t := "Love"; |
| 136 |
heart := halfcircle shifted (-0.5bp,0bp)..{dir-50}(0bp,-1.5bp); |
| 137 |
heart := heart--reverse heart reflectedabout ((0,0),(0,1))--cycle; |
| 138 |
heart := heart scaled 60bp; |
| 139 |
interim textpathRotation := 90; |
| 140 |
interim textpathLetterSpace := 1pt; |
| 141 |
interim textpathRepeat := 30; |
| 142 |
draw textpathFont(f, t, heart, 0.5) withcolor red+0.1green; |
| 143 |
endfig; |
| 144 |
|
| 145 |
|
| 146 |
beginfig(12); |
| 147 |
path p; |
| 148 |
string f, t; |
| 149 |
picture pic; |
| 150 |
f := "\usefont{T1}{fwb}{m}{n}\Large";% From the emerald package |
| 151 |
t := "Don't panic! Don't panic! Don't panic!"; |
| 152 |
p := origin |
| 153 |
for i:=1 upto 20: ..(i, sind(i*45)) endfor; |
| 154 |
p := p xscaled 20 yscaled 35; |
| 155 |
interim textpathRotation := 0; |
| 156 |
interim textpathAbsRotation := 1; |
| 157 |
interim textpathLetterSpace := 6pt; |
| 158 |
pic := textpathFont(f, t, p, 0); |
| 159 |
background := black; |
| 160 |
interim bboxmargin := 30bp; |
| 161 |
unfill bbox pic; |
| 162 |
draw pic withcolor red+green; |
| 163 |
endfig; |
| 164 |
|
| 165 |
|
| 166 |
beginfig(13); |
| 167 |
path p; |
| 168 |
p := (origin--(1bp,0bp)) scaled 75bp; |
| 169 |
draw p withcolor .8white; |
| 170 |
interim textpathClip := 1; |
| 171 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 172 |
p := p shifted (0,-20bp); |
| 173 |
draw p withcolor .8white; |
| 174 |
textpathClip := 0; |
| 175 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 176 |
p := p shifted (0,-20bp); |
| 177 |
draw p withcolor .8white; |
| 178 |
interim textpathAutoScale := 1; |
| 179 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 180 |
endfig; |
| 181 |
|
| 182 |
|
| 183 |
beginfig(14); |
| 184 |
path p; |
| 185 |
interim textpathDraft := 1; |
| 186 |
p := (origin--(1bp,0bp)) scaled 75bp; |
| 187 |
draw p withcolor .8white; |
| 188 |
interim textpathClip := 1; |
| 189 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 190 |
p := p shifted (0,-20bp); |
| 191 |
draw p withcolor .8white; |
| 192 |
textpathClip := 0; |
| 193 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 194 |
p := p shifted (0,-20bp); |
| 195 |
draw p withcolor .8white; |
| 196 |
interim textpathAutoScale := 1; |
| 197 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 198 |
endfig; |
| 199 |
|
| 200 |
|
| 201 |
beginfig(15); |
| 202 |
path p; |
| 203 |
p := reverse halfcircle xscaled 150bp yscaled 80; |
| 204 |
draw p withcolor .8white; |
| 205 |
interim textpathShift := 9pt; |
| 206 |
interim textpathFancyStrokes := 0; |
| 207 |
draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2}}$", p, 0.5) withcolor (0.2,0.2,0.6); |
| 208 |
endfig; |
| 209 |
|
| 210 |
|
| 211 |
beginfig(16); |
| 212 |
path p; |
| 213 |
p := reverse halfcircle xscaled 150bp yscaled 80; |
| 214 |
draw p withcolor .8white; |
| 215 |
interim textpathShift := 9pt; |
| 216 |
interim textpathFancyStrokes := 1; |
| 217 |
interim textpathCureSqrt := 0; |
| 218 |
draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2}}$", p, 0.5) withcolor (0.2,0.2,0.6); |
| 219 |
endfig; |
| 220 |
|
| 221 |
|
| 222 |
beginfig(17); |
| 223 |
path p; |
| 224 |
p := reverse halfcircle xscaled 150bp yscaled 80; |
| 225 |
draw p withcolor .8white; |
| 226 |
interim textpathShift := 9pt; |
| 227 |
interim textpathFancyStrokes := 1; |
| 228 |
interim textpathCureSqrt := 1; |
| 229 |
draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2}}$", p, 0.5) withcolor (0.2,0.2,0.6); |
| 230 |
endfig; |
| 231 |
|
| 232 |
|
| 233 |
beginfig(18); |
| 234 |
string f; |
| 235 |
path p; |
| 236 |
f := "\usefont{T1}{pzc}{m}{it}\fontsize{56pt}{56pt}\selectfont"; |
| 237 |
p := reverse fullcircle rotated 33 scaled 150bp; |
| 238 |
interim textpathLetterSpace := -3pt; |
| 239 |
draw textpathFont(f, "Pro \&", p, 1) withcolor (1, 0.6, 0.2); |
| 240 |
interim textpathLetterSpace := 0pt; |
| 241 |
f := "\usefont{T1}{pzc}{m}{it}\fontsize{48pt}{48pt}\selectfont"; |
| 242 |
p := fullcircle rotated 33 scaled 145bp; |
| 243 |
draw textpathFont(f, "Con\<{\kern-2pt}tra", p, 0.0) withcolor (1, 0.6, 0.2); |
| 244 |
endfig; |
| 245 |
|
| 246 |
|
| 247 |
beginfig(19); |
| 248 |
path p; |
| 249 |
p := reverse fullcircle rotated -90 scaled 50bp; |
| 250 |
interim textpathDebug := 1 + 2; |
| 251 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 252 |
endfig; |
| 253 |
|
| 254 |
|
| 255 |
beginfig(20); |
| 256 |
path p; |
| 257 |
p := reverse fullcircle rotated -90 scaled 50bp; |
| 258 |
interim textpathDebug := 2 + 4; |
| 259 |
draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6); |
| 260 |
endfig; |
| 261 |
|
| 262 |
|
| 263 |
end |