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
Pipeline #14904 failed with stage
in 0 seconds
[template-fonts-conf]
filename = fonts.conf.in
md5sum = 6967e553630d107fc0a59b14de8b0251
md5sum = a31030785c7b54bfd33320c87f6b5699
......@@ -14,10 +14,14 @@
#}
<fontconfig>
<cachedir>{{ cachedir | escape}}</cachedir>
{% for font in fonts.splitlines() -%}
<dir>{{ font | escape}}</dir>
{% endfor %}
{% for include in includes.splitlines() -%}
<include>{{ include | escape}}</include>
{% endfor %}
</fontconfig>
\ No newline at end of file
{%- for font in fonts.splitlines() -%}
{% if font.strip() %}
<dir>{{ font.strip() | escape}}</dir>
{%- endif %}
{%- endfor %}
{%- for include in includes.splitlines() -%}
{% if include.strip() %}
<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