File: wqy-zenhei-cfg

package info (click to toggle)
fonts-wqy-zenhei 0.9.45-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 16,708 kB
  • sloc: sh: 223; makefile: 24
file content (30 lines) | stat: -rwxr-xr-x 1,064 bytes parent folder | download | duplicates (5)
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
#!/bin/bash
###############################################
#   WenQuanYi Fonts Preference Configuration Utility
#  by Qianqian Fang <fangq at nmr.mgh.harvard.edu>
###############################################
TEXTDOMAIN=wqy-zenhei-cfg

optbmp=$"Bitmap Fonts"
optaa=$"Vector Fonts"
optnone=$"Do Nothing"

fontpref=$(zenity  --width=200 --height=200 --title $"WenQuanYi Font Preference" \
--list  --text $"Please select your preference to display Chinese characters: Bitmap (sharp) or Anti-aliased Vector Fonts (smooth)" \
--radiolist --column $"Select" --column $"Preference" TRUE "$optbmp (bitmap)" FALSE "$optaa (aa)" FALSE "$optnone (cancel)"); 

if [ "$fontpref" ]; then
	fontpref=`echo $fontpref | sed -e 's/.*(\(.*\)).*/\1/g' -e 's/ //g'`
	if [ "$fontpref" = "cancel" ]; then
		exit 0;
	fi;
        commitres=`zenheiset $fontpref`;
	if [ $? == 0 ]; then
		zenity --info --text $"Change committed. You may need to restart your X-window or browser to enable the new settings."
	else
        	zenity --error --text $"Commit failed."
		exit 1
	fi;
fi;

exit 0