diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/cm/cmtest/6test.mf |
Initial commit
Diffstat (limited to 'fonts/cm/cmtest/6test.mf')
-rw-r--r-- | fonts/cm/cmtest/6test.mf | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/fonts/cm/cmtest/6test.mf b/fonts/cm/cmtest/6test.mf new file mode 100644 index 0000000000..e1682c909b --- /dev/null +++ b/fonts/cm/cmtest/6test.mf @@ -0,0 +1,59 @@ +% This tries all characters on TEST.MF using six different sets of parameters +if unknown cmbase: input cmbase fi % omit if CMMF can be assumed +mag=.5; +mode_setup;%let mode_setup=\; + +boolean running; +def abort = hide(scrollmode; running:=false) enddef; +def pause=stop "done with char "&decimal charcode&". " enddef; +let iff=always_iff; +def ligtable text t=enddef; +def charlist text t=enddef; +def extensible text t=enddef; + +string currenttitle; +let semi=;; let echar=endchar; let endchar=enddef; +def cmchar expr s = currenttitle:=s; + let;=testchar semi quote def chartext=enddef; +def testchar = semi let;=semi; + % now `chartext echar' will generate the character to be tested + running:=true; errorstopmode; + for k=1 upto 6: + if running: if known params[k]: scantokens params[k]; font_setup; + currentwindow:=k; + currenttitle & ", " & fontname[k]; + chartext echar; fi fi endfor + pause; enddef; + +string params[],fontname[]; +params[1]="roman_params"; fontname[1]="cmr10"; +params[2]="sans_params"; fontname[2]="cmsx10"; +params[3]="tt_params"; fontname[3]="cmtt10"; +params[4]="bold_params"; fontname[4]="cmb10"; +params[5]="quote_params"; fontname[5]="cmssqi8"; +params[6]="ital_params"; fontname[6]="cmti10"; + +w_rows=floor 1/2 screen_rows; w_cols=floor 1/3 screen_cols; +def open(expr k,i,j)= + openwindow k from ((i-1)*w_rows,(j-1)*w_cols) to (i*w_rows,j*w_cols) + at (-10,140) enddef; +def openit = + open(1,1,1); open(2,1,2); open(3,1,3); + open(4,2,1); open(5,2,2); open(6,2,3); enddef; + +begingroup delimiters begintext generate; + def WAITSkludge expr s = + if length s > 6: substring (0,3) of s & + substring(length s-3,infinity) of fi s enddef; + numeric Xerox_world; % again, this is WAITS only + def makedef(expr s)(text t) = + expandafter def scantokens s = t enddef; flushtext enddef; + def flushtext suffix t = enddef; + for k=1 upto 6: if known params[k]: + makedef(params[k]) + expandafter expandafter expandafter begintext + scantokens ("input "&WAITSkludge fontname[k]); fi endfor +endgroup; + +input test; +bye |