2007-01-22 17:29:05 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
This script copies the original fonts.conf from the fontconfig
|
|
|
|
distribution, but replaces all <dir> entries with the directories
|
|
|
|
specified in the $fontDirectories parameter.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<xsl:stylesheet version="1.0"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns:str="http://exslt.org/strings"
|
|
|
|
extension-element-prefixes="str"
|
|
|
|
>
|
|
|
|
|
|
|
|
<xsl:output method='xml' encoding="UTF-8" doctype-system="fonts.dtd" />
|
|
|
|
|
|
|
|
<xsl:param name="fontDirectories" />
|
2007-10-05 14:56:44 +02:00
|
|
|
<xsl:param name="fontconfig" />
|
2007-01-22 17:29:05 +01:00
|
|
|
|
|
|
|
<xsl:template match="/fontconfig">
|
|
|
|
|
|
|
|
<fontconfig>
|
2007-10-05 14:56:44 +02:00
|
|
|
<xsl:copy-of select="child::node()[name() != 'dir' and name() != 'cachedir' and name() != 'include']" />
|
2007-01-22 17:29:05 +01:00
|
|
|
|
2007-10-05 14:56:44 +02:00
|
|
|
<include xml:space="preserve"><xsl:value-of select="$fontconfig" />/etc/fonts/conf.d</include>
|
|
|
|
<include ignore_missing="yes" xml:space="preserve">/etc/fonts/conf.d</include>
|
|
|
|
|
|
|
|
<cachedir xml:space="preserve">/var/cache/fontconfig</cachedir>
|
|
|
|
<cachedir xml:space="preserve">~/.fontconfig</cachedir>
|
|
|
|
|
2007-01-22 17:29:05 +01:00
|
|
|
<xsl:for-each select="str:tokenize($fontDirectories)">
|
|
|
|
<dir><xsl:value-of select="." /></dir>
|
2007-01-22 18:17:53 +01:00
|
|
|
<xsl:text>
</xsl:text>
|
2007-01-22 17:29:05 +01:00
|
|
|
</xsl:for-each>
|
|
|
|
|
|
|
|
</fontconfig>
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
|
2007-10-05 14:56:44 +02:00
|
|
|
</xsl:stylesheet>
|