forked from pool/fonts-config
Accepting request 236855 from M17N
- 10-rendering-options.conf and 58-family-prefer-local.conf are generated in every fonts-config call and as such should not be under /usr/share/fonts-config/conf.avail but under /etc/fonts/conf.d/ [bnc#882029] - updated to 20140604: * remove duplicate family from PREFER_SERIF_FAMILIES in CFF example * add Source Serif Pro to PREFER_SERIF_FAMILIES in CFF example * introduce FORCE_FAMILY_PREFERENCE_LISTS sysconfig variable OBS-URL: https://build.opensuse.org/request/show/236855 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fonts-config?expand=0&rev=40
This commit is contained in:
commit
98b3f2a062
39
fonts-config
39
fonts-config
@ -112,6 +112,14 @@ with that. Metric compatibility means that every glyph, say 'A', has
|
|||||||
the same width and height in both fonts, so document should have same
|
the same width and height in both fonts, so document should have same
|
||||||
line wraps for example.
|
line wraps for example.
|
||||||
|
|
||||||
|
=item B<--(no)forcefpl>
|
||||||
|
|
||||||
|
Value of B<--*-families> can be overriden, when document or GUI is
|
||||||
|
requesting some particular font. This is very often intended.
|
||||||
|
|
||||||
|
With B<--forcefpl>, it is possible to override all such requests with
|
||||||
|
fonts listed in family preference lists (FPLs).
|
||||||
|
|
||||||
=item B<--(no)ttcap>
|
=item B<--(no)ttcap>
|
||||||
|
|
||||||
Generate (or don't generate) TTCap entries. TTCap entries can be used
|
Generate (or don't generate) TTCap entries. TTCap entries can be used
|
||||||
@ -274,6 +282,10 @@ B<--mono-families> option.
|
|||||||
|
|
||||||
can be set to "yes" or "no" and is bound to B<--(no)metric> option.
|
can be set to "yes" or "no" and is bound to B<--(no)metric> option.
|
||||||
|
|
||||||
|
=item FORCE_FAMILY_PREFERENCE_LISTS
|
||||||
|
|
||||||
|
can be set to "yes" or "no" and is bound to B<--(no)forcefpl> option.
|
||||||
|
|
||||||
=item GENERATE_TTCAP_ENTRIES
|
=item GENERATE_TTCAP_ENTRIES
|
||||||
|
|
||||||
can be set to "yes" or "no" and sets the default for the option B<--(no)ttcap>.
|
can be set to "yes" or "no" and sets the default for the option B<--(no)ttcap>.
|
||||||
@ -326,6 +338,7 @@ my $OPT_SANS_FAMILIES = "";
|
|||||||
my $OPT_SERIF_FAMILIES = "";
|
my $OPT_SERIF_FAMILIES = "";
|
||||||
my $OPT_MONO_FAMILIES = "";
|
my $OPT_MONO_FAMILIES = "";
|
||||||
my $OPT_SEARCH_METRIC_COMPATIBLE = 1;
|
my $OPT_SEARCH_METRIC_COMPATIBLE = 1;
|
||||||
|
my $OPT_FORCE_FPL = 0;
|
||||||
my $OPT_TTCAP = 0;
|
my $OPT_TTCAP = 0;
|
||||||
my $OPT_JAVA = 1;
|
my $OPT_JAVA = 1;
|
||||||
my $OPT_VERSION = 0;
|
my $OPT_VERSION = 0;
|
||||||
@ -352,6 +365,7 @@ my %sysconfig_options = (
|
|||||||
"PREFER_SERIF_FAMILIES" , "OPT_SERIF_FAMILIES",
|
"PREFER_SERIF_FAMILIES" , "OPT_SERIF_FAMILIES",
|
||||||
"PREFER_MONO_FAMILIES" , "OPT_MONO_FAMILIES",
|
"PREFER_MONO_FAMILIES" , "OPT_MONO_FAMILIES",
|
||||||
"SEARCH_METRIC_COMPATIBLE" , "OPT_SEARCH_METRIC_COMPATIBLE",
|
"SEARCH_METRIC_COMPATIBLE" , "OPT_SEARCH_METRIC_COMPATIBLE",
|
||||||
|
"FORCE_FAMILY_PREFERENCE_LISTS" , "OPT_FORCE_FPL",
|
||||||
"GENERATE_TTCAP_ENTRIES" , "OPT_TTCAP",
|
"GENERATE_TTCAP_ENTRIES" , "OPT_TTCAP",
|
||||||
"GENERATE_JAVA_FONT_SETUP" , "OPT_JAVA",
|
"GENERATE_JAVA_FONT_SETUP" , "OPT_JAVA",
|
||||||
);
|
);
|
||||||
@ -379,6 +393,7 @@ unless (GetOptions(\%opt,
|
|||||||
'serif-families=s', \$OPT_SERIF_FAMILIES,
|
'serif-families=s', \$OPT_SERIF_FAMILIES,
|
||||||
'mono-families=s', \$OPT_MONO_FAMILIES,
|
'mono-families=s', \$OPT_MONO_FAMILIES,
|
||||||
'metric!', \$OPT_SEARCH_METRIC_COMPATIBLE,
|
'metric!', \$OPT_SEARCH_METRIC_COMPATIBLE,
|
||||||
|
'forcefpl!', \$OPT_FORCE_FPL,
|
||||||
'ttcap!', \$OPT_TTCAP,
|
'ttcap!', \$OPT_TTCAP,
|
||||||
'java!', \$OPT_JAVA,
|
'java!', \$OPT_JAVA,
|
||||||
'version', \$OPT_VERSION,
|
'version', \$OPT_VERSION,
|
||||||
@ -1022,7 +1037,7 @@ sub create_symbolic_links {
|
|||||||
#
|
#
|
||||||
|
|
||||||
sub rendering_options {
|
sub rendering_options {
|
||||||
my $suse_rendering_file = "/usr/share/fonts-config/conf.avail/10-rendering-options.conf";
|
my $suse_rendering_file = "/etc/fonts/conf.d/10-rendering-options.conf";
|
||||||
my $suse_rendering_template_file = "/usr/share/fonts-config/10-rendering-options.conf.template";
|
my $suse_rendering_template_file = "/usr/share/fonts-config/10-rendering-options.conf.template";
|
||||||
my $suse_rendering = "";
|
my $suse_rendering = "";
|
||||||
my $suse_rendering_template = "";
|
my $suse_rendering_template = "";
|
||||||
@ -1171,11 +1186,16 @@ sub family_preference_list {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($VERBOSITY >= $VERBOSITY_DEBUG) {
|
if ($VERBOSITY >= $VERBOSITY_DEBUG) {
|
||||||
|
if (! $OPT_FORCE_FPL) {
|
||||||
print "--- Prefered $family families: ";
|
print "--- Prefered $family families: ";
|
||||||
|
} else {
|
||||||
|
print "--- Strongly prefered $family families: ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$family =~ s/&/&/g;
|
$family =~ s/&/&/g;
|
||||||
|
|
||||||
|
if (! $OPT_FORCE_FPL) {
|
||||||
$cfg .= " <alias>\n";
|
$cfg .= " <alias>\n";
|
||||||
$cfg .= " <family>$family</family>\n";
|
$cfg .= " <family>$family</family>\n";
|
||||||
$cfg .= " <prefer>\n";
|
$cfg .= " <prefer>\n";
|
||||||
@ -1188,7 +1208,20 @@ sub family_preference_list {
|
|||||||
}
|
}
|
||||||
$cfg .= " </prefer>\n";
|
$cfg .= " </prefer>\n";
|
||||||
$cfg .= " </alias>\n";
|
$cfg .= " </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";
|
||||||
|
for my $f (@families) {
|
||||||
|
$f =~ s/&/&/g;
|
||||||
|
$cfg .= " <string>$f</string>\n";
|
||||||
|
if ($VERBOSITY >= $VERBOSITY_DEBUG) {
|
||||||
|
print "[$f] ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$cfg .= " </edit>\n";
|
||||||
|
$cfg .= " </match>\n";
|
||||||
|
}
|
||||||
if ($VERBOSITY >= $VERBOSITY_DEBUG) {
|
if ($VERBOSITY >= $VERBOSITY_DEBUG) {
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
@ -1197,7 +1230,7 @@ sub family_preference_list {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub family_preference_config {
|
sub family_preference_config {
|
||||||
my $suse_pref_file = "/usr/share/fonts-config/conf.avail/58-family-prefer-local.conf";
|
my $suse_pref_file = "/etc/fonts/conf.d/58-family-prefer-local.conf";
|
||||||
my $metric_file = "/usr/share/fontconfig/conf.avail/30-metric-aliases.conf";
|
my $metric_file = "/usr/share/fontconfig/conf.avail/30-metric-aliases.conf";
|
||||||
my $bw_metric_file = "/usr/share/fonts-config/conf.avail/31-metric-aliases-bw.conf";
|
my $bw_metric_file = "/usr/share/fonts-config/conf.avail/31-metric-aliases-bw.conf";
|
||||||
my $metric_symlink = "/etc/fonts/conf.d/30-metric-aliases.conf";
|
my $metric_symlink = "/etc/fonts/conf.d/30-metric-aliases.conf";
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 11 09:53:01 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- 10-rendering-options.conf and 58-family-prefer-local.conf are
|
||||||
|
generated in every fonts-config call and as such should not
|
||||||
|
be under /usr/share/fonts-config/conf.avail but under
|
||||||
|
/etc/fonts/conf.d/ [bnc#882029]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 4 06:22:54 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- updated to 20140604:
|
||||||
|
* remove duplicate family from PREFER_SERIF_FAMILIES in CFF
|
||||||
|
example
|
||||||
|
* add Source Serif Pro to PREFER_SERIF_FAMILIES in CFF example
|
||||||
|
* introduce FORCE_FAMILY_PREFERENCE_LISTS sysconfig variable
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 22 10:45:16 UTC 2014 - pgajdos@suse.com
|
Thu May 22 10:45:16 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
%define infinality_srcver 1-20130104_1
|
%define infinality_srcver 1-20130104_1
|
||||||
%define infinality_name fontconfig-infinality
|
%define infinality_name fontconfig-infinality
|
||||||
Name: fonts-config
|
Name: fonts-config
|
||||||
Version: 20140321
|
Version: 20140604
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Configures Fonts for X Windows and other applications
|
Summary: Configures Fonts for X Windows and other applications
|
||||||
License: GPL-2.0+ and MIT
|
License: GPL-2.0+ and MIT
|
||||||
@ -95,9 +95,16 @@ pod2man --section 1 --center=" " %{SOURCE0} > \
|
|||||||
%{buildroot}/%{_mandir}/man1/fonts-config.1
|
%{buildroot}/%{_mandir}/man1/fonts-config.1
|
||||||
#
|
#
|
||||||
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/%{name}
|
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/%{name}
|
||||||
mkdir %{buildroot}%{_datadir}/%{name}/conf.avail/
|
mkdir -p %{buildroot}%{_fontsconfavaildir}
|
||||||
|
# following two conf files can not be under /usr/share/fonts-config
|
||||||
|
# as they are changed during installation [bnc#882029 (internal)]
|
||||||
|
mkdir -p %{buildroot}%{_fontsconfddir}
|
||||||
for conf in 10-rendering-options.conf \
|
for conf in 10-rendering-options.conf \
|
||||||
10-group-tt-hinted-fonts.conf \
|
58-family-prefer-local.conf; do
|
||||||
|
install -m 644 $conf %{buildroot}%{_fontsconfddir}
|
||||||
|
done
|
||||||
|
#
|
||||||
|
for conf in 10-group-tt-hinted-fonts.conf \
|
||||||
10-group-tt-non-hinted-fonts.conf \
|
10-group-tt-non-hinted-fonts.conf \
|
||||||
11-base-rendering.conf \
|
11-base-rendering.conf \
|
||||||
12-tt-monospace-rendering.conf \
|
12-tt-monospace-rendering.conf \
|
||||||
@ -105,10 +112,9 @@ for conf in 10-rendering-options.conf \
|
|||||||
13-selective-rendering-ipa.conf \
|
13-selective-rendering-ipa.conf \
|
||||||
31-metric-aliases-bw.conf \
|
31-metric-aliases-bw.conf \
|
||||||
49-family-default.conf \
|
49-family-default.conf \
|
||||||
58-family-prefer-local.conf \
|
|
||||||
60-family-prefer.conf \
|
60-family-prefer.conf \
|
||||||
61-wine-aliases.conf \
|
61-wine-aliases.conf \
|
||||||
70-reject.conf; do \
|
70-reject.conf; do
|
||||||
install -m 644 $conf %{buildroot}%{_datadir}/%{name}/conf.avail/
|
install -m 644 $conf %{buildroot}%{_datadir}/%{name}/conf.avail/
|
||||||
%link_avail_to_system_fontsconf $conf
|
%link_avail_to_system_fontsconf $conf
|
||||||
done
|
done
|
||||||
@ -134,6 +140,6 @@ exit 0
|
|||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_localstatedir}/adm/fillup-templates/sysconfig.fonts-config
|
%{_localstatedir}/adm/fillup-templates/sysconfig.fonts-config
|
||||||
%{_fontsconfavaildir}/*.conf
|
%{_fontsconfavaildir}/*.conf
|
||||||
%{_fontsconfddir}/*.conf
|
%config %{_fontsconfddir}/*.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -141,7 +141,7 @@ PREFER_SANS_FAMILIES=""
|
|||||||
# system to use CFF fonts (if at least one of them installed). See
|
# system to use CFF fonts (if at least one of them installed). See
|
||||||
# http://fontinfo.opensuse.org/fontformats.html for details.
|
# http://fontinfo.opensuse.org/fontformats.html for details.
|
||||||
#
|
#
|
||||||
# PREFER_SERIF_FAMILIES="CMU Serif:CMU Serif Extra:Linux Libertine O:Crimson:Old Standard:Rachana:Latin Modern Roman:Latin Modern Roman"
|
# PREFER_SERIF_FAMILIES="Source Serif Pro:CMU Serif:CMU Serif Extra:Linux Libertine O:Crimson:Old Standard:Rachana:Latin Modern Roman"
|
||||||
#
|
#
|
||||||
# Other example gives the preference to bitmap fonts for various scripts.
|
# Other example gives the preference to bitmap fonts for various scripts.
|
||||||
#
|
#
|
||||||
@ -189,6 +189,23 @@ PREFER_MONO_FAMILIES=""
|
|||||||
#
|
#
|
||||||
SEARCH_METRIC_COMPATIBLE="yes"
|
SEARCH_METRIC_COMPATIBLE="yes"
|
||||||
|
|
||||||
|
## Path: Desktop
|
||||||
|
## Description: Display font configuration
|
||||||
|
## Type: yesno
|
||||||
|
## Default: yes
|
||||||
|
#
|
||||||
|
# Strongly prefer of families in FPL.
|
||||||
|
#
|
||||||
|
# Brute-force preference of families listed in PREFER_*_FAMILIES. This
|
||||||
|
# overrides not only other preference lists, but also document (incl.
|
||||||
|
# webfonts) and even _user_ _selection_ of the family.
|
||||||
|
#
|
||||||
|
# Set to "yes" when you really don't want to see other fonts
|
||||||
|
# than listed in preference lists. Other fonts are used only if
|
||||||
|
# families from FPLs do not cover requested charset.
|
||||||
|
#
|
||||||
|
FORCE_FAMILY_PREFERENCE_LISTS="no"
|
||||||
|
|
||||||
## Path: Desktop
|
## Path: Desktop
|
||||||
## Description: Display font configuration
|
## Description: Display font configuration
|
||||||
## Type: yesno
|
## Type: yesno
|
||||||
|
Loading…
x
Reference in New Issue
Block a user