From 1a016bc2b8d7bbdc52f3c41fb17a5ab0ef7b6d0f Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 6 Sep 2020 10:54:05 +0200 Subject: report: Add b/w PDF for printouts Might come handy if you need a physical reference card. --- gen.sh | 11 ++++++++ lulua/data/render-svg-print.css | 60 +++++++++++++++++++++++++++++++++++++++++ lulua/data/report/index.html | 2 ++ 3 files changed, 73 insertions(+) create mode 100644 lulua/data/render-svg-print.css diff --git a/gen.sh b/gen.sh index 2880a00..490a198 100755 --- a/gen.sh +++ b/gen.sh @@ -37,6 +37,12 @@ rule opt rule render-svg command = lulua-render -l \$layout svg \$out +rule render-svg-print + command = lulua-render -l \$layout svg -s lulua/data/render-svg-print.css \$out + +rule svg2pdf + command = rsvg-convert -f pdf \$in > \$out + rule render-svg-heat command = lulua-render -l \$layout svg --heatmap=\$in \$out @@ -198,6 +204,11 @@ build \$tempdir/${l}-heat.yaml: analyze-heat \$statsdir/${l}/all.pickle || \$tem build \$reportdir/${l}-heat.svg: render-svg-heat \$tempdir/${l}-heat.yaml || \$reportdir layout = ${l} +build \$tempdir/${l}-print.svg: render-svg-print || \$tempdir + layout = ${l} + +build \$reportdir/${l}.pdf: svg2pdf \$tempdir/${l}-print.svg || \$reportdir + build \$tempdir/${l}-layoutstats.pickle: analyze-layoutstats \$statsdir/${l}/all.pickle || \$tempdir layout = ${l} diff --git a/lulua/data/render-svg-print.css b/lulua/data/render-svg-print.css new file mode 100644 index 0000000..fa897a7 --- /dev/null +++ b/lulua/data/render-svg-print.css @@ -0,0 +1,60 @@ +/* Style for printing with outlines instead of solid color faces */ + +/* inkscape-compatibility, explicitly apply font settings to .label */ +svg, .label { + font-family: "IBM Plex Sans Arabic"; + font-size: 90px; + font-weight: 400; +} +.unused { + opacity: 0.6; +} +.label .layer-1 { +} +.modifier .label .layer-1 { + font-size: 80%; +} +.label .layer-2, .label .layer-3, .label .layer-4 { + font-size: 80%; + font-weight: 100; +} +.label .controlchar { + font-size: 40%; + font-family: sans-serif; +} +.cap rect { + fill: white; + stroke: gray; + stroke-width: 2; +} +.highlight circle { +} +.cap-shadow rect.finger-little, +.cap-shadow rect.finger-ring, +.cap-shadow rect.finger-middle, +.cap-shadow rect.finger-index, +.cap-shadow rect.finger-thumb { + fill: white; +} + +.label { + fill: black; +} +.label.shadow { + fill: white; +} +.controllabel { + stroke: black; + fill: none; +} +.controllabel.shadow { + stroke: white; + fill: none; +} +.marker line { + stroke: gray; +} +.marker line.shadow { + stroke: white; +} + diff --git a/lulua/data/report/index.html b/lulua/data/report/index.html index d69dc29..b894f14 100644 --- a/lulua/data/report/index.html +++ b/lulua/data/report/index.html @@ -85,6 +85,8 @@

Usage

+
Printout
+
PDF
Windows
Download driver and follow instructions in INSTALL.txt
Android
-- cgit v1.2.3