]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Embed fonts as proposed by http://left.subtree.org/2011/04/09/wordpress-blog-to-print...
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 5 Aug 2012 20:18:23 +0000 (22:18 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Sun, 5 Aug 2012 20:18:23 +0000 (22:18 +0200)
Makefile
data/fop-params.xconf [new file with mode: 0644]

index bc3afbc8d2723493875d5fa30af0d8603520c10e..f708976d232d384e3f1c39045c6755256485a153 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -79,7 +79,7 @@ html: freeculture.html freeculture.nb.html
          --stringparam hyphenate false \
          /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl \
          $<
-       fop -fo myfile.fo -pdf $@
+       fop -c data/fop-params.xconf -fo myfile.fo -pdf $@
 
 %.html: %.xml $(IMAGES)
        xmlto html-nochunks $<
diff --git a/data/fop-params.xconf b/data/fop-params.xconf
new file mode 100644 (file)
index 0000000..b5d915d
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<fop version="1.0">
+  <renderers>
+    <renderer mime="application/pdf">
+      <!-- Full path to truetype fonts to be embedded in PDF file -->
+      <fonts>
+       <font embed-url="file:///usr/share/fonts/truetype/freefont/FreeSerif.ttf">
+         <font-triplet name="Times" style="normal" weight="normal"/>
+       </font>
+       <font embed-url="file:///usr/share/fonts/truetype/freefont/FreeSerifBold.ttf">
+         <font-triplet name="Times" style="normal" weight="bold"/>
+       </font>
+       <font embed-url="file:///usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf">
+         <font-triplet name="Times" style="italic" weight="normal"/>
+       </font>
+       <font embed-url="file:///usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf">
+         <font-triplet name="Times" style="italic" weight="bold"/>
+       </font>
+      </fonts>
+    </renderer>
+  </renderers>
+</fop>