From 0213cadb5718aa7fbdd79e904947b36c2dabfc9922b73070d52d9cea4e1edfd0 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 4 Jun 2014 11:56:54 +0000 Subject: [PATCH] - 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 --- fonts-config | 57 +++++++++++++++++++++++++++++++++--------- fonts-config.changes | 8 +++--- fonts-config.spec | 2 +- sysconfig.fonts-config | 17 +++++++++++++ 4 files changed, 68 insertions(+), 16 deletions(-) diff --git a/fonts-config b/fonts-config index 8d12369..84a743e 100644 --- a/fonts-config +++ b/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 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> 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. +=item FORCE_FAMILY_PREFERENCE_LISTS + +can be set to "yes" or "no" and is bound to B<--(no)forcefpl> option. + =item GENERATE_TTCAP_ENTRIES 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_MONO_FAMILIES = ""; my $OPT_SEARCH_METRIC_COMPATIBLE = 1; +my $OPT_FORCE_FPL = 0; my $OPT_TTCAP = 0; my $OPT_JAVA = 1; my $OPT_VERSION = 0; @@ -352,6 +365,7 @@ my %sysconfig_options = ( "PREFER_SERIF_FAMILIES" , "OPT_SERIF_FAMILIES", "PREFER_MONO_FAMILIES" , "OPT_MONO_FAMILIES", "SEARCH_METRIC_COMPATIBLE" , "OPT_SEARCH_METRIC_COMPATIBLE", + "FORCE_FAMILY_PREFERENCE_LISTS" , "OPT_FORCE_FPL", "GENERATE_TTCAP_ENTRIES" , "OPT_TTCAP", "GENERATE_JAVA_FONT_SETUP" , "OPT_JAVA", ); @@ -379,6 +393,7 @@ unless (GetOptions(\%opt, 'serif-families=s', \$OPT_SERIF_FAMILIES, 'mono-families=s', \$OPT_MONO_FAMILIES, 'metric!', \$OPT_SEARCH_METRIC_COMPATIBLE, + 'forcefpl!', \$OPT_FORCE_FPL, 'ttcap!', \$OPT_TTCAP, 'java!', \$OPT_JAVA, 'version', \$OPT_VERSION, @@ -1171,24 +1186,42 @@ sub family_preference_list { } if ($VERBOSITY >= $VERBOSITY_DEBUG) { - print "--- Prefered $family families: "; + if (! $OPT_FORCE_FPL) { + print "--- Prefered $family families: "; + } else { + print "--- Strongly prefered $family families: "; + } } $family =~ s/&/&/g; - $cfg .= " \n"; - $cfg .= " $family\n"; - $cfg .= " \n"; - for my $f (@families) { - $f =~ s/&/&/g; - $cfg .= " $f\n"; - if ($VERBOSITY >= $VERBOSITY_DEBUG) { - print "[$f] "; + if (! $OPT_FORCE_FPL) { + $cfg .= " \n"; + $cfg .= " $family\n"; + $cfg .= " \n"; + for my $f (@families) { + $f =~ s/&/&/g; + $cfg .= " $f\n"; + if ($VERBOSITY >= $VERBOSITY_DEBUG) { + print "[$f] "; + } } + $cfg .= " \n"; + $cfg .= " \n"; + } else { + $cfg .= " \n"; + $cfg .= " $family\n"; + $cfg .= " \n"; + for my $f (@families) { + $f =~ s/&/&/g; + $cfg .= " $f\n"; + if ($VERBOSITY >= $VERBOSITY_DEBUG) { + print "[$f] "; + } + } + $cfg .= " \n"; + $cfg .= " \n"; } - $cfg .= " \n"; - $cfg .= " \n"; - if ($VERBOSITY >= $VERBOSITY_DEBUG) { print "\n"; } diff --git a/fonts-config.changes b/fonts-config.changes index 109e9d0..9be9b34 100644 --- a/fonts-config.changes +++ b/fonts-config.changes @@ -1,9 +1,11 @@ ------------------------------------------------------------------- Wed Jun 4 06:22:54 UTC 2014 - pgajdos@suse.com -- remove duplicate family from PREFER_SERIF_FAMILIES in CFF - example -- add Source Serif Pro to PREFER_SERIF_FAMILIES in CFF example +- 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 diff --git a/fonts-config.spec b/fonts-config.spec index 1aeda6d..0b55cd4 100644 --- a/fonts-config.spec +++ b/fonts-config.spec @@ -19,7 +19,7 @@ %define infinality_srcver 1-20130104_1 %define infinality_name fontconfig-infinality Name: fonts-config -Version: 20140321 +Version: 20140604 Release: 0 Summary: Configures Fonts for X Windows and other applications License: GPL-2.0+ and MIT diff --git a/sysconfig.fonts-config b/sysconfig.fonts-config index 24b42a3..db5572f 100644 --- a/sysconfig.fonts-config +++ b/sysconfig.fonts-config @@ -189,6 +189,23 @@ PREFER_MONO_FAMILIES="" # 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 ## Description: Display font configuration ## Type: yesno