]> git.pld-linux.org Git - packages/libwmf.git/blob - libwmf-fontmap-pld.patch
Release 2 (by relup.sh)
[packages/libwmf.git] / libwmf-fontmap-pld.patch
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
3 @@ -33,9 +33,9 @@
4  fi
5  
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"
9  else
10 -       font_dir="$font_dir @WMF_FONTDIR@"
11 +       font_dir="$font_dir @WMF_FONTDIR@ /usr/share/fonts/Type1 /usr/share/fonts/TTF"
12  fi
13  
14  if test $echo_help = yes; then
15 @@ -64,10 +64,10 @@
16                 font_cwd=$(pwd)
17                 echo scanning "$i"
18  
19 -               for j in *.afm; do
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
26                         font_glyphs=
27                         if test -r "$font_cwd/$font_root.pfa"; then
28                                 font_glyphs="$font_cwd/$font_root.pfa"
29 @@ -78,10 +78,10 @@
30                         fi
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
This page took 0.0764 seconds and 3 git commands to generate.