From d6fcaa8b3ccbd1f273a01dd12de85130ecf58d3759286e78f5f6e38c4da960a8 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 4 Jun 2014 06:24:18 +0000 Subject: [PATCH 1/5] - remove duplicate family from PREFER_SERIF_FAMILIES in CFF example OBS-URL: https://build.opensuse.org/package/show/M17N/fonts-config?expand=0&rev=50 --- fonts-config.changes | 6 ++++++ sysconfig.fonts-config | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/fonts-config.changes b/fonts-config.changes index 972caf0..79b5b58 100644 --- a/fonts-config.changes +++ b/fonts-config.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 4 06:22:54 UTC 2014 - pgajdos@suse.com + +- remove duplicate family from PREFER_SERIF_FAMILIES in CFF + example + ------------------------------------------------------------------- Thu May 22 10:45:16 UTC 2014 - pgajdos@suse.com diff --git a/sysconfig.fonts-config b/sysconfig.fonts-config index 93fc549..dec3234 100644 --- a/sysconfig.fonts-config +++ b/sysconfig.fonts-config @@ -141,7 +141,7 @@ PREFER_SANS_FAMILIES="" # system to use CFF fonts (if at least one of them installed). See # 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="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. # From 45f26af746e531e5173c7509e04ead51980a2fbfaaa33348686090e506839b3d Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 4 Jun 2014 07:15:30 +0000 Subject: [PATCH 2/5] - add Source Serif Pro to PREFER_SERIF_FAMILIES in CFF example OBS-URL: https://build.opensuse.org/package/show/M17N/fonts-config?expand=0&rev=51 --- fonts-config.changes | 1 + sysconfig.fonts-config | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fonts-config.changes b/fonts-config.changes index 79b5b58..109e9d0 100644 --- a/fonts-config.changes +++ b/fonts-config.changes @@ -3,6 +3,7 @@ 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 ------------------------------------------------------------------- Thu May 22 10:45:16 UTC 2014 - pgajdos@suse.com diff --git a/sysconfig.fonts-config b/sysconfig.fonts-config index dec3234..24b42a3 100644 --- a/sysconfig.fonts-config +++ b/sysconfig.fonts-config @@ -141,7 +141,7 @@ PREFER_SANS_FAMILIES="" # system to use CFF fonts (if at least one of them installed). See # 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" +# 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. # From 0213cadb5718aa7fbdd79e904947b36c2dabfc9922b73070d52d9cea4e1edfd0 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 4 Jun 2014 11:56:54 +0000 Subject: [PATCH 3/5] - 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 From bec604845b0c47d922c7de3402c01adb4f82eb18051ab9c0278282c8e7c99a51 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 11 Jun 2014 09:55:22 +0000 Subject: [PATCH 4/5] - 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] OBS-URL: https://build.opensuse.org/package/show/M17N/fonts-config?expand=0&rev=53 --- fonts-config.changes | 8 ++++++++ fonts-config.spec | 18 ++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/fonts-config.changes b/fonts-config.changes index 9be9b34..e3bc039 100644 --- a/fonts-config.changes +++ b/fonts-config.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +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 diff --git a/fonts-config.spec b/fonts-config.spec index 0b55cd4..85ac6d7 100644 --- a/fonts-config.spec +++ b/fonts-config.spec @@ -95,9 +95,16 @@ pod2man --section 1 --center=" " %{SOURCE0} > \ %{buildroot}/%{_mandir}/man1/fonts-config.1 # install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/%{name} -mkdir %{buildroot}%{_datadir}/%{name}/conf.avail/ -for conf in 10-rendering-options.conf \ - 10-group-tt-hinted-fonts.conf \ +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 \ + 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 \ 11-base-rendering.conf \ 12-tt-monospace-rendering.conf \ @@ -105,10 +112,9 @@ for conf in 10-rendering-options.conf \ 13-selective-rendering-ipa.conf \ 31-metric-aliases-bw.conf \ 49-family-default.conf \ - 58-family-prefer-local.conf \ 60-family-prefer.conf \ 61-wine-aliases.conf \ - 70-reject.conf; do \ + 70-reject.conf; do install -m 644 $conf %{buildroot}%{_datadir}/%{name}/conf.avail/ %link_avail_to_system_fontsconf $conf done @@ -134,6 +140,6 @@ exit 0 %{_docdir}/%{name} %{_localstatedir}/adm/fillup-templates/sysconfig.fonts-config %{_fontsconfavaildir}/*.conf -%{_fontsconfddir}/*.conf +%config %{_fontsconfddir}/*.conf %changelog From 70afd9ae29cc7b4aceb8cf5363c77374912c5fafc6819644962b977d52738efd Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 11 Jun 2014 11:17:13 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/M17N/fonts-config?expand=0&rev=54 --- fonts-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fonts-config b/fonts-config index 84a743e..ff25bd0 100644 --- a/fonts-config +++ b/fonts-config @@ -1037,7 +1037,7 @@ sub create_symbolic_links { # 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 = ""; my $suse_rendering_template = ""; @@ -1230,7 +1230,7 @@ sub family_preference_list { } 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 $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";