aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-08-19 10:40:57 +0000
committerKeiron Liddle <keiron@apache.org>2002-08-19 10:40:57 +0000
commit48d3c4f4d913224c8c1be3086b280facd5bf75cb (patch)
treeb1f4e86c056c7a85436540d369c7234adf495376 /docs
parent8e86ebfbbb325c5fdcf6244390e34f21803f8f6f (diff)
downloadxmlgraphics-fop-48d3c4f4d913224c8c1be3086b280facd5bf75cb.tar.gz
xmlgraphics-fop-48d3c4f4d913224c8c1be3086b280facd5bf75cb.zip
added example for embedding fonts
using free barcode font for embedding git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195096 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/examples/advanced/K3.TTFbin0 -> 5133 bytes
-rw-r--r--docs/examples/advanced/K3.xml5
-rw-r--r--docs/examples/advanced/bar.conf.xml14
-rw-r--r--docs/examples/advanced/barcode.fo50
4 files changed, 69 insertions, 0 deletions
diff --git a/docs/examples/advanced/K3.TTF b/docs/examples/advanced/K3.TTF
new file mode 100755
index 000000000..74e8de643
--- /dev/null
+++ b/docs/examples/advanced/K3.TTF
Binary files differ
diff --git a/docs/examples/advanced/K3.xml b/docs/examples/advanced/K3.xml
new file mode 100644
index 000000000..7d9f109f9
--- /dev/null
+++ b/docs/examples/advanced/K3.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Note: this file created using TTFReader
+-->
+<font-metrics type="TYPE0"><font-name>New</font-name><embed/><cap-height>0</cap-height><x-height>0</x-height><ascender>390</ascender><descender>0</descender><bbox><left>0</left><bottom>0</bottom><right>219</right><top>390</top></bbox><flags>33</flags><stemv>0</stemv><italicangle>0</italicangle><subtype>TYPE0</subtype><multibyte-extras><cid-type>CIDFontType2</cid-type><default-width>0</default-width><bfranges><bf gi="47" ue="32" us="32"/><bf gi="45" ue="36" us="36"/><bf gi="43" ue="37" us="37"/><bf gi="40" ue="42" us="42"/><bf gi="42" ue="43" us="43"/><bf gi="0" ue="44" us="44"/><bf gi="41" ue="45" us="45"/><bf gi="46" ue="46" us="46"/><bf gi="44" ue="47" us="47"/><bf gi="5" ue="50" us="48"/><bf gi="9" ue="56" us="51"/><bf gi="8" ue="57" us="57"/><bf gi="15" ue="83" us="65"/><bf gi="4" ue="84" us="84"/><bf gi="34" ue="90" us="85"/><bf gi="0" ue="65535" us="65535"/></bfranges><cid-widths start-index="0"><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/><wx w="156"/></cid-widths></multibyte-extras></font-metrics>
diff --git a/docs/examples/advanced/bar.conf.xml b/docs/examples/advanced/bar.conf.xml
new file mode 100644
index 000000000..828eff849
--- /dev/null
+++ b/docs/examples/advanced/bar.conf.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!-- TODO: use proper config -->
+
+<configuration>
+
+<fonts>
+ <font metrics-file="K3.xml" kerning="yes" embed-file="K3.TTF">
+ <font-triplet name="Barcode" style="normal" weight="normal"/>
+ </font>
+</fonts>
+
+</configuration>
+
diff --git a/docs/examples/advanced/barcode.fo b/docs/examples/advanced/barcode.fo
new file mode 100644
index 000000000..ba0ba13b3
--- /dev/null
+++ b/docs/examples/advanced/barcode.fo
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master page-width="21cm" page-height="29.7cm" master-name="first" margin-top="5mm">
+ <fo:region-body margin-bottom="4.5in" margin-right="5mm" margin-left="5mm" margin-top="5mm"/>
+ <fo:region-after extent="4in" border-top-color="silver" border-top-style="dotted" border-top-width="0.13mm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master page-width="21cm" page-height="29.7cm" master-name="rest" margin-right="5mm" margin-left="5mm" margin-top="5mm" margin-bottom="5mm">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="A4">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference master-reference="first" page-position="first"/>
+ <fo:conditional-page-master-reference master-reference="rest" page-position="rest"/>
+ <fo:conditional-page-master-reference master-reference="rest"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="A4">
+ <fo:flow flow-name="xsl-region-body">
+
+<fo:block font-size="14pt" font-weight="bold">
+ Example embedding Font
+</fo:block>
+
+<fo:block font-size="14pt" font-weight="bold">
+ This example shows how to use an embedded font and
+ uses a free barcode font as an example. The barcode font is from
+ <fo:basic-link external-destination="http://www.geocities.com/keith_dimmock/">http://www.geocities.com/keith_dimmock/</fo:basic-link>
+ and is free.
+</fo:block>
+
+<fo:block font-family="Barcode" font-size="74pt" line-height="76pt"
+space-before.optimum="6mm">
+ *ID123456*
+</fo:block>
+
+<fo:block font-family="Barcode" font-size="74pt" line-height="76pt"
+space-before.optimum="6mm">
+ normal text
+</fo:block>
+
+<fo:block font-family="Barcode, Helvetica" font-size="74pt" line-height="76pt"
+space-before.optimum="6mm">
+ *ID123456* normal text
+</fo:block>
+
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>