blob: 4281b8103c60e9930ad136126d08d2eca154b61c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
redundant=(20-unhint-small-dejavu-sans-mono.conf
20-unhint-small-dejavu-sans.conf
20-unhint-small-dejavu-serif.conf
57-dejavu-sans-mono.conf
57-dejavu-sans.conf
57-dejavu-serif.conf)
post_install() {
cat << _EOF
Thank you for checking out fontconfig-infinality-remix.
By default, fontconfig will use use the remix font collection.
If you are going to use either a custom font collection or core
Microsoft families, set the appropriate presets using
fc-presets command.
_EOF
pushd etc/fonts/conf.d > /dev/null
echo -e "Removing redundant symlinks ..."
for bit in "${redundant[@]}"; do
if [ -f ${bit} ]; then
rm -f ${bit}
fi
done
echo -e "Done."
echo -e "Creating symlinks for remix font collection ..."
ln -sf ../conf.avail.infinality/remix/30-metric-aliases-remix.conf .
ln -sf ../conf.avail.infinality/remix/37-repl-global-remix.conf .
ln -sf ../conf.avail.infinality/remix/60-latin-remix.conf .
ln -sf ../conf.avail.infinality/remix/65-non-latin-remix.conf .
ln -sf ../conf.avail.infinality/remix/66-aliases-wine-remix.conf .
echo -e "Done."
popd > /dev/null
echo -e "Updating font cache... "
/usr/bin/fc-cache -f
echo -e "Done."
}
post_upgrade() {
echo -e "Updating font cache... "
/usr/bin/fc-cache -f
echo "Done."
}
post_remove() {
pushd etc/fonts/conf.d > /dev/null
echo -e "Restoring old symlinks ..."
for bit in "${redundant[@]}"; do
if [[ ! -f ${bit} ]] && [[ -f ../conf.avail/${bit} ]]; then
ln -sf ../conf.avail/${bit} .
fi
done
echo -e "Done."
cat << _EOF
fontconfig-infinality-remix has been removed.
Check for dead symlinks and leftover files
in /etc/fonts/conf.d/
_EOF
}
|