From f67d715ce5b6ea38f4585eb1d26d3f19eef2e8e6 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Thu, 22 Jan 2015 09:09:08 +0330 Subject: [PATCH] tmac: tmac.fp for generating font descriptions on the fly --- tmac/tmac.fp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tmac/tmac.fp diff --git a/tmac/tmac.fp b/tmac/tmac.fp new file mode 100644 index 0000000..89d3fda --- /dev/null +++ b/tmac/tmac.fp @@ -0,0 +1,27 @@ +.\" tmac.fp - Generate font descriptions on the fly +.\" +.\" This package contains macros that generate neatroff font +.\" descriptions while neatroff is processing input files. +.\" \*[fp.src] should be a directory specified in GS_FONTPATH +.\" environment variable or via -sFONTPATH="..." option of +.\" ghostscript (viz. ps2pdf). Temporary neatroff file +.\" descriptions are created in \*[fp.dst] directory. +.\" +.if ''\*[fp.src]' .ds fp.src "/path/to/GS_FONTPATH +.if ''\*[fp.dst]' .ds fp.dst "/tmp/ +.if ''\*[fp.mkfn]' .ds fp.mkfn "neatmkfn -b +.\" .fp.ttf font_position troff_font_name font_name +.de fp.ttf +. sy \\*[fp.mkfn] -o <\\*[fp.src]/\\$3.ttf >\\*[fp.dst]/\\$3 +. fp \\$1 \\$2 \\*[fp.dst]/\\$3 +.. +.\" .fp.otf font_position troff_font_name font_name +.de fp.otf +. sy echo -e 'Open("\\*[fp.src]/\\$3.otf")\\\\nGenerate("\\*[fp.src]/\\$3.ttf")' | fontforge >/dev/null 2>&1 +. fp.ttf \\$1 \\$2 \\$3 +.. +.\" .fp.afm font_position troff_font_name font_name +.de fp.afm +. sy \\*[fp.mkfn] -a <\\*[fp.src]/\\$3.afm >\\*[fp.dst]/\\$3 +. fp \\$1 \\$2 \\*[fp.dst]/\\$3 +.. -- 2.11.4.GIT