- 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/package/show/M17N/fonts-config?expand=0&rev=52
This commit is contained in:
Petr Gajdos 2014-06-04 11:56:54 +00:00 committed by Git OBS Bridge
parent 45f26af746
commit 0213cadb57
4 changed files with 68 additions and 16 deletions

View File

@ -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,
@ -1171,24 +1186,42 @@ sub family_preference_list {
} }
if ($VERBOSITY >= $VERBOSITY_DEBUG) { if ($VERBOSITY >= $VERBOSITY_DEBUG) {
print "--- Prefered $family families: "; if (! $OPT_FORCE_FPL) {
print "--- Prefered $family families: ";
} else {
print "--- Strongly prefered $family families: ";
}
} }
$family =~ s/&/&amp;/g; $family =~ s/&/&amp;/g;
$cfg .= " <alias>\n"; if (! $OPT_FORCE_FPL) {
$cfg .= " <family>$family</family>\n"; $cfg .= " <alias>\n";
$cfg .= " <prefer>\n"; $cfg .= " <family>$family</family>\n";
for my $f (@families) { $cfg .= " <prefer>\n";
$f =~ s/&/&amp;/g; for my $f (@families) {
$cfg .= " <family>$f</family>\n"; $f =~ s/&/&amp;/g;
if ($VERBOSITY >= $VERBOSITY_DEBUG) { $cfg .= " <family>$f</family>\n";
print "[$f] "; if ($VERBOSITY >= $VERBOSITY_DEBUG) {
print "[$f] ";
}
} }
$cfg .= " </prefer>\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/&/&amp;/g;
$cfg .= " <string>$f</string>\n";
if ($VERBOSITY >= $VERBOSITY_DEBUG) {
print "[$f] ";
}
}
$cfg .= " </edit>\n";
$cfg .= " </match>\n";
} }
$cfg .= " </prefer>\n";
$cfg .= " </alias>\n";
if ($VERBOSITY >= $VERBOSITY_DEBUG) { if ($VERBOSITY >= $VERBOSITY_DEBUG) {
print "\n"; print "\n";
} }

View File

@ -1,9 +1,11 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 4 06:22:54 UTC 2014 - pgajdos@suse.com Wed Jun 4 06:22:54 UTC 2014 - pgajdos@suse.com
- remove duplicate family from PREFER_SERIF_FAMILIES in CFF - updated to 20140604:
example * remove duplicate family from PREFER_SERIF_FAMILIES in CFF
- add Source Serif Pro to PREFER_SERIF_FAMILIES in CFF example 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

View File

@ -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

View File

@ -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