From 7f5c1ee88aaf6fc8e08b237499ab9f001c85ad90 Mon Sep 17 00:00:00 2001 From: Gary Wong Date: Sun, 7 Jan 2024 20:55:47 -0700 Subject: [PATCH] Add remainder of ASCII punctuation. --- Makefile | 18 +-- cap.tex | 2 - gilgal.mf | 431 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- mess.tex | 27 ++++ preamble.tex | 17 ++- 5 files changed, 446 insertions(+), 49 deletions(-) create mode 100644 mess.tex diff --git a/Makefile b/Makefile index 7aa2d57..ec956ec 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ -SAMPLES=stone stone2 stone3 stone4 cap +SAMPLES=stone stone2 stone3 stone4 cap mess all: gilgal.dvi $(foreach s,$(SAMPLES),$(s).png $(s).pdf) +ps: $(foreach s,$(SAMPLES),$(s).ps) + %.dvi: %.tex gilgal.mf latex $< @@ -12,17 +14,17 @@ gilgal.dvi gilgal.tfm: gilgal.mf gilgal.otf: gilgal.mf gilgal.tfm gilgal.pe gilgal.dvi fontforge -script gilgal.pe -%.ps: %.dvi - dvips -o $@ -D 1200 -mode ultre $< - -%.png: %.ps - gs -r1200 -dDownScaleFactor=8 -sDEVICE=pnggray -sOutputFile=$@ -dBATCH -dNOPAUSE -c '<> setpagedevice' -f $< +%.png: %.dvi + dvipng -Q 14 -D 120 -T 11in,8.5in -O 1in,1in --freetype0 --gamma 0.45 -o $@ $< %.pdf: %.tex gilgal.otf lualatex $< +%.ps: %.dvi + dvips -o $@ -D 1200 -mode ultre $< + clean: - -rm -f gilgal.[0-9]*gf gilgal.[0-9]*pk gilgal.tfm *.aux *.log *.ps + -rm -f gilgal.[0-9]*gf gilgal.[0-9]*pk gilgal.tfm *.aux *.log realclean: clean - -rm -f *.dvi *.png *.pdf + -rm -f *.dvi *.png *.pdf *.ps diff --git a/cap.tex b/cap.tex index 7196b61..ce2e6a2 100644 --- a/cap.tex +++ b/cap.tex @@ -2,8 +2,6 @@ % % CC0 1.0. % http://creativecommons.org/publicdomain/zero/1.0 -% -% A replica of a stone inscribed by Thomas Child at Gilgal Sculpture Garden. \input{preamble} diff --git a/gilgal.mf b/gilgal.mf index 0a43b78..2623183 100644 --- a/gilgal.mf +++ b/gilgal.mf @@ -572,21 +572,23 @@ endscchar; beginscchar("Z",10,false); % --- Z --- -x1=x3=lstem; -x2=x4=rstem; +rt x1=x3=lstem; +x2=lft x4=rstem; top y1=top y2=h; bot y3=bot y4=0; draw z1{right}..{right}z2{down}..{down}z3{right}..{right}z4; cutoff(z1,180); cutoff(z4,0); +pickup pensquare scaled 0.5px; drawdot (top rt z2); drawdot (bot lft z3); + endscchar; endfor beginchar(".",4u#,3u#,0); % --- . --- -"Puncuation `.'"; +"Punctuation `.'"; pickup pencircle scaled punct; @@ -600,7 +602,7 @@ endchar; beginchar(",",4u#,3u#,3u#); % --- , --- -"Puncuation `,'"; +"Punctuation `,'"; pickup pencircle scaled punct; @@ -620,7 +622,7 @@ endchar; beginchar(";",4u#,10u#,3u#); % --- ; --- -"Puncuation `;'"; +"Punctuation `;'"; pickup pencircle scaled punct; @@ -643,7 +645,7 @@ endchar; beginchar("'",4u#,fcht#,0); % --- ' --- -"Puncuation '"; +"Punctuation '"; pickup pencircle scaled punct; @@ -661,9 +663,31 @@ labels(1,2,3); endchar; +beginchar(ditto,7.6u#,fcht#,0); % --- " --- + +"Punctuation close double quote"; + +pickup pencircle scaled punct; + +x1=0.5w; +x2=x1+pen_rt; +x3=x1+pen_lft; +y1=y2=scht; +y3=y2+pen_bot-pen_top; + +drawdot z1+(left scaled 1.3u); +drawdot z1+(right scaled 1.3u); + +save p; path p; +p=z3{curl1}..{up}z1..z2{down}..cycle; +fill p shifted(left scaled 1.3u); +fill p shifted(right scaled 1.3u); + +endchar; + beginchar("!",4u#,scht#,0); % --- ! --- -"Puncuation `!'"; +"Punctuation `!'"; pickup pencircle scaled punct; @@ -684,7 +708,7 @@ endchar; beginchar(":",4u#,scht#,0); % --- : --- -"Puncuation `:'"; +"Punctuation `:'"; pickup pencircle scaled punct; @@ -701,7 +725,7 @@ endchar; beginchar("-",8u#,scht#,0); % --- - --- -"Puncuation `-'"; +"Punctuation `-'"; pickup squarepen; @@ -717,7 +741,7 @@ endchar; beginchar("?",8u#,scht#,0); % --- ? --- -"Puncuation `?'"; +"Punctuation `?'"; pickup basepen; @@ -725,7 +749,7 @@ x1=u+s; x2=x4=x5=0.5w; x3=w-x1; y1=y3=0.73h; -top y2=h; +top y2=h+o; y4=0.23h; cutdraw z1{up}..tension arch_tension..z2{right}..tension arch_tension..z3{down}..z4{down}; @@ -734,13 +758,13 @@ bot y5=0; drawdot z5; -labels(1,23,4,5); +labels(1,2,3,4,5); endchar; beginchar("`",4u#,fcht#,0); % --- ` --- -"Puncuation `"; +"Punctuation `"; pickup pencircle scaled punct; @@ -758,6 +782,28 @@ labels(1,2,3); endchar; +beginchar(char 16,7.6u#,fcht#,0); % --- open double quote --- + +"Punctuation open double quote"; + +pickup pencircle scaled punct; + +x1=0.5w; +x2=x1+pen_lft; +x3=x1+pen_rt; +y1=y2=scht; +y3=y2+pen_bot-pen_top; + +drawdot z1+(left scaled 1.3u); +drawdot z1+(right scaled 1.3u); + +save p; path p; +p= z3{curl1}..{up}z1..z2{down}..cycle; +fill p shifted(left scaled 1.3u); +fill p shifted(right scaled 1.3u); + +endchar; + % In some cases, it seems like it's useful to have a glpyh for the empty space beginchar(" ",4u#+2s#,ht#,0); % --- [space] --- @@ -782,7 +828,7 @@ draw z1..tension arch_tension..{down}z2--z3{down}..tension arch_tension..z4..ten if distinct_num: z7=(mid,0.5h); - drawdot z7; + pickup pencircle scaled punct; drawdot z7; fi endnumchar; @@ -916,7 +962,7 @@ draw z2-(0,0.5px)..tension 3 and 0.75..{down}z3; endnumchar; -beginnumchar("5"); % --- 8 --- +beginnumchar("8"); % --- 8 --- x1=x4=mid; x2=x3=rstem; @@ -934,7 +980,7 @@ fi endnumchar; -beginnumchar("6"); % --- 9 --- +beginnumchar("9"); % --- 9 --- x1=x4=x7=mid; x2=x3=lstem; @@ -957,7 +1003,7 @@ endnumchar; beginchar("/",9u#,fcht#,0); % --- / --- -"Puncuation `/'"; +"Punctuation `/'"; z1=(u,0); z2=(w-u,h); @@ -971,7 +1017,7 @@ endchar; beginchar("(",8u#,fcht#,0); % --- ( --- -"Puncuation `('"; +"Punctuation `('"; z1=(w-s-0.5u,h); z2=(s+u,0.5[y1,y3]); @@ -986,7 +1032,7 @@ endchar; beginchar(")",8u#,fcht#,0); % --- ) --- -"Puncuation `)'"; +"Punctuation `)'"; z1=(s+0.5u,h); z2=(w-s-u,0.5[y1,y3]); @@ -1001,7 +1047,7 @@ endchar; beginchar("\",9u#,fcht#,0); % --- \ --- -"Puncuation `\'"; +"Punctuation backslash"; z1=(w-u,0); z2=(u,h); @@ -1015,7 +1061,7 @@ endchar; beginchar("_",10u#,0,3u#); % --- _ --- -"Puncuation `_'"; +"Punctuation underscore"; pickup pensquare scaled px; @@ -1024,14 +1070,18 @@ rt x2=w; y1=y2=-2u; draw z1--z2; - labels(1,2); +if known dvips_hack: + pickup pensquare; drawdot (0,0); % dvips omits the underscore if there + % is nothing drawn above the baseline!? +fi + endchar; beginchar("[",8u#,fcht#+2u#,2u#); % --- [ --- -"Puncuation `['"; +"Punctuation `['"; pickup pensquare scaled px; @@ -1048,7 +1098,7 @@ endchar; beginchar("]",8u#,fcht#+2u#,2u#); % --- ] --- -"Puncuation `]'"; +"Punctuation `]'"; pickup pensquare scaled px; @@ -1065,37 +1115,336 @@ endchar; beginchar("$",10u#,scht#+2u#,2u#); % --- $ --- -"Puncuation `$'"; +"Punctuation `$'"; pickup basepen; -x1=0.92[x3,x4]; +x1=x4=w-x3; x2=x5=0.5[x1,x3]; -x3=lstem; -x4=w-x3; -x6=lstem-0.5u; +x3=x6=lstem; y1=0.9[y5,y2]; -y3=(0.8+0.5asymm)[y5,y2]; +y3=0.82[y5,y2]; top y2=scht+o; -y4=(0.2+1.5asymm)[y5,y2]; +y4=0.22[y5,y2]; y6=0.15[y5,y2]; bot y5=-o; -draw z1..z2{left}..z3{down}..tension 1.2..z4{down}..tension 0.85 and 1..z5{left}..z6; -pickup squarepen; cutoff(z1,-45); cutoff(z6,135); +cutdraw z1..z2{left}..z3{down}..tension 1.2..z4{down}..tension 0.85 and 1..z5{left}..z6; +pickup squarepen; x7=x8=0.5w; y7=scht+u; y8=-u; draw z7--z8; +labels(1,2,3,4,5,6,7,8); + +endchar; + +pair cent; cent=(0.5w,0.5scht); % centre for mathematical symbols + +beginchar("+",10u#,fcht#,0); % --- + --- + +"Punctuation `+'"; + +pickup squarepen; + +save arm; arm=0.3w; +z1=cent-(arm,0); +z2=cent+(arm,0); +z3=cent-(0,arm); +z4=cent+(0,arm); + +draw z1--z2; draw z3--z4; + +labels(1,2,3,4); + +endchar; + +beginchar("=",10u#,fcht#,0); % --- = --- + +"Punctuation `='"; + +pickup squarepen; + +save arm; arm=0.3w; +save out; out=0.12w; +z1=cent+(-arm,out); +z2=cent+(arm,out); +z3=cent+(-arm,-out); +z4=cent+(arm,-out); + +draw z1--z2; draw z3--z4; + +labels(1,2,3,4); + +endchar; + +beginchar("<",10u#,fcht#,0); % --- < --- + +"Punctuation less than"; + +save arm; arm=0.3w; +z1=cent+(arm,arm); +z2=cent+(-arm,0); +z3=cent+(arm,-arm); + +pickup penrazor scaled (px*sqrt0.8) rotated 90; +draw z1--z2; +draw z2--z3; + +labels(1,2,3); + +endchar; + +beginchar(">",10u#,fcht#,0); % --- > --- + +"Punctuation greater than"; + +save arm; arm=0.3w; +z1=cent+(-arm,arm); +z2=cent+(arm,0); +z3=cent+(-arm,-arm); + +pickup penrazor scaled (px*sqrt0.8) rotated 90; +draw z1--z2; +draw z2--z3; + +labels(1,2,3); + +endchar; + +beginchar("%",10u#,scht#,0); % --- % --- + +"Punctuation `%'"; + +z1=(u,0); +z2=(w-u,h); +z3=(0.25w,0.85h); +z4=(0.75w,0.15h); + +pickup pencircle scaled px; +cutdraw z1..z2; + +draw fullcircle scaled 3u shifted z3; +draw fullcircle scaled 3u shifted z4; + +labels(1,2,3,4); + +endchar; + +beginchar("|",8u#,fcht#,0); % --- | --- + +"Punctuation vertical bar"; + +z1=(0.5w,0); +z2=(x1,h); + +pickup pencircle scaled px; +cutdraw z1..z2; + +labels(1,2); + +endchar; + +beginchar("~",10u#,fcht#,0); % --- ~ --- + +"Punctuation `~'"; + +rt z1=(lstem,0.5h); +lft z2=(w-x1,y1); + +pickup pencircle scaled px; +cutdraw z1{dir 50}..tension 0.75..z2{dir 50}; + +labels(1,2); + +endchar; + +beginchar("{",8u#,fcht#,0); % --- { --- + +"Punctuation left brace"; + +pickup pencircle scaled px; + +z1=(w-s-u,h); +z2=z3+(1.5u,1.5u); +z3=(s+1.5u,0.5[y1,y5]); +z4=z3+(1.5u,-1.5u); +z5=(x1,0); + +cutdraw z1{left}..tension 1.5 and min_tension..{down}z2--z3--z4{down}..tension min_tension and 1.5..z5{right}; + +pickup pensquare scaled px rotated 45; drawdot z3; + +labels(1,2,3,4,5); + +endchar; + +beginchar("}",8u#,fcht#,0); % --- } --- + +"Punctuation right brace"; + +pickup pencircle scaled px; + +z1=(s+u,h); +z2=z3+(-1.5u,1.5u); +z3=(w-s-1.5u,0.5[y1,y5]); +z4=z3+(-1.5u,-1.5u); +z5=(x1,0); + +cutdraw z1{right}..tension 1.5 and min_tension..{down}z2--z3--z4{down}..tension min_tension and 1.5..z5{left}; + +pickup pensquare scaled px rotated 45; drawdot z3; + +labels(1,2,3,4,5); + endchar; +beginchar("#",10u#,scht#,0); % --- # --- + +"Punctuation `#'"; + +pickup squarepen; + +z1=(s+u,0.7h); +z2=(w-s-u,y1); +z3=(x1,0.3h); +z4=(x2,y3); +top z5=(0.25[x1,x2],h); +bot z6=(x5,0); +z7=(0.75[x1,x2],y5); +z8=(x7,y6); + +draw z1--z2; draw z3--z4; draw z5--z6; draw z7--z8; + +labels(1,2,3,4,5,6,7,8); + +endchar; + +beginchar("^",9u#,scht#,0); % --- ^ --- + +"Punctuation `^'"; + +pickup pensquare scaled px rotated 45; + +z1=z2+(-2u,-2u); +top z2=(0.5w,h); +z3=z2+(2u,-2u); + +draw z1--z2--z3; + +labels(1,2,3); + +endchar; + +beginchar("*",10u#,scht#,0); % --- * --- + +"Punctuation `*'"; + +z1=(0.5w,0.5h)+(up scaled 4u); +z2=(0.5w,0.5h)+(up scaled 4u rotated 60); +z3=(0.5w,0.5h)+(up scaled 4u rotated 120); +z4=(0.5w,0.5h)+(up scaled 4u rotated 180); +z5=(0.5w,0.5h)+(up scaled 4u rotated 240); +z6=(0.5w,0.5h)+(up scaled 4u rotated 300); + +pickup basepen; +cutdraw z1--z4; cutdraw z2--z5; cutdraw z3--z6; + +labels(1,2,3,4,5,6); + +endchar; + +beginchar("&",10u#,scht#,0); % --- & --- + +"Punctuation `&'"; + +pickup basepen; +x1=x4=0.5w; +x2=0.6[x1,x3]; +x3=x7=w-x5; +x5=s+u; +x6=0.3[x5,x1]; +top y1=h+o; +y2=0.5[y1,y6]; +y3=y5=arch_depth*h; +bot y4=-o; +y6=(1-arch_depth)*h; +y7=0; + +cutdraw z3{down}..z4{left}..z5{up}..z2..z1{left}..{curl 1}z6--z7; + +labels(1,2,3,4,5,6,7); + +endchar; + +beginchar("@",12u#,scht#,0); % --- @ --- + +pickup basepen; + +x1=x4=x9=0.6w; +x2=x3=0.8w; +x5=x6=0.4w; +x7=0.6[x8,x2]; +x8=s+u; +x10=w-x8; +top y1=0.75h; +y2=y6=0.55h; +y3=y5=0.45h; +bot y4=0.25h; +top y7=h+o; +y8=0.5h; +bot y9=bot y10=0; + +draw z1..tension arch_tension..{down}z2--z3{down}..tension arch_tension..z4..tension arch_tension..{up}z5--z6{up}..tension arch_tension..cycle; +cutdraw z2{up}..tension arch_tension..z7{left}..tension arch_tension..z8{down}..tension arch_tension..{right}z9--z10; + +labels(1,2,3,4,5,6,7,8,9,10); + +endchar; + +beginchar(char 21,10u#,scht#,0); % --- en dash --- + +"Punctuation en dash"; + +pickup squarepen; + +x1=u+s; +x2=w-x1; +y1=y2=(0.5+asymm)*scht; + +draw z1--z2; + +labels(1,2); + +endchar; + +beginchar(char 22,designsize,scht#,0); % --- em dash --- + +"Punctuation em dash"; + +pickup squarepen; + +x1=u+s; +x2=w-x1; +y1=y2=(0.5+asymm)*scht; + +draw z1--z2; + +labels(1,2); + +endchar; + +ligtable "C": + "o" kern -0.5u#; + ligtable "F": "o" kern -u#; ligtable "T": - "a" kern -0.5u#; + "a" kern -0.5u#, + "i" kern -1u#; ligtable "c": "o" kern -0.5u#, @@ -1127,11 +1476,23 @@ ligtable "t": ligtable "y": "o" kern -0.5u#; +ligtable "'": + "'" =: ditto; % double close quote + +ligtable "`": + "`" =: char 16; % double open quote + +ligtable "-": + "-" =: char 21; % en dash + +ligtable char 21: + "-" =: char 22; % em dash + font_quad 18u#+2s#; font_normal_space 4u#+2s#; font_normal_stretch 3u#; font_normal_shrink 2u#; font_identifier "Gilgal"; -font_coding_scheme "OT1"; +font_coding_scheme "T1"; end diff --git a/mess.tex b/mess.tex new file mode 100644 index 0000000..f480d26 --- /dev/null +++ b/mess.tex @@ -0,0 +1,27 @@ +% A mess using all the glyphs. +% +% CC0 1.0. +% http://creativecommons.org/publicdomain/zero/1.0 + +\input{preamble} + +\begin{document} +\gilgalfont{37}{43} +\vspace*{1.5em} +``Pack my box with five dozen liquor jugs!'' + +D-a--sh---es, under\_score, back\textbackslash{}slash. + +(Parentheses.) Slash/Asterisk* + +\{Braces\textbar{}bar\} [Square brackets] x\&y + +Colon: semicolon; Question? + +`Don't quote name@example.org' + +Caret\textasciicircum{} Tilde\textasciitilde{} 1234567890, \#2, \$9.99, 95\% + +$1+1=2$, $ad$, $a^2+b^2=c^2$. + +\end{document} diff --git a/preamble.tex b/preamble.tex index a76e2a3..9299199 100644 --- a/preamble.tex +++ b/preamble.tex @@ -3,16 +3,25 @@ \usepackage{iftex} \ifluatex - \usepackage{fontspec} + \usepackage[no-math]{fontspec} \setmainfont{gilgal} + \usepackage{mathastext} +% \setmathfont{latinmodern-math.otf} +% \setmathfont[range=\mathup]{gilgal.otf} +% \setmathfont[range=\mathbfup]{gilgal.otf} +% \setmathfont[range=\mathbfit]{gilgal.otf} +% \setmathfont[range=\mathit]{gilgal.otf} \newcommand{\initcapfont}[2]{\fontsize{#1}{#2}\fontfamily{lmr}\selectfont{}} \newcommand{\gilgalfont}[2]{\fontsize{#1}{#2}\normalfont{}} \else - \DeclareFontFamily{OT1}{gilgal}{} - \DeclareFontShape{OT1}{gilgal}{m}{sc}{<-> gilgal}{} + \DeclareFontFamily{T1}{gilgal}{} + \DeclareFontShape{T1}{gilgal}{m}{sc}{<-> gilgal}{} \DeclareFontShape{OT1}{cmr}{m}{n}{<17-> cmr17}{} + \DeclareFontShape{OMS}{cmsy}{m}{n}{<10-> cmsy10}{} + \DeclareSymbolFont{operators}{T1}{gilgal}{m}{sc} + \DeclareSymbolFont{letters}{T1}{gilgal}{m}{sc} \newcommand{\initcapfont}[2]{\fontsize{#1}{#2}\usefont{OT1}{cmr}{m}{n}} - \newcommand{\gilgalfont}[2]{\fontsize{#1}{#2}\usefont{OT1}{gilgal}{m}{sc}} + \newcommand{\gilgalfont}[2]{\fontsize{#1}{#2}\usefont{T1}{gilgal}{m}{sc}} \fi \pagenumbering{gobble} -- 2.11.4.GIT