mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 17:41:12 +00:00
ec985c8ffa
Since fontconfig-2.11 the xml:space attribute makes it reject /etc/fonts/fonts.conf, so it renders garbage and eats lots of CPU. To use anything linked to fontconfig-2.11 you need to have this patch applied to your running NixOS. That's why I'm pushing it to master before the fontconfig update (as soon as I found and tested the fix).
41 lines
1.2 KiB
XML
41 lines
1.2 KiB
XML
<?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" />
|
|
<xsl:param name="fontconfig" />
|
|
|
|
<xsl:template match="/fontconfig">
|
|
|
|
<fontconfig>
|
|
<xsl:copy-of select="child::node()[name() != 'dir' and name() != 'cachedir' and name() != 'include']" />
|
|
|
|
<include ignore_missing="yes">/etc/fonts/conf.d</include>
|
|
<include><xsl:value-of select="$fontconfig" />/etc/fonts/conf.d</include>
|
|
|
|
<cachedir>/var/cache/fontconfig</cachedir>
|
|
<cachedir>~/.fontconfig</cachedir>
|
|
|
|
<xsl:for-each select="str:tokenize($fontDirectories)">
|
|
<dir><xsl:value-of select="." /></dir>
|
|
<xsl:text>
</xsl:text>
|
|
</xsl:for-each>
|
|
|
|
</fontconfig>
|
|
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|