Minor.
[ttfautohint.git] / doc / local.mk
blob969851589be421039810e3ce202d0d227e90012e
1 # doc/local.mk
3 # Copyright (C) 2011-2021 by Werner Lemberg.
5 # This file is part of the ttfautohint library, and may only be used,
6 # modified, and distributed under the terms given in `COPYING'. By
7 # continuing to use, modify, or distribute this file you indicate that you
8 # have read `COPYING' and understand and accept it fully.
10 # The file `COPYING' mentioned in the previous paragraph is distributed
11 # with the ttfautohint library.
13 DOCSRC = \
14 doc/ttfautohint-1.pandoc \
15 doc/ttfautohint-2.pandoc \
16 doc/ttfautohint-3.pandoc \
17 doc/ttfautohint-4.pandoc \
18 NEWS
20 DOCIMGSVG = \
21 doc/img/blue-zones.svg \
22 doc/img/glyph-terms.svg \
23 doc/img/o-and-i.svg \
24 doc/img/segment-edge.svg
26 DOCIMGPDF = \
27 doc/img/blue-zones.pdf \
28 doc/img/glyph-terms.pdf \
29 doc/img/o-and-i.pdf \
30 doc/img/segment-edge.pdf
32 DOCIMGPNG = \
33 doc/img/ttfautohintGUI.png \
34 doc/img/a-before-hinting.png \
35 doc/img/a-after-hinting.png \
36 doc/img/a-after-autohinting.png \
37 doc/img/afii10108-11px-after-hinting.png \
38 doc/img/afii10108-11px-before-hinting.png \
39 doc/img/afii10108-12px-after-hinting.png \
40 doc/img/afii10108-12px-before-hinting.png \
41 doc/img/composite-no-round-xy-to-grid-option-c.png \
42 doc/img/composite-no-round-xy-to-grid.png \
43 doc/img/composite-round-xy-to-grid.png \
44 doc/img/e-17px-x14.png \
45 doc/img/e-17px-x17.png \
46 doc/img/fira-16px-ie11-win81.png \
47 doc/img/Halant-Regular-O-Q.png \
48 doc/img/Halant-Regular-O-Q-unhinted-12px.png \
49 doc/img/Halant-Regular-O-good-Q-badly-hinted-12px.png \
50 doc/img/Halant-Regular-O-good-Q-better-hinted-12px.png \
51 doc/img/Halant-Regular-O-good-Q-well-hinted-12px.png \
52 doc/img/Merriweather-Black-g-21px-comparison.png
54 DOC = \
55 doc/ttfautohint.html \
56 doc/ttfautohint.pdf \
57 doc/ttfautohint.txt \
58 $(DOCIMGPNG) \
59 $(DOCIMGSVG) \
60 $(DOCIMGPDF) \
61 doc/footnote-popup.js \
62 doc/jquery-3.6.0.min.js \
63 doc/toc-unfold.js
65 EXTRA_DIST += \
66 doc/c2pandoc.sed \
67 doc/taranges.sed \
68 doc/make-snapshot.sh \
69 doc/strip-comments.sh \
70 doc/ttfautohint-1.pandoc \
71 doc/ttfautohint-2.pandoc \
72 doc/ttfautohint-3.pandoc \
73 doc/ttfautohint-4.pandoc \
74 doc/template.html \
75 doc/template.tex \
76 doc/longtable-patched.sty \
77 doc/fontspec.sty \
78 doc/fontspec-xetex.sty \
79 doc/ttfautohint-css.html \
80 doc/ttfautohint-js.html \
81 doc/ttfautohintGUI.stylesheet
83 if WITH_DOC
84 nobase_dist_doc_DATA = $(DOC)
85 endif
88 doc/ttfautohint-2.pandoc: lib/ttfautohint.h.in
89 $(SED) -f $(srcdir)/doc/c2pandoc.sed < $< > $@
91 doc/ttfautohint-4.pandoc: lib/taranges.c
92 $(SED) -f $(srcdir)/doc/taranges.sed < $< > $@
94 doc/ttfautohint.txt: $(DOCSRC)
95 $(SHELL) $(srcdir)/doc/strip-comments.sh $^ > $@
97 if WITH_DOC
99 # Suffix rules must always start in column 0.
100 .svg.pdf:
101 $(INKSCAPE) --export-pdf=$@ $<
103 # Build snapshot image of ttfautohintGUI:
104 # this needs X11 and ImageMagick's `import' tool
105 # (in the `make-snaphshot.sh' script).
106 doc/img/ttfautohintGUI.png: frontend/maingui.cpp \
107 configure.ac \
108 doc/ttfautohintGUI.stylesheet \
109 | frontend/ttfautohintGUI$(EXEEXT)
110 $(SHELL) $(srcdir)/doc/make-snapshot.sh \
111 frontend/ttfautohintGUI$(EXEEXT) \
112 --stylesheet=$(srcdir)/doc/ttfautohintGUI.stylesheet \
113 > $@
115 doc/ttfautohint.html: \
116 doc/ttfautohint.txt \
117 $(DOCIMGPNG) \
118 $(DOCIMGSVG) \
119 doc/ttfautohint-css.html \
120 doc/ttfautohint-js.html \
121 doc/template.html \
122 .version
123 $(PANDOC) --from=markdown+smart \
124 --resource-path=$(srcdir)/doc \
125 --resource-path=doc \
126 --template=$(srcdir)/doc/template.html \
127 --default-image-extension=".svg" \
128 --variable="version:$(VERSION)" \
129 --toc \
130 --include-in-header=$(srcdir)/doc/ttfautohint-css.html \
131 --include-in-header=$(srcdir)/doc/ttfautohint-js.html \
132 --standalone \
133 --output=$@ $<
135 doc/ttfautohint.pdf: \
136 doc/ttfautohint.txt \
137 $(DOCIMGPNG) \
138 $(DOCIMGPDF) \
139 doc/template.tex \
140 .version
141 TEXINPUTS="$(srcdir)/doc;" \
142 $(PANDOC) --from=markdown+smart \
143 --resource-path=$(srcdir)/doc \
144 --resource-path=doc \
145 --pdf-engine=$(LATEX) \
146 --template=$(srcdir)/doc/template.tex \
147 --default-image-extension=".pdf" \
148 --variable="version:$(VERSION)" \
149 --number-sections \
150 --toc \
151 --top-level-division=chapter \
152 --standalone \
153 --output=$@ $<
154 else
155 .svg.pdf:
156 @echo 1>&2 "warning: can't generate \`$@'"
157 @echo 1>&2 " please install inkscape and reconfigure"
159 doc/img/ttfautohintGUI.png: frontend/maingui.cpp \
160 configure.ac \
161 doc/ttfautohintGUI.stylesheet \
162 | frontend/ttfautohintGUI$(EXEEXT)
163 @echo 1>&2 "warning: can't generate \`$@'"
164 @echo 1>&2 " please install ImageMagick's \`import' tool and reconfigure"
166 doc/ttfautohint.html: \
167 doc/ttfautohint.txt \
168 $(DOCIMGPNG) \
169 $(DOCIMGSVG) \
170 doc/ttfautohint-css.html \
171 doc/template.html \
172 .version
173 @echo 1>&2 "warning: can't generate \`$@'"
174 @echo 1>&2 " please install pandoc and reconfigure"
176 doc/ttfautohint.pdf: \
177 doc/ttfautohint.txt \
178 $(DOCIMGPNG) \
179 $(DOCIMGPDF) \
180 doc/template.tex \
181 .version
182 @echo 1>&2 "warning: can't generate \`$@'"
183 @echo 1>&2 " please install pdftex and pandoc, then reconfigure"
184 endif
186 # end of doc/local.mk