summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context/data/scite/lexers/data/scite-context-data-metapost.lua2
-rw-r--r--context/data/scite/scite-context-data-metapost.properties59
-rw-r--r--metapost/context/base/mp-tool.mpiv16
-rw-r--r--metapost/context/font/punkfont-bold.mp4
-rw-r--r--metapost/context/font/punkfont-boldslanted.mp5
-rw-r--r--metapost/context/font/punkfont-characters.mp726
-rw-r--r--metapost/context/font/punkfont-definitions.mp115
-rw-r--r--metapost/context/font/punkfont-slanted.mp4
-rw-r--r--metapost/context/font/punkfont.mp2
-rw-r--r--scripts/context/lua/mtxrun.lua73
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua73
-rw-r--r--scripts/context/stubs/unix/mtxrun73
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4112 -> 4111 bytes
-rw-r--r--tex/context/base/context.mkiv5
-rw-r--r--tex/context/base/font-syn.lua167
-rw-r--r--tex/context/base/math-fen.mkiv6
-rw-r--r--tex/context/base/meta-fnt.lua233
-rw-r--r--tex/context/base/meta-fnt.mkiv36
-rw-r--r--tex/context/base/mult-mps.lua1
-rw-r--r--tex/context/base/status-files.pdfbin24769 -> 24781 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/context/base/util-sto.lua58
-rw-r--r--tex/context/base/x-mathml.lua1
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
-rw-r--r--web2c/context.cnf2
26 files changed, 594 insertions, 1073 deletions
diff --git a/context/data/scite/lexers/data/scite-context-data-metapost.lua b/context/data/scite/lexers/data/scite-context-data-metapost.lua
index 3369f9021..def27c33d 100644
--- a/context/data/scite/lexers/data/scite-context-data-metapost.lua
+++ b/context/data/scite/lexers/data/scite-context-data-metapost.lua
@@ -1,5 +1,5 @@
return {
- ["commands"]={ "beginfig", "endfig", "rotatedaround", "reflectedabout", "arrowhead", "currentpen", "currentpicture", "cuttings", "defaultfont", "extra_beginfig", "extra_endfig", "ditto", "EOF", "down", "evenly", "fullcircle", "halfcircle", "identity", "in", "left", "origin", "pensquare", "quartercircle", "right", "unitsquare", "up", "withdots", "abs", "bbox", "ceiling", "center", "cutafter", "cutbefore", "dir", "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod", "round", "unitvector", "whatever", "cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot", "loggingall", "interact", "tracingall", "tracingnone", "pickup", "undraw", "unfill", "unfilldraw", "buildcycle", "dashpattern", "decr", "dotlabel", "dotlabels", "drawoptions", "incr", "label", "labels", "max", "min", "thelabel", "z", "beginchar", "blacker", "capsule_end", "change_width", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "define_whole_blacker_pixels", "define_whole_pixels", "define_whole_vertical_blacker_pixels", "define_whole_vertical_pixels", "endchar", "extra_beginchar", "extra_endchar", "extra_setup", "font_coding_scheme", "clearxy", "clearit", "clearpen", "shipit", "font_extra_space", "exitunless", "relax", "hide", "gobble", "gobbled", "stop", "blankpicture", "counterclockwise", "tensepath", "takepower", "direction", "softjoin", "makelabel", "rotatedabout", "flex", "superellipse", "erase", "image", "nullpen", "savepen", "clearpen", "penpos", "penlabels", "range", "numtok", "thru", "z", "laboff", "bye", "red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background", "graypart", "graycolor", "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in" },
+ ["commands"]={ "beginfig", "endfig", "beginglyph", "endglyph", "charscale", "rotatedaround", "reflectedabout", "arrowhead", "currentpen", "currentpicture", "cuttings", "defaultfont", "extra_beginfig", "extra_endfig", "ditto", "EOF", "down", "evenly", "fullcircle", "halfcircle", "identity", "in", "left", "origin", "pensquare", "quartercircle", "right", "unitsquare", "up", "withdots", "abs", "bbox", "ceiling", "center", "cutafter", "cutbefore", "dir", "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod", "round", "unitvector", "whatever", "cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot", "loggingall", "interact", "tracingall", "tracingnone", "pickup", "undraw", "unfill", "unfilldraw", "buildcycle", "dashpattern", "decr", "dotlabel", "dotlabels", "drawoptions", "incr", "label", "labels", "max", "min", "thelabel", "z", "beginchar", "blacker", "capsule_end", "change_width", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "define_whole_blacker_pixels", "define_whole_pixels", "define_whole_vertical_blacker_pixels", "define_whole_vertical_pixels", "endchar", "extra_beginchar", "extra_endchar", "extra_setup", "font_coding_scheme", "clearxy", "clearit", "clearpen", "shipit", "font_extra_space", "exitunless", "relax", "hide", "gobble", "gobbled", "stop", "blankpicture", "counterclockwise", "tensepath", "takepower", "direction", "softjoin", "makelabel", "rotatedabout", "flex", "superellipse", "erase", "image", "nullpen", "savepen", "clearpen", "penpos", "penlabels", "range", "numtok", "thru", "z", "laboff", "bye", "red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background", "graypart", "graycolor", "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in" },
["internals"]={ "mitered", "rounded", "beveled", "butt", "squared", "eps", "epsilon", "infinity", "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius", "pen_lft", "pen_rt", "pen_top", "pen_bot" },
["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withpen", "dashed", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "downto", "upto", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "readstring", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "greypart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "greycolor", "graycolor", "colormodel", "graypart", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter" },
["shortcuts"]={ "..", "...", "--", "---", "&" },
diff --git a/context/data/scite/scite-context-data-metapost.properties b/context/data/scite/scite-context-data-metapost.properties
index 9e612bf19..5ff791448 100644
--- a/context/data/scite/scite-context-data-metapost.properties
+++ b/context/data/scite/scite-context-data-metapost.properties
@@ -1,33 +1,34 @@
keywordclass.metapost.commands=\
-beginfig endfig rotatedaround reflectedabout \
-arrowhead currentpen currentpicture cuttings defaultfont \
-extra_beginfig extra_endfig ditto EOF down \
-evenly fullcircle halfcircle identity in \
-left origin pensquare quartercircle right \
-unitsquare up withdots abs bbox \
-ceiling center cutafter cutbefore dir \
-directionpoint div dotprod intersectionpoint inverse \
-mod round unitvector whatever cutdraw \
-draw drawarrow drawdblarrow fill filldraw \
-drawdot loggingall interact tracingall tracingnone \
-pickup undraw unfill unfilldraw buildcycle \
-dashpattern decr dotlabel dotlabels drawoptions \
-incr label labels max min \
-thelabel z beginchar blacker capsule_end \
-change_width define_blacker_pixels define_corrected_pixels define_good_x_pixels define_good_y_pixels \
-define_horizontal_corrected_pixels define_pixels define_whole_blacker_pixels define_whole_pixels define_whole_vertical_blacker_pixels \
-define_whole_vertical_pixels endchar extra_beginchar extra_endchar extra_setup \
-font_coding_scheme clearxy clearit clearpen shipit \
-font_extra_space exitunless relax hide gobble \
-gobbled stop blankpicture counterclockwise tensepath \
-takepower direction softjoin makelabel rotatedabout \
-flex superellipse erase image nullpen \
-savepen clearpen penpos penlabels range \
-numtok thru z laboff bye \
-red green blue cyan magenta \
-yellow black white background graypart \
-graycolor mm pt dd bp \
-cm pc cc in
+beginfig endfig beginglyph endglyph \
+charscale rotatedaround reflectedabout arrowhead currentpen \
+currentpicture cuttings defaultfont extra_beginfig extra_endfig \
+ditto EOF down evenly fullcircle \
+halfcircle identity in left origin \
+pensquare quartercircle right unitsquare up \
+withdots abs bbox ceiling center \
+cutafter cutbefore dir directionpoint div \
+dotprod intersectionpoint inverse mod round \
+unitvector whatever cutdraw draw drawarrow \
+drawdblarrow fill filldraw drawdot loggingall \
+interact tracingall tracingnone pickup undraw \
+unfill unfilldraw buildcycle dashpattern decr \
+dotlabel dotlabels drawoptions incr label \
+labels max min thelabel z \
+beginchar blacker capsule_end change_width define_blacker_pixels \
+define_corrected_pixels define_good_x_pixels define_good_y_pixels define_horizontal_corrected_pixels define_pixels \
+define_whole_blacker_pixels define_whole_pixels define_whole_vertical_blacker_pixels define_whole_vertical_pixels endchar \
+extra_beginchar extra_endchar extra_setup font_coding_scheme clearxy \
+clearit clearpen shipit font_extra_space exitunless \
+relax hide gobble gobbled stop \
+blankpicture counterclockwise tensepath takepower direction \
+softjoin makelabel rotatedabout flex superellipse \
+erase image nullpen savepen clearpen \
+penpos penlabels range numtok thru \
+z laboff bye red green \
+blue cyan magenta yellow black \
+white background graypart graycolor mm \
+pt dd bp cm pc \
+cc in
keywordclass.metapost.internals=\
mitered rounded beveled butt \
diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv
index 7f6972bf2..6003ea75c 100644
--- a/metapost/context/base/mp-tool.mpiv
+++ b/metapost/context/base/mp-tool.mpiv
@@ -2438,6 +2438,22 @@ enddef ;
% )
% enddef ;
+%D New helpers:
+
+def beginglyph(expr unicode, width, height, depth) =
+ beginfig(unicode) ; % the number is irrelevant
+ charcode := unicode ;
+ charwd := width ;
+ charht := height ;
+ chardp := depth ;
+enddef ;
+
+def endglyph =
+ currentpicture := currentpicture scaled charscale ;
+ setbounds currentpicture to (boundingbox unitsquare xscaled charwd yscaled (charht + chardp) shifted (0,-chardp)) ;
+ endfig ;
+enddef ;
+
%D Dimensions have bever been an issue as traditional MP can't make that large
%D pictures, but with double mode we need a catch:
diff --git a/metapost/context/font/punkfont-bold.mp b/metapost/context/font/punkfont-bold.mp
deleted file mode 100644
index 1c62963f9..000000000
--- a/metapost/context/font/punkfont-bold.mp
+++ /dev/null
@@ -1,4 +0,0 @@
-boolean bold_punk ; bold_punk := true ;
-
-input "punkfont-definitions.mp" ;
-input "punkfont-characters.mp" ;
diff --git a/metapost/context/font/punkfont-boldslanted.mp b/metapost/context/font/punkfont-boldslanted.mp
deleted file mode 100644
index 3e5fa1561..000000000
--- a/metapost/context/font/punkfont-boldslanted.mp
+++ /dev/null
@@ -1,5 +0,0 @@
-boolean bold_punk ; bold_punk := true ;
-boolean slanted_punk ; slanted_punk := true ;
-
-input "punkfont-definitions.mp" ;
-input "punkfont-characters.mp" ;
diff --git a/metapost/context/font/punkfont-characters.mp b/metapost/context/font/punkfont-characters.mp
deleted file mode 100644
index da0015b02..000000000
--- a/metapost/context/font/punkfont-characters.mp
+++ /dev/null
@@ -1,726 +0,0 @@
-initialize_punk_upper ;
-
-beginpunkchar("A",13,1,2);
-z1=pp(1.5u,0); z2=(.5w,1.1h); z3=pp(w-1.5u,0);
-pd z1; pd z3; draw z1--z2--z3; % left and right diagonals
-z4=pp .3[z1,z2]; z5=pp .3[z3,z2]; pd z4; pd z5; draw z4--z5; % crossbar
-endchar;
-
-beginpunkchar("B",12,1,1);
-z1=pp(2u,0); z2=pp(2u,.6h); z3=pp(2u,h); pd z1; pd z3; draw z1--z3; % stem
-z1.5=pp(w-u,.5y2); z2.5=pp(w-u,.5[y2,y3]); draw z2--z2.5--z3; % upper lobe
-draw flex(z2,z1.5,z1); % lower lobe
-endchar;
-
-beginpunkchar("C",13,1,2);
-z1=pp(w-2u,.8h); z2=pp(.6w,h); z3=pp(u,.5h); z4=(.6w,0); z5=(w-2u,.2h);
-pd z1; pd z5; draw z1..z2..z3..z4..z5; % arc
-endchar;
-
-beginpunkchar("D",14,1,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-u,.6h);
-pd z1; pd z2; draw flex(z1,z3,z2); % lobe
-draw z1--z2; % stem
-endchar;
-
-beginpunkchar("E",12,.5,1);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-2.5u,h); z4=pp(w-2u,0);
-pd z3; pd z4; draw z4--z1--z2--z3; % stem and arms
-z5=pp(2u,.6h); z6=pp(w-3u,.6h); pd z5; pd z6; draw z5--z6; % crossbar
-endchar;
-
-beginpunkchar("F",12,.5,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-2u,h);
-pd z1; pd z3; draw z1--z2--z3; % stem and arm
-z5=pp(2u,.6h); z6=pp(w-3u,.6h); z4=pp .5[z5,z6]-(0,.1h);
-pd z5; pd z6; draw flex (z5,z4,z6); % crossbar
-endchar;
-
-beginpunkchar("G",13,.5,.5);
-z1=pp(w-2u,.8h); z2=pp(.6w,h); z3=pp(u,.5h); z4=pp(.6w,0); z5=(w-2u,0);
-pd z1; draw z1..z2..z3..z4---z5; % arc
-z6=pp(.5[u,x5],.4h); pd z6; pd z5; draw z6--(pp(x5,y6))--z5; % spur
-endchar;
-
-beginpunkchar("H",14,1,.5);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-2u,0); z4=pp(w-2u,h);
-z5=pp(2u,.6h); z6=pp(w-2u,.6h);
-pd z1; pd z2; pd z3; pd z4; draw z1--z2; draw flex(z3,z6,z4); % stems
-pd z5; draw z5--z6; % crossbar
-endchar;
-
-beginpunkchar("I",5,1,2);
-z1=pp(.5w,0); z2=(.5w,1/3h); z3=(.5w,2/3h); z4=(.5w,h);
-pd z1; pd z4; draw flex(z1,z2,z3,z4); % stem
-endchar;
-
-beginpunkchar("J",9,1,2);
-z1=pp(w-2u,h); z2=pp(w-2u,-.1h); z3=pp(u,0);
-pd z1; pd z3; draw z1--z2--z3; % arc
-endchar;
-
-beginpunkchar("K",14,1,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(2u,1/3h); z4=pp(w-1.5u,h);
-pd z1; pd z2; draw z1--z2; % stem
-pd z3; pd z4; draw z3--z4; % upper diagonal
-z6=pp(w-u,0); z5=1/3[z3,z4];
-pd z6; draw flex(z5,.8[z1,2/3[z5,z6] ],z6);% lower diagonal
-endchar;
-
-beginpunkchar("L",11,1,2);
-z1=pp(2u,h); z2=pp(2u,0); z3=pp(w-1.5u,0);
-pd z1; pd z3; draw z1--z2--z3; % stem and arm
-endchar;
-
-beginpunkchar("M",17,.5,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(.5w,0); z4=pp(w-2u,h); z5=pp(w-2u,0);
-pd z1; pd z5; draw z1--z2--z3--z4--z5; % stems and diagonals
-endchar;
-
-beginpunkchar("N",13,.75,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-2u,0); z4=pp(w-2u,h);
-pd z1; pd z4; draw z1--z2--z3--z4; % stems and diagonals
-endchar;
-
-beginpunkchar("O",12,.5,2);
-z1=pp(.5w,h); z2=pp(u,.55h); z3=pp(.5w,0); z4=pp(w-u,.55h);
-pd z1; draw z1{left}..z2..z3..z4..z1; % bowl
-endchar;
-
-beginpunkchar("P",13,1,2);
-z1=pp(2u,0); z2=pp(2u,1.1h); z3=pp(2u,.5h); z4=pp(w,.6[y3,y2]);
-pd z1; pd z3; draw z1--z2--z4--z3; % stem and bowl
-endchar;
-
-beginpunkchar("Q",14,.5,2);
-z1=pp(.5w,h); z2=pp(u,.55h); z3=pp(.5w,0); z4=pp(w-u,.55h);
-pd z1; draw z1{curl 2}..z2..z3..z4..z1; % bowl
-z5=pp(.4w,.2h); z6=pp(w-u,-.1h); z7=pp(.5[x5,x6],-.2h);
-pd z5; pd z6; draw z5--z7--z6; % tail
-endchar;
-
-beginpunkchar("R",16,1,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-u,.6[y2,y4]); z4=pp(2u,.5h); z5=pp(w-1.5u,0);
-pd z1; pd z2; pd z5; draw z1--flex(z2,z3,z4)--z5; % stem, bowl, and diagonal
-endchar;
-
-beginpunkchar("S",11,.3,1);
-z1=pp(w-2u,.9h); z2=pp(.5w,h); z3=pp(u,.7h); z4=.6[z6,z2];
-z5=pp(w-u,.35h); z6=pp(.5w,u); z7=pp(u,.2h);
-pd z1; pd z7; draw z1--z2...z3..z4..z5...z6--z7; % stroke
-endchar;
-
-beginpunkchar("T",13,.75,2);
-z1=pp(u,h); z2=pp(w-u,h); z3=pp(.5w,0);
-pd z1; pd z2; pd z3; draw z1--z2; % arms
-draw .5[z1,z2]--z3; % stem
-endchar;
-
-beginpunkchar("U",13,.3,2);
-z1=pp(2u,h); z2=pp(2u,.2h); z3=pp(.5w,0); z4=pp(w-2u,.2h); z5=pp(w-2u,h);
-pd z1; pd z5; draw z1---z2...z3{z4-z2}...z4---z5; % stroke
-endchar;
-
-beginpunkchar("V",13,1,2);
-z1=pp(1.5u,h); z2=pp(.5w,0); z3=pp(w-1.5u,h);
-pd z1; pd z3; draw z1--z2--z3; % diagonals
-endchar;
-
-beginpunkchar("W",18,1,2);
-z1=pp(1.5u,h); z2=pp(.5[x1,x3],0); z3=pp(.5w,.8h); z4=pp(.5[x3,x5],0);
-z5=pp(w-1.5u,h);
-pd z1; pd z5; draw z1--z2--z3--z4--z5; % diagonals
-endchar;
-
-beginpunkchar("X",13,1,1);
-z1=pp(1.5u,h); z2=pp(w-1.5u,0); z3=pp(1.5u,0); z4=pp(w-2.5u,h);
-pd z1; pd z2; draw z1--z2; % main diagonal
-pd z3; pd z4; draw z3--z4; % cross diagonal
-endchar;
-
-beginpunkchar("Y",13,1,2);
-z1=pp(1.5u,h); z2=pp(w-1.5u,h); z3=pp(.5w,.5h); z4=pp(.5w,0);
-pd z1; pd z2; pd z4; draw z1--z3--z4; % stem and left diagonal
-draw z2--z3; % right diagonal
-endchar;
-
-beginpunkchar("Z",11,1,2);
-z1=pp(1.5u,h); z2=pp(w-2.5u,h); z3=pp(1.5u,0); z4=pp(w-1.5u,0);
-pd z1; pd z4; draw z1--z2--z3--z4; % diagonals
-endchar;
-
-beginpunkchar(198,16,1,2); % \AE
-z1=pp(1.5u,0); z2=pp(.6w,h); z3=pp(w-1.5u,h);
-pd z1; pd z3; draw z1--z2--z3; % left diagonal and upper arm
-z4=pp .3[z1,z2]; z5=pp(.6w,0); z6=pp(w-2u,.3h);
-pd z4; pd z6; draw z4--z6; % crossbar
-z7=pp(w-u,0); pd z2; pd z7; draw z2--z5--z7; % stem and lower arm
-endchar;
-
-beginpunkchar(338,18,1,2); % \OE
-z1=pp(.5w,h); z2=pp(u,.4h); z3=pp(.5w,0);
-pd z1; draw z1..z2..{right}z3; % bowl
-z4=pp(w-1.5u,h); z5=pp(w-2u,.4h); z6=pp(w-u,0);
-pd z4; pd z6; draw z4--z1--z3--z6; % arms and stem
-pd z5; draw z5--.4[z3,z1]; % crossbar
-endchar;
-
-beginpunkchar(216,14,1,1); % \O
-z1=pp(.5w,h); z2=pp(u,.5h); z3=pp(.5w,0); z4=pp(w-u,.5h);
-z5=pp(w-2u,1.1h); z6=pp(2u,-.1h);
-pd z1; pd z6; draw z1..z2..z3..z4..z5--z6; % bowl and diagonal
-endchar;
-
-beginpunkchar(915,11,1,2); % $\Gamma$
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-1.5u,h);
-pd z1; pd z3; draw z1--z2--z3; % stem and arm
-endchar;
-
-beginpunkchar(916,15,1,2); % $\Delta$
-z1=pp(u,0); z2=pp(.5w,h); z3=pp(w-u,0);
-pd z1; draw z1--z2..tension 5..z3..tension 5..z1; % triangle
-endchar;
-
-beginpunkchar(920,15,.5,2); % $\Theta$
-z1=pp(.5w,h); z2=pp(u,.6h); z3=pp(.5w,0); z4=pp(w-u,.6h);
-pd z1; draw z1..tension.8..z2..z3..z4..tension.8..z1; % bowl
-z5=pp(x2+2u,.4h); z6=pp(x4-2u,.4h); pd z5; pd z6; draw z5--z6; % bar
-endchar;
-
-beginpunkchar(923,12,1,2); % $\Lambda$
-z1=pp(u,0); z2=pp(.5w,h); z3=pp(w-u,0);
-pd z1; pd z3; draw z1--z2--z3; % diagonals
-endchar;
-
-beginpunkchar(926,12,1,1); % $\Xi$
-z1=pp(u,h); z2=pp(w-u,h); pd z1; pd z2; draw z1--z2; % upper arm
-z3=pp(2u,.55h); z4=pp(w-2u,.55h); pd z3; pd z4; draw z3--z4; % bar
-z5=pp(u,0); z6=pp(w-u,0); pd z5; pd z6; draw z5--z6; % lower arm
-endchar;
-
-beginpunkchar(928,13,1,.5); % $\Pi$
-z1=pp(1.5u,0); z2=pp(1.5u,h); z3=pp(w-1.5u,h); z4=pp(w-1.5u,0);
-pd z1; pd z4; draw z1--z2--z3--z4; % stems and bar
-endchar;
-
-beginpunkchar(931,13,1,1); % $\Sigma$
-z1=pp(w-u,h); z2=pp(u,h); z3=pp(.5w-u,.5h); z4=pp(u,0); z5=pp(w-u,0);
-pd z1; pd z5; draw z1--z2{.5[z4,z5]-z2}..z3--z4--z5; % arms and diagonals
-endchar;
-
-beginpunkchar(933,15,1,.5); % $\Upsilon$
-z1=pp(u,.8h); z2=pp(.3w,h); z3=pp(.5w,.5h); z4=pp(.5w,0);
-pd z1; pd z4; draw z1..z2..tension2..z3---z4; % left arc and stem
-z5=pp(w-u,.8h); z6=pp(.7w,h);
-pd z5; draw z5..z6..tension2..{z4-z3}z3; % right arc
-endchar;
-
-beginpunkchar(934,13,1,2); % $\Phi$
-z1=pp(.5w,h); z2=pp(.5w,0); pd z1; pd z2; draw z1--z2; % stem
-z3=pp(.5w,2/3h); z4=pp(u,.5h); z5=pp(.5w,1/4h); z6=pp(w-u,.5h);
-pd z3; draw z3..z4..z5..z6..z3; % bowl
-endchar;
-
-beginpunkchar(936,14,1,1); % $\Psi$
-z1=pp(.5w,h); z2=pp(.5w,0); pd z1; pd z2; draw z1--z2; % stem
-z3=pp(u,.8h); z4=pp(.5w,.2h); z5=pp(w-u,.8h);
-pd z3; pd z5; draw z3{.4[z1,z2]-z3}..z4{right}..{z5-.4[z1,z2]}z5; % stroke
-endchar;
-
-beginpunkchar(937,13,1,2); % $\Omega$
-z1=pp(u,0); z2=pp(1/3w,0); z3=pp(u,2/3h); z4=pp(.5w,h);
-z5=pp(w-u,2/3h); z6=pp(2/3w,0); z7=pp(w-u,0);
-pd z1; pd z7; draw z1--z2{up}..z3..z4..z5..{down}z6--z7; % bowl and arms
-endchar;
-
-beginpunkchar(".",5,1,2);
-pd pp(.5w,0); % dot
-endchar;
-
-beginpunkchar(",",5,.5,.5);
-z1=pp(.5w,0); z2=pp(w-u,-.1h); z3=pp(.5w,-.3h);
-pd z1; pd z3; draw z1--z2--z3; % stroke
-endchar;
-
-beginpunkchar(":",5,1,.5);
-pd pp(.5w,0); pd pp(.5w,.4h); % dots
-endchar;
-
-beginpunkchar(";",5,.5,.5);
-z1=pp(.5w,0); z2=pp(w-u,-.1h); z3=pp(.5w,-.3h);
-pd z1; pd z3; draw z1--z2--z3; % stroke
-pd pp(.5w,.4h); % dot
-endchar;
-
-beginpunkchar("!",5,.5,.5);
-pd pp(.5w,0); % dot
-z1=pp(.5w,1.05h); z2=pp(.5w,.3h); pd z1; pd z2; draw z1--z2; % stem
-endchar;
-
-beginpunkchar(161,5,.5,.5); % spanish inverted !
-pd pp(.5w,.9h); % dot
-z1=pp(.5w,-.1h); z2=pp(.5w,.6h); pd z1; pd z2; draw z1--z2; % stem
-endchar;
-
-beginpunkchar("?",9,1,.5);
-z1=pp(1.5u,.8h); z2=pp(.5w,h); z3=pp(w-u,.8h); z4=pp(.5w,.3h);
-pd z1; pd z4; draw z1..z2..z3..{down}z4; % arc and stem
-pd pp(.5w,0); % dot
-endchar;
-
-beginpunkchar(191,9,1,.5); % spanish inverted ?
-z1=pp(1.5u,.1h); z2=pp(.5w,-.1h); z3=pp(w-u,.1h); z4=pp(.5w,.6h);
-pd z1; pd z4; draw z1..z2..z3..{up}z4; % arc and stem
-pd pp(.5w,.9h); % dot
-endchar;
-
-beginpunkchar("&",14,.5,.5);
-z1=pp(w-2u,h); z2=pp(u,h); z3=pp(3u,0); z5=pp(w-u,.6h); z6=pp(w-2u,0);
-pd z1; pd z5; draw z1--z2--z3--z5; % arms and stem
-draw z1--.5[z2,z3]; pd z6; draw z6--.6[z3,z5]; % diagonals
-endchar;
-
-beginpunkchar("$",12,.5,.5);
-z1=pp(w-1.5u,.7h); z2=pp(.5w,h); z3=pp(u,.7h); z4=.5[z3,z5];
-z5=pp(w-u,.3h); z6=pp(.5w,0); z7=pp(u,.3h);
-pd z1; pd z7; draw z1..z2..z3..z4..z5..z6..z7; % stroke
-z8=z2+(0,.1h); pd z8; draw z8--z6; % stem
-endchar;
-
-beginpunkchar("%",18,.5,.5);
-z1=pp(3.5u,1.1h); z2=pp(u,.8h); z3=pp(3.5u,.5h); z4=pp(6u,.8h);
-z5=pp(w-3.5u,.5h); z6=pp(w-6u,.2h); z7=pp(w-3.5u,-.1h); z8=pp(w-u,.2h);
-pd z1; draw z1..z2..z3..z4..z1; % upper bowl
-pd z5; draw z5..z6..z7..z8..z5; % lower bowl
-z9=pp(w-3u,1.1h); z0=pp(3u,-.1h); pd z0; draw z9--z0; % diagonal
-draw z1{z5-z1}..z9; % link
-endchar;
-
-beginpunkchar("@",18,1,.5);
-z1=pp(2u,0); z2=pp(1/3w,.7h); z3=pp(w-6u,0);
-z4=pp(w,.3h); z5=pp(1/3w,h); z6=pp(u,.5h); z7=.7[z2,z3];
-pd z1; pd z7; draw z1--z2--z3{right}..z4..z5..z6..z7; % diagonals and stroke
-endchar;
-
-beginpunkchar("-",7,.5,.5);
-z1=pp(u,.4h); z2=pp(w-u,.5h); pd z1; pd z2; draw z1--z2; % bar
-endchar;
-
-beginpunkchar(8211,9,.5,.5); % --
-z1=pp(0,.5h); z2=pp(w,.4h); pd z1; pd z2; draw z1--z2; % bar
-endchar;
-
-beginpunkchar(8212,18,.5,.5); % ---
-z1=pp(0,.5h); z2=pp(w,.4h); pd z1; pd z2; draw z1--z2; % bar
-endchar;
-
-beginpunkchar("+",9,.5,1);
-z1=pp(0,.5h); z2=pp(w,.5h); pd z1; pd z2; draw z1--z2; % bar
-z3=pp(.5w,.1h); z4=pp(.5w,.9h); pd z3; pd z4; draw z3--z4; % stem
-endchar;
-
-beginpunkchar("*",13,.5,1);
-z0=pp(.5w,1.1h); z1=pp(u,.9h); z2=pp(2u,.3h); z3=pp(w-u,.3h); z4=pp(w-u,.9h);
-pd z0; draw z0--z2..1/3[.5[z2,z4],z0]..z4--z1--z3--z0; % star
-endchar;
-
-beginpunkchar(39,5,.5,1.5); % ' apostrofe HH/TH (to be checked)
-z1=pp(w/2,h); z2=pp(w/2+u,.85h); z3=pp(w/2,2/3h);
-pd z1; pd z3; draw z1..z2..z3; % stroke
-endchar;
-
-beginpunkchar(34,9,1,1.5); % " HH/TH (to be checked)
-z1=pp(1.5u,h); z2=pp(1.5u,.6h); z3=pp(w-1.5u,h); z4=pp(w-1.5u,.6h);
-pd z1; pd z2; pd z3; pd z4; draw z1--z2; draw z3--z4;
-endchar;
-
-beginpunkchar(8216,5,.3,.5); % `
-z1=pp(w-1.5u,h); z2=pp(u,.85h); z3=pp(w-u,2/3h);
-pd z1; pd z3; draw z1--z2--z3; % stroke
-endchar;
-
-beginpunkchar(8217,5,.3,.5); % '
-z1=pp(1.5u,h); z2=pp(w-u,.85h); z3=pp(u,2/3h);
-pd z1; pd z3; draw z1--z2--z3; % stroke
-endchar;
-
-beginpunkchar(8220,9,.3,.5); % `` quotedblleft
-z1=pp(.5w+.5u,h); z2=pp(w-u,.6h); z3=pp(u,.95h);
-pd z1; pd z3; draw z1--z2--z3; % stroke
-endchar;
-
-beginpunkchar(8221,9,.3,.5); % '' quotedblright
-z1=pp(.5w-.5u,h); z2=pp(u,.6h); z3=pp(w-u,.95h);
-pd z1; pd z3; draw z1--z2--z3; % stroke
-endchar;
-
-beginpunkchar("(",7,.5,.5);
-z1=pp(w-u,h); z2=pp(u,.5h); z3=pp(w-u,0);
-pd z1; pd z3; draw z1..z2..z3; % stroke
-endchar;
-
-beginpunkchar(")",7,.5,.5);
-z1=pp(u,h); z2=pp(w-u,.5h); z3=pp(u,0); pd z1; pd z3; draw z1..z2..z3; % stroke
-endchar;
-
-beginpunkchar("[",8,.5,.5);
-z1=pp(w-u,h); z2=pp(.5w,h); z3=pp(.5w,0); z4=pp(w-u,0);
-pd z1; pd z4; draw z1--z2--z3--z4; % bars and stem
-endchar;
-
-beginpunkchar("]",8,.5,.5);
-z1=pp(u,h); z2=pp(.5w,h); z3=pp(.5w,0); z4=pp(u,0);
-pd z1; pd z4; draw z1--z2--z3--z4; % bars and stem
-endchar;
-
-beginpunkchar("<",9,.5,.5);
-z1=pp(w-u,.9h); z2=pp(u,.5h); z3=pp(w-u,.1h);
-pd z1; pd z3; draw z1--z2--z3; % diagonals
-endchar;
-
-beginpunkchar(">",9,.5,.5);
-z1=pp(u,.9h); z2=pp(w-u,.5h); z3=pp(u,.1h);
-pd z1; pd z3; draw z1--z2--z3; % diagonals
-endchar;
-
-beginpunkchar("{",10,.5,.5); % HH/TH
-z1=pp(w-2u,h); z3=pp(2u,.5h); z5=pp(w-2u,0);
-z2=pp(w-4u,.6h); z4=(w-4u,.4h);
-pd z1; pd z3; pd z5; draw z1{left}..z2--z3 & z3--z4..{right}z5;
-endchar;
-
-beginpunkchar("}",10,.5,.5); % HH/TH
-z1=pp(2u,h); z3=pp(w-2u,.5h); z5=pp(2u,0);
-z2=pp(4u,.6h); z4=(4u,.4h);
-pd z1; pd z3; pd z5; draw z1{right}..z2--z3 & z3--z4..{left}z5;
-endchar;
-
-beginpunkchar("=",9,.5,.5);
-z5=pp(u,2/3h); z6=pp(w-u,2/3h); pd z5; pd z6; draw z5--z6; % upper bar
-z7=pp(u,1/3h); z8=pp(w-u,1/3h); pd z7; pd z8; draw z7--z8; % lower bar
-endchar;
-
-beginpunkchar("#",15,.5,.5);
-z1=pp(.5w,h); z2=pp(3u,0); z3=pp(w-3u,h); z4=pp(.5w,0);
-pd z2; pd z3; draw z3--z1--z2; draw z3--z4--z2; % diagonals (linked)
-z5=pp(u,2/3h); z6=pp(w-u,2/3h); pd z5; pd z6; draw z5--z6; % upper bar
-z7=pp(u,1/3h); z8=pp(w-u,1/3h); pd z7; pd z8; draw z7--z8; % lower bar
-endchar;
-
-beginpunkchar("/",9,1,1);
-z1=pp(1.5u,-.05h); z2=pp(w-1.5u,1.05h); pd z1; pd z2; draw z1--z2; % diagonal
-endchar;
-
-beginpunkchar("\",9,1,1); % HH/TH
-z1=pp(1.5u,1.05h); z2=pp(w-1.5u,-.05h); pd z1; pd z2; draw z1--z2; % reverse diagonal
-endchar;
-
-
-beginpunkchar("0",9,.5,1);
-z1=pp(.5w,h); z2=pp(u,.55h); z3=pp(.5w,0); z4=pp(w-u,.55h);
-pd z1; draw z1{curl 2}..z2..z3..z4..z1; % bowl
-endchar;
-
-beginpunkchar("1",9,.3,1);
-z1=pp(2u,.7h); z2=pp(.6w,h); z3=pp(.6w,0);
-pd z1; pd z3; draw z1--z2--z3; % serif and stem
-endchar;
-
-beginpunkchar("2",9,1,1);
-z1=pp(2u,.7h); z2=pp(.5w,h); z3=pp(w-u,.6h); z4=pp(u,0); z5=pp(w-2u,0);
-pd z1; pd z5; draw z1..z2..z3..z4--z5; % stroke
-endchar;
-
-beginpunkchar("3",9,.5,.5);
-z1=pp(2u,.7h); z2=pp(.5w,h); z3=pp(w-u,.5[y2,y4]);
-z4=pp(.5w-u,.55h); z5=pp(w-u,.5[y4,y6]); z6=pp(.5w,0); z7=pp(1.5u,.2h);
-pd z1; pd z7; draw z1..z2..z3..z4&z4..z5..z6..z7; % arcs
-endchar;
-
-beginpunkchar("4",9,1,1);
-z1=pp(w-u,.3h); z2=pp(u,.3h); z3=pp(2/3w,h); z4=pp(2/3w,0);
-pd z1; pd z4; draw z1--z2--z3--z4; % stem and diagonals
-endchar;
-
-beginpunkchar("5",9,.5,.5);
-z1=pp(w-2u,h); z2=pp(2u,h); z3=pp(u,.7h); z4=pp(w-u,.5[y3,y5]);
-z5=pp(.5w,0); z6=pp(u,.2h);
-pd z1; pd z6; draw z1--z2--z3..z4..z5..z6; % stroke
-endchar;
-
-beginpunkchar("6",9,1,1);
-z1=pp(2/3w,h); z2=pp(u,.3h); z3=pp(.5w,0); z4=pp(w-u,.3h); z5=pp(.6w,.6h);
-z6=pp z2; pd z1; pd z6; draw z1..z2..z3..z4..z5--z6; % stroke
-endchar;
-
-beginpunkchar("7",9,.5,1);
-z1=pp(2u,h); z2=pp(w-.5u,h); z3=pp(.4w,0);
-pd z1; pd z3; draw z1--z2&z2..z3{down}; % stroke
-endchar;
-
-beginpunkchar("8",9,.5,.5);
-z1=pp(.5w,h); z2=pp(u,.5[y1,y3]); z3=pp(.5w,.6h); z4=pp(w-u,.5[y3,y5]);
-z5=pp(.5w,0); z6=pp(u,.5[y5,y3]); z7=pp(w-u,.5[y1,y3]);
-pd z1; draw z1{curl 8}..z2..z3..z4..z5..z6..z3..z7..z1; % stroke
-endchar;
-
-beginpunkchar("9",9,1,1);
-z1=pp(1/3w,0); z2=pp(w-u,.7h); z3=pp(.5w,h); z4=pp(u,.7h); z5=pp(.5w,.4h);
-pd z1; pd z5; draw z1..z2..z3..z4..z5; % stroke
-endchar;
-
-beginpunkchar(96,9,1,1); % \`{} grave
-z1=pp(2.5u,h); z2=pp(.6w,.8h); pd z1; pd z2; draw z1--z2; % diagonal
-endchar;
-
-beginpunkchar(180,9,1,1); % \'{} acute
-z1=pp(w-2.5u,h); z2=pp(.4w,.8h); pd z1; pd z2; draw z1--z2; % diagonal
-endchar;
-
-beginpunkchar(710,13,1,1); % \^{} circumflex
-z1=pp(2.5u,.8h); z2=pp(.5w,h); z3=(w-2.5u,.8h);
-pd z1; pd z3; draw z1--z2--z3; % diagonals
-endchar;
-
-beginpunkchar(711,13,1,1); % \v{} caron
-z1=pp(2.5u,.9h); z2=pp(.5w,.7h); z3=pp(w-2.5u,.9h);
-pd z1; pd z3; draw z1--z2--z3; % diagonals
-endchar;
-
-beginpunkchar(728,11,1,1); % \u{} breve
-z1=pp(2u,h); z2=pp(.5w,.75h); z3=pp(w-2u,h);
-pd z1; pd z3; draw flex(z1,z2,z3); % stroke
-endchar;
-
-beginpunkchar(175,12,1,1); % \={} macron
-z1=pp(u,.8h); z2=pp(w-u,.8h); pd z1; pd z2; draw z1--z2; % bar
-endchar;
-
-beginpunkchar(729,5,1,1); % \.{}
-pd pp(.5w,.9h); % dot
-endchar;
-
-beginpunkchar(168,13,1,1); % \"{} diaeresis
-pd pp(1/5w,.9h); pd pp(4/5w,.9h); % dots
-endchar;
-
-beginpunkchar(732,13,1,1); % \~{} tilde
-z1=pp(u,.75h); z2=pp(w-u,.9h); pd z1; pd z2; draw z1{up}..{up}z2; % stroke
-endchar;
-
-beginpunkchar(733,13,1,1); % \H{} hungarumlaut
-z1=pp(4u,h); z2=pp(2.5u,.7h); z3=pp(w-2u,h); z4=pp(w-3.5u,.7h);
-pd z1; pd z3; draw z1--z2--z4--z3; % diagonals (linked)
-endchar;
-
-beginpunkchar(730,13,0,0); % Scandinavian loop, for \AA\ and \aa (ring)
-z0=(.5w,.66h); % point $z^2$ of lowercase A
-z1=(.5w,.9h); draw z0{z0-(1.5u,0)}..z1..{(w-1.5u,0)-z0}z0; % loop
-endchar;
-
-beginpunkchar(184,13,.5,.5); % Cedilla, for \c c
-z1=(.6w,0); z2=pp(.6w,-.1h); z3=pp(2.5u,-.1h);
-pd z3; draw z1--z2--z3; % stroke
-endchar;
-
-initialize_punk_lower ;
-
-beginpunkchar(305,5,1,2); % dotless I
-z1=pp(.5w,0); z2=(.5w,1/3h); z3=(.5w,2/3h); z4=(.5w,h);
-pd z1; pd z4; draw flex(z1,z2,z3,z4); % stem
-endchar;
-
-beginpunkchar(567,9,1,2); % dotless J
-z1=pp(w-2u,h); z2=pp(w-2u,-.1h); z3=pp(u,0);
-pd z1; pd z3; draw z1--z2--z3; % arc
-endchar;
-
-beginpunkchar(223,18,.3,1); % German SS
-z1=pp(.5w-u,.9h); z2=pp(1/3w,h); z3=pp(u,.7h); z4=.6[z6,z2];
-z5=pp(.5w,.35h); z6=pp(1/3w,u); z7=pp(u,.2h);
-pd z1; pd z7; draw z1--z2...z3..z4..z5...z6--z7; % left stroke
-for i=1 upto 7: z[i+10]=pp(z[i] shifted (.5w-u,0)); endfor
-pd z11; pd z17; draw z11--z12...z13..z14..z15...z16--z17; % right stroke
-endchar;
-
-beginpunkchar("a",13,1,2);
-z1=pp(1.5u,0); z2=(.5w,1.1h); z3=pp(w-1.5u,0);
-pd z1; pd z3; draw z1--z2--z3; % left and right diagonals
-z4=pp .3[z1,z2]; z5=pp .3[z3,z2]; pd z4; pd z5; draw z4--z5; % crossbar
-endchar;
-
-beginpunkchar("b",12,1,1);
-z1=pp(2u,0); z2=pp(2u,.6h); z3=pp(2u,h); pd z1; pd z3; draw z1--z3; % stem
-z1.5=pp(w-u,.5y2); z2.5=pp(w-u,.5[y2,y3]); draw z2--z2.5--z3; % upper lobe
-draw flex(z2,z1.5,z1); % lower lobe
-endchar;
-
-beginpunkchar("c",13,1,2);
-z1=pp(w-2u,.8h); z2=pp(.6w,h); z3=pp(u,.5h); z4=(.6w,0); z5=(w-2u,.2h);
-pd z1; pd z5; draw z1..z2..z3..z4..z5; % arc
-endchar;
-
-beginpunkchar("d",14,1,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-u,.6h);
-pd z1; pd z2; draw flex(z1,z3,z2); % lobe
-draw z1--z2; % stem
-endchar;
-
-beginpunkchar("e",12,.5,1);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-2.5u,h); z4=pp(w-2u,0);
-pd z3; pd z4; draw z4--z1--z2--z3; % stem and arms
-z5=pp(2u,.6h); z6=pp(w-3u,.6h); pd z5; pd z6; draw z5--z6; % crossbar
-endchar;
-
-beginpunkchar("f",12,.5,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-2u,h);
-pd z1; pd z3; draw z1--z2--z3; % stem and arm
-z5=pp(2u,.6h); z6=pp(w-3u,.6h); z4=pp .5[z5,z6]-(0,.1h);
-pd z5; pd z6; draw flex (z5,z4,z6); % crossbar
-endchar;
-
-beginpunkchar("g",13,.5,.5);
-z1=pp(w-2u,.8h); z2=pp(.6w,h); z3=pp(u,.5h); z4=pp(.6w,0); z5=(w-2u,0);
-pd z1; draw z1..z2..z3..z4---z5; % arc
-z6=pp(.5[u,x5],.4h); pd z6; pd z5; draw z6--(pp(x5,y6))--z5; % spur
-endchar;
-
-beginpunkchar("h",14,1,.5);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-2u,0); z4=pp(w-2u,h);
-z5=pp(2u,.6h); z6=pp(w-2u,.6h);
-pd z1; pd z2; pd z3; pd z4; draw z1--z2; draw flex(z3,z6,z4); % stems
-pd z5; draw z5--z6; % crossbar
-endchar;
-
-beginpunkchar("i",5,1,2);
-z1=pp(.5w,0); z2=(.5w,1/3h); z3=(.5w,2/3h); z4=(.5w,h);
-pd z1; pd z4; draw flex(z1,z2,z3,z4); % stem
-endchar;
-
-beginpunkchar("j",9,1,2);
-z1=pp(w-2u,h); z2=pp(w-2u,-.1h); z3=pp(u,0);
-pd z1; pd z3; draw z1--z2--z3; % arc
-endchar;
-
-beginpunkchar("k",14,1,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(2u,1/3h); z4=pp(w-1.5u,h);
-pd z1; pd z2; draw z1--z2; % stem
-pd z3; pd z4; draw z3--z4; % upper diagonal
-z6=pp(w-u,0); z5=1/3[z3,z4];
-pd z6; draw flex(z5,.8[z1,2/3[z5,z6] ],z6);% lower diagonal
-endchar;
-
-beginpunkchar("l",11,1,2);
-z1=pp(2u,h); z2=pp(2u,0); z3=pp(w-1.5u,0);
-pd z1; pd z3; draw z1--z2--z3; % stem and arm
-endchar;
-
-beginpunkchar("m",17,.5,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(.5w,0); z4=pp(w-2u,h); z5=pp(w-2u,0);
-pd z1; pd z5; draw z1--z2--z3--z4--z5; % stems and diagonals
-endchar;
-
-beginpunkchar("n",13,.75,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-2u,0); z4=pp(w-2u,h);
-pd z1; pd z4; draw z1--z2--z3--z4; % stems and diagonals
-endchar;
-
-beginpunkchar("o",12,.5,2);
-z1=pp(.5w,h); z2=pp(u,.55h); z3=pp(.5w,0); z4=pp(w-u,.55h);
-pd z1; draw z1{left}..z2..z3..z4..z1; % bowl
-endchar;
-
-beginpunkchar("p",13,1,2);
-z1=pp(2u,0); z2=pp(2u,1.1h); z3=pp(2u,.5h); z4=pp(w,.6[y3,y2]);
-pd z1; pd z3; draw z1--z2--z4--z3; % stem and bowl
-endchar;
-
-beginpunkchar("q",14,.5,2);
-z1=pp(.5w,h); z2=pp(u,.55h); z3=pp(.5w,0); z4=pp(w-u,.55h);
-pd z1; draw z1{curl 2}..z2..z3..z4..z1; % bowl
-z5=pp(.4w,.2h); z6=pp(w-u,-.1h); z7=pp(.5[x5,x6],-.2h);
-pd z5; pd z6; draw z5--z7--z6; % tail
-endchar;
-
-beginpunkchar("r",16,1,2);
-z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-u,.6[y2,y4]); z4=pp(2u,.5h); z5=pp(w-1.5u,0);
-pd z1; pd z2; pd z5; draw z1--flex(z2,z3,z4)--z5; % stem, bowl, and diagonal
-endchar;
-
-beginpunkchar("s",11,.3,1);
-z1=pp(w-2u,.9h); z2=pp(.5w,h); z3=pp(u,.7h); z4=.6[z6,z2];
-z5=pp(w-u,.35h); z6=pp(.5w,u); z7=pp(u,.2h);
-pd z1; pd z7; draw z1--z2...z3..z4..z5...z6--z7; % stroke
-endchar;
-
-beginpunkchar("t",13,.75,2);
-z1=pp(u,h); z2=pp(w-u,h); z3=pp(.5w,0);
-pd z1; pd z2; pd z3; draw z1--z2; % arms
-draw .5[z1,z2]--z3; % stem
-endchar;
-
-beginpunkchar("u",13,.3,2);
-z1=pp(2u,h); z2=pp(2u,.2h); z3=pp(.5w,0); z4=pp(w-2u,.2h); z5=pp(w-2u,h);
-pd z1; pd z5; draw z1---z2...z3{z4-z2}...z4---z5; % stroke
-endchar;
-
-beginpunkchar("v",13,1,2);
-z1=pp(1.5u,h); z2=pp(.5w,0); z3=pp(w-1.5u,h);
-pd z1; pd z3; draw z1--z2--z3; % diagonals
-endchar;
-
-beginpunkchar("w",18,1,2);
-z1=pp(1.5u,h); z2=pp(.5[x1,x3],0); z3=pp(.5w,.8h); z4=pp(.5[x3,x5],0);
-z5=pp(w-1.5u,h);
-pd z1; pd z5; draw z1--z2--z3--z4--z5; % diagonals
-endchar;
-
-beginpunkchar("x",13,1,1);
-z1=pp(1.5u,h); z2=pp(w-1.5u,0); z3=pp(1.5u,0); z4=pp(w-2.5u,h);
-pd z1; pd z2; draw z1--z2; % main diagonal
-pd z3; pd z4; draw z3--z4; % cross diagonal
-endchar;
-
-beginpunkchar("y",13,1,2);
-z1=pp(1.5u,h); z2=pp(w-1.5u,h); z3=pp(.5w,.5h); z4=pp(.5w,0);
-pd z1; pd z2; pd z4; draw z1--z3--z4; % stem and left diagonal
-draw z2--z3; % right diagonal
-endchar;
-
-beginpunkchar("z",11,1,2);
-z1=pp(1.5u,h); z2=pp(w-2.5u,h); z3=pp(1.5u,0); z4=pp(w-1.5u,0);
-pd z1; pd z4; draw z1--z2--z3--z4; % diagonals
-endchar;
-
-beginpunkchar(230,16,1,2); % \ae
-z1=pp(1.5u,0); z2=pp(.6w,h); z3=pp(w-1.5u,h);
-pd z1; pd z3; draw z1--z2--z3; % left diagonal and upper arm
-z4=pp .3[z1,z2]; z5=pp(.6w,0); z6=pp(w-2u,.3h);
-pd z4; pd z6; draw z4--z6; % crossbar
-z7=pp(w-u,0); pd z2; pd z7; draw z2--z5--z7; % stem and lower arm
-endchar;
-
-beginpunkchar(339,18,1,2); % \oe
-z1=pp(.5w,h); z2=pp(u,.4h); z3=pp(.5w,0);
-pd z1; draw z1..z2..{right}z3; % bowl
-z4=pp(w-1.5u,h); z5=pp(w-2u,.4h); z6=pp(w-u,0);
-pd z4; pd z6; draw z4--z1--z3--z6; % arms and stem
-pd z5; draw z5--.4[z3,z1]; % crossbar
-endchar;
-
-beginpunkchar(248,14,1,1); % \o
-z1=pp(.5w,h); z2=pp(u,.5h); z3=pp(.5w,0); z4=pp(w-u,.5h);
-z5=pp(w-2u,1.1h); z6=pp(2u,-.1h);
-pd z1; pd z6; draw z1..z2..z3..z4..z5--z6; % bowl and diagonal
-endchar;
-
-revert_punk_lower;
-
-beginpunkchar("_",12,.5,.5); % _
-z1=pp(0,-.2h); z2=pp(w,-.2h); pd z1; pd z2; draw z1--z2; % bar
-endchar;
-
-beginpunkchar("^",12,1,.5); %
-z1=pp(.5w,h); z2=pp(1.5u,.6h); z3=pp(w-1.5u,.6h);
-pd z2; pd z3; draw z2--z1--z3;
-endchar;
diff --git a/metapost/context/font/punkfont-definitions.mp b/metapost/context/font/punkfont-definitions.mp
deleted file mode 100644
index 2901a9d03..000000000
--- a/metapost/context/font/punkfont-definitions.mp
+++ /dev/null
@@ -1,115 +0,0 @@
-% Remark:
-%
-% This file is a merge of the original punk files by Donald Knuth, who
-% added this comment:
-%
-% Font inspired by Gerard and Marjan Unger's lectures, Feb 1985
-%
-% The regular punk files are part of TeXLive and in metafont format. All
-% errors introduced are ours. We also changed the encoding to unicode. In
-% due time we might add a few more more characters. We still need to
-% improve some of the metrics which involves a bit of trial and error. The
-% font just covers basic latin shapes but in ConTeXt MkIV we add virtual
-% composed shapes. There is a module m-punk.tex that implements this. This
-% derivate is also used in mk.tex (mk.pdf) which is one of our tests for
-% LuaTeX. We published an article on it in the MAPS (NTG magazine).
-%
-% 2008, Taco Hoekwater & Hans Hagen
-
-if unknown punk_font_loaded :
-
- if unknown scale_factor :
- scale_factor := 1 ;
- fi ;
-
- boolean punk_font_loaded ;
-
- punk_font_loaded := true ;
- warningcheck := 0 ;
- proofing := 0 ;
- designsize := 10pt#;
- font_identifier := "Punk Nova" ; % dedicated to Don Knuth and Hermann Zapf
-
- ht# := 7pt# ; % height of characters
- u# := 1/4pt# ; % unit width
- dev# := .3pt# ; % standard deviation of punk points
-
- if known bold_punk :
- s# := 1.2pt# ; % extra sidebar
- px# := 1pt# ; % horizontal thickness of pen
- py# := .8pt# ; % vertical thickness of pen
- dot# := 1.7pt# ; % diameter of dots
- else :
- s# := 0 ; % extra sidebar, ok
- px# := .6pt# ; % horizontal thickness of pen
- py# := .5pt# ; % vertical thickness of pen
- dot# := 1.3pt# ; % diameter of dots
- fi ;
-
- pt := .1pt ;
- mag := scale_factor * 10 ;
- bp_per_pixel := bpppix_ * mag ;
-
- define_pixels(u,dev) ;
- define_blacker_pixels(px,py,dot) ;
- define_whole_pixels(s) ;
- xoffset := s ;
-
- pickup pencircle xscaled px yscaled py ;
- punk_pen := savepen ;
- pickup pencircle scaled dot ;
- path dot_pen_path ;
- dot_pen_path := tensepath makepath currentpen ;
-
- defaultcolormodel := 1 ;
-
- if known slanted_punk :
- dot_pen_path := dot_pen_path slanted -0.25 ;
- extra_endchar := extra_endchar & "currentpicture := currentpicture slanted 0.25 ;" ;
- fi ;
-
-
- def beginpunkchar(expr c,n,h,v) = % code $c$; width is $n$ units
- hdev := h * dev ; % modify horizontal amounts of deviation
- vdev := v * dev ; % modify vertical amounts of deviation
- beginchar(c,n*u#,ht#,0) ;
- italcorr 0 ;
- % italcorr ht#*slant;
- pickup punk_pen
- enddef ;
-
- def ^ =
- transformed currenttransform
- enddef ;
-
- def makebox(text rule) =
- for y=0, h : % horizontals
- rule((-s,y)^,(w-s,y)^) ;
- endfor
- for x=-s, 0, w-2s, w-s : % verticals
- rule((x,0)^,(x,h)^) ;
- endfor
- enddef ;
-
- rulepen := pensquare ;
-
- vardef pp expr z =
- z + (hdev * normaldeviate, vdev * normaldeviate)
- enddef;
-
- def pd expr z = % {\bf drawdot}
- addto currentpicture contour dot_pen_path shifted z.t_ % withpen penspeck
- enddef;
-
- def initialize_punk_upper =
- ht# := 7pt# ; dev# := .3pt# ;
- enddef ;
- def initialize_punk_lower =
- sht# := ht#; sdev := dev;
- ht# := .6ht# ; dev := .7dev ;
- enddef ;
- def revert_punk_lower =
- ht# := sht#; dev := sdev;
- enddef ;
-
-fi ;
diff --git a/metapost/context/font/punkfont-slanted.mp b/metapost/context/font/punkfont-slanted.mp
deleted file mode 100644
index 5c1ff46b2..000000000
--- a/metapost/context/font/punkfont-slanted.mp
+++ /dev/null
@@ -1,4 +0,0 @@
-boolean slanted_punk ; slanted_punk := true ;
-
-input "punkfont-definitions.mp" ;
-input "punkfont-characters.mp" ;
diff --git a/metapost/context/font/punkfont.mp b/metapost/context/font/punkfont.mp
deleted file mode 100644
index 2a03aae81..000000000
--- a/metapost/context/font/punkfont.mp
+++ /dev/null
@@ -1,2 +0,0 @@
-input "punkfont-definitions.mp" ;
-input "punkfont-characters.mp" ;
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 5d4ac2c22..c304ca14a 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -5737,7 +5737,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sto"] = package.loaded["util-sto"] or true
--- original size: 4432, stripped down to: 3123
+-- original size: 4172, stripped down to: 2953
if not modules then modules={} end modules ['util-sto']={
version=1.001,
@@ -5807,56 +5807,47 @@ end
local function f_empty () return "" end
local function f_self (t,k) t[k]=k return k end
local function f_table (t,k) local v={} t[k]=v return v end
+local function f_number(t,k) t[k]=0 return 0 end
local function f_ignore() end
-local t_empty={ __index=f_empty }
-local t_self={ __index=f_self }
-local t_table={ __index=f_table }
-local t_ignore={ __newindex=f_ignore }
+local f_index={
+ ["empty"]=f_empty,
+ ["self"]=f_self,
+ ["table"]=f_table,
+ ["number"]=f_number,
+}
+local t_index={
+ ["empty"]={ __index=f_empty },
+ ["self"]={ __index=f_self },
+ ["table"]={ __index=f_table },
+ ["number"]={ __index=f_number },
+}
function table.setmetatableindex(t,f)
if type(t)~="table" then
f,t=t,{}
end
local m=getmetatable(t)
if m then
- if f=="empty" then
- m.__index=f_empty
- elseif f=="key" then
- m.__index=f_self
- elseif f=="table" then
- m.__index=f_table
- else
- m.__index=f
- end
+ m.__index=f_index[f] or f
else
- if f=="empty" then
- setmetatable(t,t_empty)
- elseif f=="key" then
- setmetatable(t,t_self)
- elseif f=="table" then
- setmetatable(t,t_table)
- else
- setmetatable(t,{ __index=f })
- end
+ setmetatable(t,t_index[f] or { __index=f })
end
return t
end
+local f_index={
+ ["ignore"]=f_ignore,
+}
+local t_index={
+ ["ignore"]={ __newindex=f_ignore },
+}
function table.setmetatablenewindex(t,f)
if type(t)~="table" then
f,t=t,{}
end
local m=getmetatable(t)
if m then
- if f=="ignore" then
- m.__newindex=f_ignore
- else
- m.__newindex=f
- end
+ m.__newindex=f_index[f] or f
else
- if f=="ignore" then
- setmetatable(t,t_ignore)
- else
- setmetatable(t,{ __newindex=f })
- end
+ setmetatable(t,t_index[f] or { __newindex=f })
end
return t
end
@@ -16391,8 +16382,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 669894
--- stripped bytes : 235432
+-- original bytes : 669634
+-- stripped bytes : 235342
-- end library merge
@@ -16560,11 +16551,9 @@ end
-- verbosity
-local e_verbose = environment.arguments["verbose"]
+----- e_verbose = environment.arguments["verbose"]
-if e_verbose then
- trackers.enable("resolvers.locating")
-end
+local e_verbose = false
-- some common flags (also passed through environment)
@@ -17285,6 +17274,12 @@ environment.initializearguments(before)
instance.lsrmode = environment.argument("lsr") or false
+e_verbose = environment.arguments["verbose"] -- delayed till here (we need the ones before script)
+
+if e_verbose then
+ trackers.enable("resolvers.locating")
+end
+
-- maybe the unset has to go to this level
local is_mkii_stub = runners.registered[file.removesuffix(file.basename(filename))]
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 5d4ac2c22..c304ca14a 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -5737,7 +5737,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sto"] = package.loaded["util-sto"] or true
--- original size: 4432, stripped down to: 3123
+-- original size: 4172, stripped down to: 2953
if not modules then modules={} end modules ['util-sto']={
version=1.001,
@@ -5807,56 +5807,47 @@ end
local function f_empty () return "" end
local function f_self (t,k) t[k]=k return k end
local function f_table (t,k) local v={} t[k]=v return v end
+local function f_number(t,k) t[k]=0 return 0 end
local function f_ignore() end
-local t_empty={ __index=f_empty }
-local t_self={ __index=f_self }
-local t_table={ __index=f_table }
-local t_ignore={ __newindex=f_ignore }
+local f_index={
+ ["empty"]=f_empty,
+ ["self"]=f_self,
+ ["table"]=f_table,
+ ["number"]=f_number,
+}
+local t_index={
+ ["empty"]={ __index=f_empty },
+ ["self"]={ __index=f_self },
+ ["table"]={ __index=f_table },
+ ["number"]={ __index=f_number },
+}
function table.setmetatableindex(t,f)
if type(t)~="table" then
f,t=t,{}
end
local m=getmetatable(t)
if m then
- if f=="empty" then
- m.__index=f_empty
- elseif f=="key" then
- m.__index=f_self
- elseif f=="table" then
- m.__index=f_table
- else
- m.__index=f
- end
+ m.__index=f_index[f] or f
else
- if f=="empty" then
- setmetatable(t,t_empty)
- elseif f=="key" then
- setmetatable(t,t_self)
- elseif f=="table" then
- setmetatable(t,t_table)
- else
- setmetatable(t,{ __index=f })
- end
+ setmetatable(t,t_index[f] or { __index=f })
end
return t
end
+local f_index={
+ ["ignore"]=f_ignore,
+}
+local t_index={
+ ["ignore"]={ __newindex=f_ignore },
+}
function table.setmetatablenewindex(t,f)
if type(t)~="table" then
f,t=t,{}
end
local m=getmetatable(t)
if m then
- if f=="ignore" then
- m.__newindex=f_ignore
- else
- m.__newindex=f
- end
+ m.__newindex=f_index[f] or f
else
- if f=="ignore" then
- setmetatable(t,t_ignore)
- else
- setmetatable(t,{ __newindex=f })
- end
+ setmetatable(t,t_index[f] or { __newindex=f })
end
return t
end
@@ -16391,8 +16382,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 669894
--- stripped bytes : 235432
+-- original bytes : 669634
+-- stripped bytes : 235342
-- end library merge
@@ -16560,11 +16551,9 @@ end
-- verbosity
-local e_verbose = environment.arguments["verbose"]
+----- e_verbose = environment.arguments["verbose"]
-if e_verbose then
- trackers.enable("resolvers.locating")
-end
+local e_verbose = false
-- some common flags (also passed through environment)
@@ -17285,6 +17274,12 @@ environment.initializearguments(before)
instance.lsrmode = environment.argument("lsr") or false
+e_verbose = environment.arguments["verbose"] -- delayed till here (we need the ones before script)
+
+if e_verbose then
+ trackers.enable("resolvers.locating")
+end
+
-- maybe the unset has to go to this level
local is_mkii_stub = runners.registered[file.removesuffix(file.basename(filename))]
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 5d4ac2c22..c304ca14a 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -5737,7 +5737,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sto"] = package.loaded["util-sto"] or true
--- original size: 4432, stripped down to: 3123
+-- original size: 4172, stripped down to: 2953
if not modules then modules={} end modules ['util-sto']={
version=1.001,
@@ -5807,56 +5807,47 @@ end
local function f_empty () return "" end
local function f_self (t,k) t[k]=k return k end
local function f_table (t,k) local v={} t[k]=v return v end
+local function f_number(t,k) t[k]=0 return 0 end
local function f_ignore() end
-local t_empty={ __index=f_empty }
-local t_self={ __index=f_self }
-local t_table={ __index=f_table }
-local t_ignore={ __newindex=f_ignore }
+local f_index={
+ ["empty"]=f_empty,
+ ["self"]=f_self,
+ ["table"]=f_table,
+ ["number"]=f_number,
+}
+local t_index={
+ ["empty"]={ __index=f_empty },
+ ["self"]={ __index=f_self },
+ ["table"]={ __index=f_table },
+ ["number"]={ __index=f_number },
+}
function table.setmetatableindex(t,f)
if type(t)~="table" then
f,t=t,{}
end
local m=getmetatable(t)
if m then
- if f=="empty" then
- m.__index=f_empty
- elseif f=="key" then
- m.__index=f_self
- elseif f=="table" then
- m.__index=f_table
- else
- m.__index=f
- end
+ m.__index=f_index[f] or f
else
- if f=="empty" then
- setmetatable(t,t_empty)
- elseif f=="key" then
- setmetatable(t,t_self)
- elseif f=="table" then
- setmetatable(t,t_table)
- else
- setmetatable(t,{ __index=f })
- end
+ setmetatable(t,t_index[f] or { __index=f })
end
return t
end
+local f_index={
+ ["ignore"]=f_ignore,
+}
+local t_index={
+ ["ignore"]={ __newindex=f_ignore },
+}
function table.setmetatablenewindex(t,f)
if type(t)~="table" then
f,t=t,{}
end
local m=getmetatable(t)
if m then
- if f=="ignore" then
- m.__newindex=f_ignore
- else
- m.__newindex=f
- end
+ m.__newindex=f_index[f] or f
else
- if f=="ignore" then
- setmetatable(t,t_ignore)
- else
- setmetatable(t,{ __newindex=f })
- end
+ setmetatable(t,t_index[f] or { __newindex=f })
end
return t
end
@@ -16391,8 +16382,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 669894
--- stripped bytes : 235432
+-- original bytes : 669634
+-- stripped bytes : 235342
-- end library merge
@@ -16560,11 +16551,9 @@ end
-- verbosity
-local e_verbose = environment.arguments["verbose"]
+----- e_verbose = environment.arguments["verbose"]
-if e_verbose then
- trackers.enable("resolvers.locating")
-end
+local e_verbose = false
-- some common flags (also passed through environment)
@@ -17285,6 +17274,12 @@ environment.initializearguments(before)
instance.lsrmode = environment.argument("lsr") or false
+e_verbose = environment.arguments["verbose"] -- delayed till here (we need the ones before script)
+
+if e_verbose then
+ trackers.enable("resolvers.locating")
+end
+
-- maybe the unset has to go to this level
local is_mkii_stub = runners.registered[file.removesuffix(file.basename(filename))]
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 8db1b0581..1a8290c6b 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.09.11 15:37}
+\newcontextversion{2013.09.12 11:48}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index d5a5ba2df..e05b9e104 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index d573388e0..a51acafeb 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -3,7 +3,7 @@
%D version=2008.28.10, % 1995.10.10,
%D title=\CONTEXT,
%D subtitle=\CONTEXT\ Format Generation,
-%D author=Hans Hagen,
+%D author=Hans Hagen, % ɦɑns ɦɑˈχən
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.09.11 15:37}
+\edef\contextversion{2013.09.12 11:48}
\edef\contextkind {beta}
%D For those who want to use this:
@@ -404,6 +404,7 @@
\loadmarkfile{meta-fun}
\loadmarkfile{meta-pag}
\loadmarkfile{meta-grd}
+%loadmarkfile{meta-fnt}
\loadmarkfile{page-mrk} % depends on mp
diff --git a/tex/context/base/font-syn.lua b/tex/context/base/font-syn.lua
index 77aeec553..f676b5952 100644
--- a/tex/context/base/font-syn.lua
+++ b/tex/context/base/font-syn.lua
@@ -12,13 +12,14 @@ local next, tonumber, type, tostring = next, tonumber, type, tostring
local sub, gsub, lower, match, find, lower, upper = string.sub, string.gsub, string.lower, string.match, string.find, string.lower, string.upper
local find, gmatch = string.find, string.gmatch
local concat, sort, format = table.concat, table.sort, string.format
-local serialize = table.serialize
+local serialize, sortedhash = table.serialize, table.sortedhash
local lpegmatch = lpeg.match
local unpack = unpack or table.unpack
local formatters, topattern = string.formatters, string.topattern
local allocate = utilities.storage.allocate
local sparse = utilities.storage.sparse
+local setmetatableindex = table.setmetatableindex
local removesuffix = file.removesuffix
local splitbase = file.splitbase
@@ -40,7 +41,7 @@ local trace_names = false trackers.register("fonts.names", fu
local trace_warnings = false trackers.register("fonts.warnings", function(v) trace_warnings = v end)
local trace_specifications = false trackers.register("fonts.specifications", function(v) trace_specifications = v end)
-local report_names = logs.reporter("fonts","names")
+local report_names = logs.reporter("fonts","names")
--[[ldx--
<p>This module implements a name to filename resolver. Names are resolved
@@ -57,7 +58,7 @@ names.filters = filters
names.data = names.data or allocate { }
-names.version = 1.120
+names.version = 1.123
names.basename = "names"
names.saved = false
names.loaded = false
@@ -92,7 +93,8 @@ local weights = Cs ( -- not extra
+ P("heavy")
+ P("ultra")
+ P("black")
- + P("bol") -- / "bold"
+--+ P("bol") / "bold" -- blocks
+ + P("bol")
+ P("regular") / "normal"
)
@@ -107,8 +109,8 @@ local styles = Cs (
+ P("oblique") / "italic"
+ P("slanted")
+ P("roman") / "normal"
- + P("ital") / "italic"
- + P("ita") / "italic"
+ + P("ital") / "italic" -- might be tricky
+ + P("ita") / "italic" -- might be tricky
)
local normalized_styles = sparse {
@@ -180,6 +182,28 @@ names.knownvariants = {
"smallcaps",
}
+local remappedweights = {
+ [""] = "normal",
+ ["bol"] = "bold",
+}
+
+local remappedstyles = {
+ [""] = "normal",
+}
+
+local remappedwidths = {
+ [""] = "normal",
+}
+
+local remappedvariants = {
+ [""] = "normal",
+}
+
+names.remappedweights = remappedweights setmetatableindex(remappedweights ,"self")
+names.remappedstyles = remappedstyles setmetatableindex(remappedstyles ,"self")
+names.remappedwidths = remappedwidths setmetatableindex(remappedwidths ,"self")
+names.remappedvariants = remappedvariants setmetatableindex(remappedvariants,"self")
+
local any = P(1)
local analyzed_table
@@ -465,6 +489,16 @@ local function check_name(data,result,filename,modification,suffix,subfont)
fontname = fontname or fullname or familyname or filebase -- maybe cleanfilename
fullname = fullname or fontname
familyname = familyname or fontname
+ -- we do these sparse
+ local units = result.units_per_em or 1000
+ local minsize = result.design_range_bottom or 0
+ local maxsize = result.design_range_top or 0
+ local designsize = result.design_size or 0
+ local angle = result.italicangle or 0
+ local pfminfo = result.pfminfo
+ local pfmwidth = pfminfo and pfminfo.width or 0
+ local pfmweight = pfminfo and pfminfo.weight or 0
+ --
specifications[#specifications + 1] = {
filename = filename, -- unresolved
cleanfilename = cleanfilename,
@@ -480,10 +514,14 @@ local function check_name(data,result,filename,modification,suffix,subfont)
style = style,
width = width,
variant = variant,
- minsize = result.design_range_bottom or 0,
- maxsize = result.design_range_top or 0,
- designsize = result.design_size or 0,
- modification = modification or 0,
+ units = units ~= 1000 and unit or nil,
+ pfmwidth = pfmwidth ~= 0 and pfmwidth or nil,
+ pfmweight = pfmweight ~= 0 and pfmweight or nil,
+ angle = angle ~= 0 and angle or nil,
+ minsize = minsize ~= 0 and minsize or nil,
+ maxsize = maxsize ~= 0 and maxsize or nil,
+ designsize = designsize ~= 0 and designsize or nil,
+ modification = modification ~= 0 and modification or nil,
}
end
@@ -507,10 +545,10 @@ local function cleanupkeywords()
local style = b_style or c_style or d_style or e_style or f_style or "normal"
local width = b_width or c_width or d_width or e_width or f_width or "normal"
local variant = b_variant or c_variant or d_variant or e_variant or f_variant or "normal"
- if not weight or weight == "" then weight = "normal" end
- if not style or style == "" then style = "normal" end
- if not width or width == "" then width = "normal" end
- if not variant or variant == "" then variant = "normal" end
+ weight = remappedweights [weight or ""]
+ style = remappedstyles [style or ""]
+ width = remappedwidths [width or ""]
+ variant = remappedvariants[variant or ""]
weights [weight ] = (weights [weight ] or 0) + 1
styles [style ] = (styles [style ] or 0) + 1
widths [width ] = (widths [width ] or 0) + 1
@@ -529,12 +567,22 @@ local function collectstatistics()
local data = names.data
local specifications = data.specifications
if specifications then
- local weights = { }
- local styles = { }
- local widths = { }
- local variants = { }
+ local f_w = formatters["%i"]
+ local f_a = formatters["%0.2f"]
+ -- normal stuff
+ local weights = { }
+ local styles = { }
+ local widths = { }
+ local variants = { }
+ -- weird stuff
+ local angles = { }
+ -- extra stuff
+ local pfmweights = { } setmetatableindex(pfmweights,"table")
+ local pfmwidths = { } setmetatableindex(pfmwidths, "table")
+ -- main loop
for i=1,#specifications do
- local s = specifications[i]
+ local s = specifications[i]
+ -- normal stuff
local weight = s.weight
local style = s.style
local width = s.width
@@ -543,13 +591,64 @@ local function collectstatistics()
if style then styles [style ] = (styles [style ] or 0) + 1 end
if width then widths [width ] = (widths [width ] or 0) + 1 end
if variant then variants[variant] = (variants[variant] or 0) + 1 end
- end
- local stats = data.statistics
- stats.weights = weights
- stats.styles = styles
- stats.widths = widths
- stats.variants = variants
- stats.fonts = #specifications
+ -- weird stuff
+ local angle = f_a(s.angle or 0)
+ angles[angle] = (angles[angles] or 0) + 1
+ -- extra stuff
+ local pfmweight = f_w(s.pfmweight or 0)
+ local pfmwidth = f_w(s.pfmwidth or 0)
+ local tweights = pfmweights[pfmweight]
+ local twidths = pfmwidths [pfmwidth]
+ tweights[pfmweight] = (tweights[pfmweight] or 0) + 1
+ twidths[pfmwidth] = (twidths [pfmwidth] or 0) + 1
+ end
+ --
+ local stats = data.statistics
+ stats.weights = weights
+ stats.styles = styles
+ stats.widths = widths
+ stats.variants = variants
+ stats.angles = angles
+ stats.pfmweights = pfmweights
+ stats.pfmwidths = pfmwidths
+ stats.fonts = #specifications
+ --
+ setmetatableindex(pfmweights,nil)
+ setmetatableindex(pfmwidths, nil)
+ --
+ report_names("")
+ report_names("weights")
+ report_names("")
+ report_names(formatters[" %T"](weights))
+ report_names("")
+ report_names("styles")
+ report_names("")
+ report_names(formatters[" %T"](styles))
+ report_names("")
+ report_names("widths")
+ report_names("")
+ report_names(formatters[" %T"](widths))
+ report_names("")
+ report_names("variants")
+ report_names("")
+ report_names(formatters[" %T"](variants))
+ report_names("")
+ report_names("angles")
+ report_names("")
+ report_names(formatters[" %T"](angles))
+ report_names("")
+ report_names("pfmweights")
+ report_names("")
+ for k, v in sortedhash(pfmweights) do
+ report_names(formatters[" %-10s: %T"](k,v))
+ end
+ report_names("")
+ report_names("pfmwidths")
+ report_names("")
+ for k, v in sortedhash(pfmwidths) do
+ report_names(formatters[" %-10s: %T"](k,v))
+ end
+ report_names("")
end
end
@@ -613,8 +712,11 @@ local function checkduplicate(where) -- fails on "Romantik" but that's a border
local specifications = data.specifications
local loaded = { }
if specifications and mapping then
- for _, m in next, mapping do
- for k, v in next, m do
+ -- was: for _, m in sortedhash(mapping) do
+ local order = filters.list
+ for i=1,#order do
+ local m = mapping[order[i]]
+ for k, v in sortedhash(m) do
local s = specifications[v]
local hash = formatters["%s-%s-%s-%s-%s"](s.familyname,s.weight or "*",s.style or "*",s.width or "*",s.variant or "*")
local h = loaded[hash]
@@ -638,7 +740,7 @@ local function checkduplicate(where) -- fails on "Romantik" but that's a border
end
end
local n = 0
- for k, v in table.sortedhash(loaded) do
+ for k, v in sortedhash(loaded) do
local nv = #v
if nv > 1 then
if trace_warnings then
@@ -959,12 +1061,13 @@ function names.identify(force)
analyzefiles(not force and names.readdata(names.basename))
rejectclashes()
collectfamilies()
- collectstatistics()
+ -- collectstatistics()
cleanupkeywords()
collecthashes()
checkduplicates()
addfilenames()
-- sorthashes() -- will be resorted when saved
+ collectstatistics()
report_names("total scan time %0.3f seconds",os.gettimeofday()-starttime)
end
@@ -1823,8 +1926,8 @@ end
--
-- for i=1,#specifications do
-- local s = specifications[i]
--- local min = s.minsize
--- local max = s.maxsize
+-- local min = s.minsize or 0
+-- local max = s.maxsize or 0
-- if min ~= 0 or max ~= 0 then
-- -- the usual name mess:
-- -- antykwa has modifiers so we need to take these into account, otherwise we get weird combinations
diff --git a/tex/context/base/math-fen.mkiv b/tex/context/base/math-fen.mkiv
index a7f5b2188..00837a607 100644
--- a/tex/context/base/math-fen.mkiv
+++ b/tex/context/base/math-fen.mkiv
@@ -128,6 +128,7 @@
\definemathfence [bar] [\c!left="007C,\c!right="007C]
\definemathfence [doublebar] [\c!left="2016,\c!right="2016]
\definemathfence [angle] [\c!left="003C,\c!right="003E]
+\definemathfence [solidus] [\c!left="2044,\c!right="2044]
\definemathfence [nothing]
%D A bonus:
@@ -137,6 +138,7 @@
\unexpanded\def\Lbrace {\math_fenced_fenced_start{brace}} \unexpanded\def\Rbrace {\math_fenced_fenced_stop{brace}}
\unexpanded\def\Langle {\math_fenced_fenced_start{angle}} \unexpanded\def\Rangle {\math_fenced_fenced_stop{angle}}
\unexpanded\def\Lbar {\math_fenced_fenced_start{bar}} \unexpanded\def\Rbar {\math_fenced_fenced_stop{bar}}
+\unexpanded\def\Lsolidus {\math_fenced_fenced_start{solidus}} \unexpanded\def\Rsolidus {\math_fenced_fenced_stop{solidus}}
\unexpanded\def\Ldoublebar {\math_fenced_fenced_start{doublebar}} \unexpanded\def\Rdoublebar{\math_fenced_fenced_stop{doublebar}}
\unexpanded\def\Lnothing {\math_fenced_fenced_start{nothing}} \unexpanded\def\Rnothing {\math_fenced_fenced_stop{nothing}}
@@ -191,6 +193,7 @@
\expandafter\let\csname\??mathleft\meaning <\endcsname\Langle
\expandafter\let\csname\??mathleft\meaning {\endcsname\Lbrace
\expandafter\let\csname\??mathleft\meaning |\endcsname\Lbar
+\expandafter\let\csname\??mathleft\meaning /\endcsname\Lsolidus
\expandafter\let\csname\??mathleft\meaning ‖\endcsname\Ldoublebar
\expandafter\let\csname\??mathleft\meaning .\endcsname\Lnothing
@@ -199,6 +202,7 @@
\expandafter\let\csname\??mathright\meaning >\endcsname\Rangle
\expandafter\let\csname\??mathright\meaning }\endcsname\Rbrace
\expandafter\let\csname\??mathright\meaning |\endcsname\Rbar
+\expandafter\let\csname\??mathright\meaning /\endcsname\Rsolidus
\expandafter\let\csname\??mathright\meaning ‖\endcsname\Rdoublebar
\expandafter\let\csname\??mathright\meaning .\endcsname\Rnothing
@@ -211,6 +215,7 @@
\installmathfencepair \langle \Langle \rangle \Rangle
%installmathfencepair \lbar \Lbar \rbar \Rbar
\installmathfencepair \vert \Lbar \vert \Rbar
+\installmathfencepair \solidus \Lsolidus \solidus \Rsolidus
\unexpanded\def\{{\mathortext\lbrace \letterleftbrace } % or maybe a chardef
\unexpanded\def\}{\mathortext\rbrace \letterrightbrace } % or maybe a chardef
@@ -219,6 +224,7 @@
\unexpanded\def\({\mathortext\lparent \letterleftparent } % or maybe a chardef
\unexpanded\def\){\mathortext\rparent \letterrightparent } % or maybe a chardef
\unexpanded\def\|{\mathortext\vert \letterbar } % or maybe a chardef
+%unexpanded\def\/{\mathortext\solidus \letterslash } % or maybe a chardef
\installmathfencepair \{ \Lbrace \} \Rbrace
\installmathfencepair \[ \Lbracket \] \Rbracket
diff --git a/tex/context/base/meta-fnt.lua b/tex/context/base/meta-fnt.lua
new file mode 100644
index 000000000..75d8f2699
--- /dev/null
+++ b/tex/context/base/meta-fnt.lua
@@ -0,0 +1,233 @@
+if not modules then modules = { } end modules ['meta-fnt'] = {
+ version = 1.001,
+ comment = "companion to meta-fnt.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local concat = table.concat
+local format = string.format
+local formatters = string.formatters
+local chardata = characters.data
+local fontdata = fonts.hashes.identifiers
+
+local vffonts = fonts.handlers.vf
+
+local mpfonts = fonts.mp or { }
+fonts.mp = mpfonts
+
+mpfonts.version = mpfonts.version or 1.20
+mpfonts.inline = true
+mpfonts.cache = containers.define("fonts", "mp", mpfonts.version, true)
+
+metapost.fonts = metapost.fonts or { }
+
+-- a few glocals
+
+local characters, descriptions = { }, { }
+local factor, code, slot, width, height, depth, total, variants = 100, { }, 0, 0, 0, 0, 0, 0, true
+
+-- A next version of mplib will provide the tfm font information which
+-- gives better glyph dimensions, plus additional kerning information.
+
+local flusher = {
+ startfigure = function(chrnum,llx,lly,urx,ury)
+ code = { }
+ slot = chrnum
+ width = urx - llx
+ height = ury
+ depth = -lly
+ total = total + 1
+ inline = mpfonts.inline
+ end,
+ flushfigure = function(t)
+ for i=1,#t do
+ code[#code+1] = t[i]
+ end
+ end,
+ stopfigure = function()
+ local cd = chardata[n]
+ descriptions[slot] = {
+ -- unicode = slot,
+ name = cd and cd.adobename,
+ width = width * 100,
+ height = height * 100,
+ depth = depth * 100,
+ boundingbox = { 0, -depth, width, height },
+ }
+ if inline then
+ characters[slot] = {
+ commands = {
+ { "special", "pdf: " .. concat(code," ") },
+ }
+ }
+ else
+ characters[slot] = {
+ commands = {
+ {
+ "image",
+ {
+ stream = concat(code," "),
+ bbox = { 0, -depth * 65536, width * 65536, height * 65536 }
+ },
+ },
+ }
+ }
+ end
+ end
+}
+
+local function process(mpxformat,name,instances,scalefactor)
+ statistics.starttiming(metapost.fonts)
+ scalefactor = scalefactor or 1
+ instances = instances or metapost.fonts.instances or 1
+ local fontname = file.removesuffix(file.basename(name))
+ local hash = file.robustname(formatters["%s %05i %03i"](fontname,scalefactor*1000,instances))
+ local lists = containers.read(mpfonts.cache,hash)
+ if not lists or lists.version ~= version then
+ statistics.starttiming(flusher)
+ local data = io.loaddata(resolvers.findfile(name))
+ metapost.reset(mpxformat)
+ metapost.setoutercolor(2) -- no outer color and no reset either
+ lists = { }
+ for i=1,instances do
+ characters = { }
+ descriptions = { }
+ metapost.process(
+ mpxformat,
+ {
+ formatters["randomseed := %s ;"](i*10),
+ formatters["charscale := %s ;"](scalefactor),
+ data,
+ },
+ false,
+ flusher,
+ false,
+ false,
+ "all"
+ )
+ lists[i] = {
+ characters = characters,
+ descriptions = descriptions,
+ parameters = {
+ designsize = 655360,
+ slant = 0,
+ space = 333 * scalefactor,
+ space_stretch = 166.5 * scalefactor,
+ space_shrink = 111 * scalefactor,
+ x_height = 431 * scalefactor,
+ quad = 1000 * scalefactor,
+ extra_space = 0,
+ },
+ properties = {
+ name = formatters["%s-%03i"](hash,i),
+ virtualized = true,
+ spacer = "space",
+ }
+ }
+ end
+ lists.version = metapost.variables.fontversion or "1.000"
+ metapost.reset(mpxformat) -- saves memory
+ lists = containers.write(mpfonts.cache, hash, lists)
+ statistics.stoptiming(flusher)
+ end
+ variants = variants + #lists
+ statistics.stoptiming(metapost.fonts)
+ return lists
+end
+
+metapost.fonts.flusher = flusher
+metapost.fonts.instances = 1
+metapost.fonts.process = process
+
+local function build(g,v)
+ local size = g.specification.size
+ local data = process(v[2],v[3],v[4],size/655360,v[6])
+ local list = { }
+ local t = { }
+ for d=1,#data do
+ t = fonts.constructors.scale(data[d],-1000)
+ local id = font.nextid()
+ t.fonts = { { id = id } }
+ fontdata[id] = t
+ if v[5] then
+ vffonts.helpers.composecharacters(t)
+ end
+ list[d] = font.define(t)
+ end
+ for k, v in next, t do -- last t
+ g[k] = v -- kind of replace, when not present, make nil
+ end
+ g.properties.virtualized = true
+ g.variants = list
+end
+
+vffonts.combiner.commands.metapost = build
+vffonts.combiner.commands.metafont = build
+
+statistics.register("metapost font generation", function()
+ local time = statistics.elapsedtime(flusher)
+ if total > 0 then
+ return format("%i glyphs, %.3f seconds runtime, %i glyphs/second", total, time, total/time)
+ else
+ return format("%i glyphs, %.3f seconds runtime", total, time)
+ end
+end)
+
+statistics.register("metapost font loading",function()
+ local time = statistics.elapsedtime(metapost.fonts)
+ if variants > 0 then
+ return format("%.3f seconds, %i instances, %0.3f instances/second", time, variants, variants/time)
+ else
+ return format("%.3f seconds, %i instances", time, variants)
+ end
+end)
+
+-- fonts.definers.methods.install( "bidi", {
+-- {
+-- "metapost", -- method
+-- "metafun", -- format
+-- "fontoeps.mp", -- filename
+-- 1, -- instances
+-- false, -- compose
+-- },
+-- } )
+
+local report = logs.reporter("metapost","fonts")
+
+function metapost.fonts.define(specification)
+ local fontname = specification.fontname or ""
+ local filename = specification.filename or ""
+ local format = specification.format or "metafun"
+ if fontname == "" then
+ report("no fontname given")
+ return
+ end
+ if filename == "" then
+ report("no filename given for %a",fontname)
+ return
+ end
+ local fullname = resolvers.findfile(filename)
+ if fullname == "" then
+ report("unable to locate file %a",filename)
+ return
+ end
+ report("generating font %a using format %a and file %a",fontname,format,filename)
+ fonts.definers.methods.install(fontname, {
+ {
+ specification.engine or "metapost",
+ format,
+ filename,
+ specification.instances or 1,
+ specification.compose or false,
+ },
+ } )
+end
+
+commands.definemetafont = metapost.fonts.define
+
+-- metapost.fonts.define {
+-- fontname = "bidi",
+-- filename = "bidi-symbols.mp",
+-- }
diff --git a/tex/context/base/meta-fnt.mkiv b/tex/context/base/meta-fnt.mkiv
new file mode 100644
index 000000000..603fcf14d
--- /dev/null
+++ b/tex/context/base/meta-fnt.mkiv
@@ -0,0 +1,36 @@
+%D \module
+%D [ file=meta-fnt,
+%D version=2013.09.06,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Fonts,
+%D author=Hans Hagen,
+%D date=\ currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{MetaPost Graphics / Fonts}
+
+\registerctxluafile{meta-fnt}{1.001}
+
+\unprotect
+
+\unexpanded\def\definemetafont
+ {\dotripleempty\meta_font_define}
+
+\def\meta_font_define[#1][#2][#3]%
+ {\ctxcommand{definemetafont {
+ fontname = "#1",
+ filename = "#2"
+ % no #3 settings yet (compose, instances)
+ }}}
+
+% \startluacode
+% metapost.fonts.define { fontname = "bidi-symbols", filename = "bidi-symbols.mp" }
+% \stopluacode
+
+% \definemetafont[bidi-symbols][bidi-symbols.mp]
+
+\protect \endinput
diff --git a/tex/context/base/mult-mps.lua b/tex/context/base/mult-mps.lua
index fa93f7ef8..c1e05f265 100644
--- a/tex/context/base/mult-mps.lua
+++ b/tex/context/base/mult-mps.lua
@@ -61,6 +61,7 @@ return {
},
commands = {
"beginfig", "endfig",
+ "beginglyph", "endglyph", "charscale",
"rotatedaround", "reflectedabout",
"arrowhead",
"currentpen", "currentpicture", "cuttings",
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 60b4169dc..998484dde 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log
index fba6598e2..a6bd2f618 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.09.11 15:37 MKIV beta fmt: 2013.9.11 int: english/english
+ConTeXt ver: 2013.09.12 11:48 MKIV beta fmt: 2013.9.12 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/context/base/util-sto.lua b/tex/context/base/util-sto.lua
index 191d6cd73..8aafca425 100644
--- a/tex/context/base/util-sto.lua
+++ b/tex/context/base/util-sto.lua
@@ -103,12 +103,22 @@ end
local function f_empty () return "" end -- t,k
local function f_self (t,k) t[k] = k return k end
local function f_table (t,k) local v = { } t[k] = v return v end
+local function f_number(t,k) t[k] = 0 return 0 end -- t,k,v
local function f_ignore() end -- t,k,v
-local t_empty = { __index = f_empty }
-local t_self = { __index = f_self }
-local t_table = { __index = f_table }
-local t_ignore = { __newindex = f_ignore }
+local f_index = {
+ ["empty"] = f_empty,
+ ["self"] = f_self,
+ ["table"] = f_table,
+ ["number"] = f_number,
+}
+
+local t_index = {
+ ["empty"] = { __index = f_empty },
+ ["self"] = { __index = f_self },
+ ["table"] = { __index = f_table },
+ ["number"] = { __index = f_number },
+}
function table.setmetatableindex(t,f)
if type(t) ~= "table" then
@@ -116,46 +126,30 @@ function table.setmetatableindex(t,f)
end
local m = getmetatable(t)
if m then
- if f == "empty" then
- m.__index = f_empty
- elseif f == "key" then
- m.__index = f_self
- elseif f == "table" then
- m.__index = f_table
- else
- m.__index = f
- end
+ m.__index = f_index[f] or f
else
- if f == "empty" then
- setmetatable(t, t_empty)
- elseif f == "key" then
- setmetatable(t, t_self)
- elseif f == "table" then
- setmetatable(t, t_table)
- else
- setmetatable(t,{ __index = f })
- end
+ setmetatable(t,t_index[f] or { __index = f })
end
return t
end
+local f_index = {
+ ["ignore"] = f_ignore,
+}
+
+local t_index = {
+ ["ignore"] = { __newindex = f_ignore },
+}
+
function table.setmetatablenewindex(t,f)
if type(t) ~= "table" then
f, t = t, { }
end
local m = getmetatable(t)
if m then
- if f == "ignore" then
- m.__newindex = f_ignore
- else
- m.__newindex = f
- end
+ m.__newindex = f_index[f] or f
else
- if f == "ignore" then
- setmetatable(t, t_ignore)
- else
- setmetatable(t,{ __newindex = f })
- end
+ setmetatable(t,t_index[f] or { __newindex = f })
end
return t
end
diff --git a/tex/context/base/x-mathml.lua b/tex/context/base/x-mathml.lua
index 31483bbea..d19e1eebf 100644
--- a/tex/context/base/x-mathml.lua
+++ b/tex/context/base/x-mathml.lua
@@ -62,6 +62,7 @@ local o_replacements = { -- in main table
["{"] = "\\mmlleftdelimiter \\lbrace",
["}"] = "\\mmlrightdelimiter\\rbrace",
["|"] = "\\mmlleftorrightdelimiter\\vert",
+ ["/"] = "\\mmlleftorrightdelimiter\\solidus",
[doublebar] = "\\mmlleftorrightdelimiter\\Vert",
["("] = "\\mmlleftdelimiter(",
[")"] = "\\mmlrightdelimiter)",
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index a3496b3f3..261839531 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 09/11/13 15:37:51
+-- merge date : 09/12/13 11:48:29
do -- begin closure to overcome local limits and interference
diff --git a/web2c/context.cnf b/web2c/context.cnf
index aad2c51eb..83abd5bfa 100644
--- a/web2c/context.cnf
+++ b/web2c/context.cnf
@@ -89,7 +89,7 @@ OTFFONTS = .;$TEXMF/fonts/otf/{data,xetex,}//;$OSFONTDIR
TEXINPUTS = .;$TEXMF/tex/{$progname,plain,generic,}//
TEXINPUTS.context = .;$TEXMF/tex/{context,plain/base,generic}//
-MPINPUTS = .;$TEXMF/metapost/{context,base,}//
+MPINPUTS = .;$TEXMF/metapost/{context,base}//
BSTINPUTS = .;$TEXMF/bibtex/bst//
BIBINPUTS = .;$TEXMF/bibtex/bib//