Commit a7c30e5b authored by Baptiste Perraud's avatar Baptiste Perraud

Add Computer Modern font support via CSS

parent 9e71c987
/* Font declarations */
@font-face {
font-family: "CMU Serif";
src: url(cmunrm.ttf);
font-weight: normal;
font-style: normal;
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}
@font-face {
font-family: "CMU Serif Extra";
src: url(cmunrb.ttf);
font-weight: bold;
font-style: normal;
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}
@font-face {
font-family: "CMU Serif";
src: url(cmunti.ttf);
font-weight: normal;
font-style: italic;
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}
@font-face {
font-family: "CMU Typewriter Text";
src: url(cmuntt.ttf);
font-weight: normal;
font-style: normal;
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}
/* Global page styles */
@page {
size: A4 portrait;
margin: 2cm;
}
* {
font-family: "CMU Serif";
}
......@@ -42,6 +42,10 @@
<echo message="Dirpath : {$dirpath}"/>
<copy file="{$BaseDirectory}/css/main.css" tofile="{$dirpath}/main.css"/>
<copy file="{$BaseDirectory}/font/cmunrm.ttf" tofile="{$dirpath}/cmunrm.ttf"/>
<copy file="{$BaseDirectory}/font/cmunrb.ttf" tofile="{$dirpath}/cmunrb.ttf"/>
<copy file="{$BaseDirectory}/font/cmunti.ttf" tofile="{$dirpath}/cmunti.ttf"/>
<copy file="{$BaseDirectory}/font/cmuntt.ttf" tofile="{$dirpath}/cmuntt.ttf"/>
<xslt in="{$TempDirectory}/{$path}" out="{$dirpath}/hdoc_nsless.xhtml" style="xsl/ns_remover.xsl" classpath="./lib/saxon9he.jar"/>
<xslt in="{$dirpath}/hdoc_nsless.xhtml" out="{$dirpath}/flat_hdoc.xhtml" style="xsl/hdoc_flattenizer.xsl" classpath="./lib/saxon9he.jar"/>
......
......@@ -26,9 +26,10 @@
<head>
<xsl:apply-templates select="node()|@*"/>
<link>
<xsl:attribute name="ref">stylesheet</xsl:attribute>
<xsl:attribute name="rel">stylesheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
<xsl:attribute name="href">css/main.css</xsl:attribute>
<xsl:attribute name="href">main.css</xsl:attribute>
<xsl:attribute name="media">print</xsl:attribute>
</link>
</head>
</xsl:template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment