1 --- libwmf-0.2.12/fonts/libwmf-fontmap.in.orig 2019-02-01 18:51:32.000000000 +0100
2 +++ libwmf-0.2.12/fonts/libwmf-fontmap.in 2019-04-24 17:01:09.676500394 +0200
6 if test "x$font_dir" = "x"; then
7 - font_dir="@WMF_FONTDIR@"
8 + font_dir="@WMF_FONTDIR@ /usr/share/fonts/Type1 /usr/share/fonts/TTF"
10 - font_dir="$font_dir @WMF_FONTDIR@"
11 + font_dir="$font_dir @WMF_FONTDIR@ /usr/share/fonts/Type1 /usr/share/fonts/TTF"
14 if test $echo_help = yes; then
20 + for j in *.afm afm/*.afm ; do
21 [ -e "$j" ] || continue
22 - font_root=$(echo "$j" | sed s/.afm//)
23 - font_metrics=$font_cwd/$font_root.afm
24 + font_root=$(basename "$j" .afm)
25 + font_metrics=$font_cwd/$j
27 if test -r "$font_cwd/$font_root.pfa"; then
28 font_glyphs="$font_cwd/$font_root.pfa"
31 if test "x$font_glyphs" != "x"; then
32 echo font: "$font_root"
33 - FontName=$(grep "FontName " "$font_metrics" | sed "s/FontName //")
34 - FullName=$(grep "FullName " "$font_metrics" | sed "s/FullName //")
35 - FamilyName=$(grep "FamilyName " "$font_metrics" | sed "s/FamilyName //")
36 - Weight=$(grep "Weight " "$font_metrics" | sed "s/Weight //")
37 + FontName=$(grep "FontName " "$font_metrics" | sed "s/FontName //" | tr -d '\r')
38 + FullName=$(grep "FullName " "$font_metrics" | sed "s/FullName //" | tr -d '\r')
39 + FamilyName=$(grep "FamilyName " "$font_metrics" | sed "s/FamilyName //" | tr -d '\r')
40 + Weight=$(grep "Weight " "$font_metrics" | sed "s/Weight //" | tr -d '\r')
41 cd "$font_pwd" || continue
42 echo '<font format="type1" metrics="'"$font_metrics"'" glyphs="'"$font_glyphs"'" name="'"$FontName"'" fullname="'"$FullName"'" familyname="'"$FamilyName"'" weight="'"$Weight"'" version="0.1" alias="'"$FontName"'"/>' >> $font_map
43 cd "$font_cwd" || continue