Commit 64649ce0 authored by Jérome Perrin's avatar Jérome Perrin

component/fontconfig: strip path elements and don't include empty elements

This prevent some Fontconfig warnings ("empty font directory name ignored")
when the software includes empty items, which can easily happens with multi
level templates.
parent 575cf771
[template-fonts-conf] [template-fonts-conf]
filename = fonts.conf.in filename = fonts.conf.in
md5sum = 6967e553630d107fc0a59b14de8b0251 md5sum = a31030785c7b54bfd33320c87f6b5699
...@@ -14,10 +14,14 @@ ...@@ -14,10 +14,14 @@
#} #}
<fontconfig> <fontconfig>
<cachedir>{{ cachedir | escape}}</cachedir> <cachedir>{{ cachedir | escape}}</cachedir>
{% for font in fonts.splitlines() -%} {%- for font in fonts.splitlines() -%}
<dir>{{ font | escape}}</dir> {% if font.strip() %}
{% endfor %} <dir>{{ font.strip() | escape}}</dir>
{% for include in includes.splitlines() -%} {%- endif %}
<include>{{ include | escape}}</include> {%- endfor %}
{% endfor %} {%- for include in includes.splitlines() -%}
</fontconfig> {% if include.strip() %}
\ No newline at end of file <include>{{ include.strip() | escape}}</include>
{%- endif %}
{%- endfor %}
</fontconfig>
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