- updated to 20150423:
* hide local system family preference list when user's one is in action OBS-URL: https://build.opensuse.org/package/show/M17N/fonts-config?expand=0&rev=67
This commit is contained in:
parent
487c9a0028
commit
b8b735cf4b
45
fonts-config
45
fonts-config
@ -327,7 +327,7 @@ use Env;
|
||||
use strict;
|
||||
|
||||
my $script_start_time = time();
|
||||
my $version = 20150421;
|
||||
my $version = 20150423;
|
||||
|
||||
#
|
||||
# OPTIONS
|
||||
@ -1273,7 +1273,7 @@ sub rendering_options {
|
||||
#
|
||||
|
||||
sub family_preference_list {
|
||||
my ($family, $prefered_families) = @_;
|
||||
my ($family, $prefered_families, $user) = @_;
|
||||
my $cfg;
|
||||
|
||||
my @families = split(/:/, $prefered_families);
|
||||
@ -1293,9 +1293,12 @@ sub family_preference_list {
|
||||
$family =~ s/&/&/g;
|
||||
|
||||
if (! $OPT_FORCE_FPL) {
|
||||
$cfg .= " <alias>\n";
|
||||
$cfg .= " <family>$family</family>\n";
|
||||
$cfg .= " <prefer>\n";
|
||||
$cfg .= "\t<alias>\n";
|
||||
if (!$user) {
|
||||
$cfg .= "\t\t<test name=\"user_preference_list\"><bool>false</bool></test>\n"
|
||||
}
|
||||
$cfg .= "\t\t<family>$family</family>\n";
|
||||
$cfg .= "\t\t<prefer>\n";
|
||||
for my $f (@families) {
|
||||
$f =~ s/&/&/g;
|
||||
$cfg .= " <family>$f</family>\n";
|
||||
@ -1303,12 +1306,12 @@ sub family_preference_list {
|
||||
print "[$f] ";
|
||||
}
|
||||
}
|
||||
$cfg .= " </prefer>\n";
|
||||
$cfg .= " </alias>\n";
|
||||
$cfg .= "\t\t</prefer>\n";
|
||||
$cfg .= "\t</alias>\n";
|
||||
} else {
|
||||
$cfg .= " <match>\n";
|
||||
$cfg .= " <test name=\"family\"><string>$family</string></test>\n";
|
||||
$cfg .= " <edit name=\"family\" mode=\"prepend_first\" binding=\"strong\">\n";
|
||||
$cfg .= "\t<match>\n";
|
||||
$cfg .= "\t\t<test name=\"family\"><string>$family</string></test>\n";
|
||||
$cfg .= "\t\t<edit name=\"family\" mode=\"prepend_first\" binding=\"strong\">\n";
|
||||
for my $f (@families) {
|
||||
$f =~ s/&/&/g;
|
||||
$cfg .= " <string>$f</string>\n";
|
||||
@ -1316,8 +1319,8 @@ sub family_preference_list {
|
||||
print "[$f] ";
|
||||
}
|
||||
}
|
||||
$cfg .= " </edit>\n";
|
||||
$cfg .= " </match>\n";
|
||||
$cfg .= "\t\t</edit>\n";
|
||||
$cfg .= "\t</match>\n";
|
||||
}
|
||||
if ($VERBOSITY >= $VERBOSITY_DEBUG) {
|
||||
print "\n";
|
||||
@ -1414,12 +1417,24 @@ sub family_preference_config {
|
||||
$suse_pref .= "<fontconfig>\n";
|
||||
if (!$user) {
|
||||
$suse_pref .= "\t<!-- Let user override here defined system setting. -->\n";
|
||||
$suse_pref .= "\t<match target=\"pattern\">\n";
|
||||
$suse_pref .= "\t\t<edit name=\"user_preference_list\" mode=\"assign\">\n";
|
||||
$suse_pref .= "\t\t\t<bool>false</bool>\n";
|
||||
$suse_pref .= "\t\t</edit>\n";
|
||||
$suse_pref .= "\t</match>\n";
|
||||
$suse_pref .= "\t<include ignore_missing=\"yes\" prefix=\"xdg\">fontconfig/family-prefer.conf</include>\n";
|
||||
}
|
||||
else {
|
||||
$suse_pref .= "\t<match target=\"pattern\">\n";
|
||||
$suse_pref .= "\t\t<edit name=\"user_preference_list\" mode=\"assign\">\n";
|
||||
$suse_pref .= "\t\t\t<bool>true</bool>\n";
|
||||
$suse_pref .= "\t\t</edit>\n";
|
||||
$suse_pref .= "\t</match>\n";
|
||||
}
|
||||
$suse_pref .= "\n";
|
||||
$suse_pref .= family_preference_list("sans-serif", $OPT_SANS_FAMILIES);
|
||||
$suse_pref .= family_preference_list("serif", $OPT_SERIF_FAMILIES);
|
||||
$suse_pref .= family_preference_list("monospace", $OPT_MONO_FAMILIES);
|
||||
$suse_pref .= family_preference_list("sans-serif", $OPT_SANS_FAMILIES, $user);
|
||||
$suse_pref .= family_preference_list("serif", $OPT_SERIF_FAMILIES, $user);
|
||||
$suse_pref .= family_preference_list("monospace", $OPT_MONO_FAMILIES, $user);
|
||||
$suse_pref .= "</fontconfig>\n";
|
||||
|
||||
if ($VERBOSITY >= $VERBOSITY_DEBUG) {
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 23 12:02:33 UTC 2015 - pgajdos@suse.com
|
||||
|
||||
- updated to 20150423:
|
||||
* hide local system family preference list when user's one is
|
||||
in action
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 21 13:34:43 UTC 2015 - pgajdos@suse.com
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user