wok diff ttf-dejavu/stuff/compile.rules @ rev 25321
updated sqlobject (3.8.0 -> 3.9.1)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jul 22 07:45:13 2022 +0100 (2022-07-22) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ttf-dejavu/stuff/compile.rules Fri Jul 22 07:45:13 2022 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 +#!/bin/sh 1.5 +# Install/repack DejaVu fonts and conf files 1.6 +# Aleksei Bobylev <al.bobylev@gmail.com>, 2016 1.7 + 1.8 + 1.9 +# Install/repack fonts 1.10 + 1.11 +f=$install/usr/share/fonts/truetype/ttf-dejavu 1.12 +mkdir -p $f 1.13 +for font in $src/ttf/*.ttf; do 1.14 + a="$a\n$(printf "%-32s" $(basename $font .ttf)): $(ls -l $font | awk '{print $5}') B -> " 1.15 + echo "Processing $(basename $font):" 1.16 + # About FontForge scripting and this command, see: 1.17 + # https://fontforge.github.io/scripting-alpha.html#Generate 1.18 + fontforge -quiet -lang=ff -c 'Open($1); Generate($2,"",0x90)' \ 1.19 + $font $f/$(basename $font) 1.20 + a="$a$(ls -l $f/$(basename $font) | awk '{print $5}') B" 1.21 + echo 1.22 +done 1.23 +echo -e "\nResults:\n========\n$a" 1.24 + 1.25 + 1.26 +# Install available configurations 1.27 + 1.28 +f=$install/usr/share/fontconfig/conf.avail 1.29 +mkdir -p $f 1.30 +cp $src/fontconfig/*.conf $f 1.31 + 1.32 +tmp=$(mktemp) 1.33 + 1.34 +# Strip *.conf files 1.35 +for i in $install/usr/share/fontconfig/conf.avail/*; do 1.36 + # <?xml version="1.0" encoding="UTF-8"?> 1.37 + sed -i 's| encoding="UTF-8"||' $i # remove needless encoding 1.38 + # <!DOCTYPE fontconfig SYSTEM "../fonts.dtd"> 1.39 + sed -i 's|\.\./||' $i # remove "../" 1.40 + 1.41 + tr -d '\n' < $i | sed 's|[ \t][ \t]*| |g' | \ 1.42 + sed 's|<!--|\n&|g; s|-->|&\n|g' | sed '/<!--/d' | \ 1.43 + tr -d '\n' | sed 's|> *<|><|g' > $tmp 1.44 + cat $tmp > $i 1.45 +done 1.46 + 1.47 +rm $tmp 1.48 + 1.49 + 1.50 +# Use the configurations 1.51 +f=$install/etc/fonts/conf.d 1.52 +mkdir -p $f 1.53 +for i in $src/fontconfig/*.conf; do 1.54 + ln -s /usr/share/fontconfig/conf.avail/$(basename $i) $f/$(basename $i) 1.55 +done