wok-current annotate fontconfig-infinality-yad/stuff/infctl-yad @ rev 18663

Up tazpkg(880); change pre- post-functions, etc. in random packages
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Dec 04 02:45:17 2015 +0200 (2015-12-04)
parents 66feb7f9e198
children
rev   line source
al@14225 1 #!/bin/sh
al@14225 2 # Simple style chooser for fontconfig-infinality
al@14225 3 #
al@18485 4 # Copyright (C) 2013-2015 SliTaz GNU/linux - GNU GPL v3
al@14225 5 # - Aleksej Bobylev <al.bobylev@gmail.com>
al@18485 6 # - Zann <e-zann@gmx.net>
al@14225 7 #
al@14225 8
al@18485 9 # Determine current style
al@18485 10 inf_path=$(realpath /etc/fonts/infinality/conf.d)
al@18485 11 case $(basename $inf_path) in
al@18485 12 infinality) inf_style="Infinality";;
al@18485 13 linux) inf_style="Linux";;
al@18485 14 osx) inf_style="OSX";;
al@18485 15 osx2) inf_style="OSX2";;
al@18485 16 win7) inf_style="Windows 7";;
al@18485 17 win98) inf_style="Windows 98" ;;
al@18485 18 winxp) inf_style="Windows XP";;
al@18485 19 esac
al@18485 20
al@18485 21
al@14225 22 inf_main() {
al@14225 23 yad --entry \
al@14225 24 --title="Fontconfig-infinality" \
al@14225 25 --window-icon=/usr/share/pixmaps/infinality.png \
al@18485 26 --text="Current style is <b>$inf_style</b>. Choose another:" \
al@14225 27 --center --on-top --entry-text \
al@14225 28 "Infinality - subpixel AA, minimal replacements/tweaks, sans=Arial" \
al@14225 29 "Windows 7 - subpixel AA, sans=Arial" \
al@14225 30 "Windows XP - subpixel AA, sans=Arial" \
al@14225 31 "Windows 98 - B/W full hinting on TT fonts, grayscale AA for others, sans=Arial" \
al@14225 32 "OSX - Slight hinting, subpixel AA, sans=Helvetica Neue" \
al@14225 33 "OSX2 - No hinting, subpixel AA, sans=Helvetica Neue" \
al@14225 34 "Linux - subpixel AA, sans=DejaVu Sans"
al@14225 35 }
al@14225 36
al@14225 37 main=$(inf_main)
al@14225 38 # Deal with --button values
al@14225 39 case $? in
al@14225 40 1) exit 0 ;;
al@14225 41 *) continue ;;
al@14225 42 esac
al@14225 43
al@14225 44 case "$main" in
al@14225 45 Infinality*) infctl.sh setstyle infinality ;;
al@14225 46 Windows\ 7*) infctl.sh setstyle win7 ;;
al@14225 47 Windows\ XP*) infctl.sh setstyle winxp ;;
al@14225 48 Windows\ 98*) infctl.sh setstyle win98 ;;
al@14225 49 OSX\ *) infctl.sh setstyle osx ;;
al@14225 50 OSX2*) infctl.sh setstyle osx2 ;;
al@14225 51 Linux*) infctl.sh setstyle linux ;;
al@14225 52 esac