############################################## # Build documents showing raw font tables. # # # # Author: Scott Pakin # ############################################## # Perform a single run of LuaLaTeX, logging all files that are opened. We # arbitrarily build a letter-sized document, and we store the resulting # output file in a build-rawtables subdirectory. We hard-wire the use of # LuaLaTeX because that incorporates fonts in their native format instead # of requiring a conversion to PostScript fonts. rule run-latex-strace command = $ set -e ; $ workdir=build-rawtables ; $ mkdir -p "$$workdir" ; $ strace -e trace=open,openat -s 32768 -f -o $out lualatex -output-directory="$$workdir" -jobname symbols-letter '\PassOptionsToClass{letterpaper}{article}\input symbols' description = strace lualatex symbols # Create a .tex file of raw fonts. rule create-rawtables-tex command = $ ./makerawtables -o $out $in description = makerawtables # Run LuaLaTeX on a tables file (twice, for convergence). rule build-rawtables-pdf command = $ set -e ; $ workdir=build-rawtables ; $ echo 'Run 1 of 2' ; $ lualatex -output-directory="$$workdir" -jobname rawtables-${SIZE} '\PassOptionsToClass{${SIZE}paper}{article}\input rawtables.tex' ; $ echo 'Run 2 of 2' ; $ lualatex -output-directory="$$workdir" -jobname rawtables-${SIZE} '\PassOptionsToClass{${SIZE}paper}{article}\input rawtables.tex' ; $ cp "$$workdir/rawtables-${SIZE}.pdf" . description = lualatex rawtables ($SIZE) ########################################################################### build build-rawtables/symbols.strace : run-latex-strace common-deps.stamp build build-rawtables/rawtables.tex : create-rawtables-tex build-rawtables/symbols.strace | makerawtables build rawtables-letter.pdf : build-rawtables-pdf build-rawtables/rawtables.tex rawtables.lua SIZE = letter build rawtables-a4.pdf : build-rawtables-pdf build-rawtables/rawtables.tex rawtables.lua SIZE = a4