File fonts-config-no-search-metric-compatible.patch of Package fonts-config

iff --git a/31-metric-aliases-bw.conf b/31-metric-aliases-bw.conf
index 4dbb445..03de966 100644
--- a/31-metric-aliases-bw.conf
+++ b/31-metric-aliases-bw.conf
@@ -5,9 +5,6 @@
              are not well hinted. Fall back to Liberation Sans instead, when
              black and white rendering was chosen. -->
         <match target="pattern">
-		<test name="search_metric_aliases">
-			<bool>true</bool>
-		</test>
                 <test name="force_bw">
                         <bool>true</bool>
                 </test>
@@ -21,9 +18,6 @@
                 </edit>
         </match>
         <match target="pattern">
-		<test name="search_metric_aliases">
-			<bool>true</bool>
-		</test>
                 <test name="force_bw">
                         <bool>true</bool>
                 </test>
@@ -37,9 +31,6 @@
                 </edit>
         </match>
         <match target="pattern">
-		<test name="search_metric_aliases">
-			<bool>true</bool>
-		</test>
                 <test name="force_bw">
                         <bool>true</bool>
                 </test>
diff --git a/fonts-config b/fonts-config
index c8aace0..01d8129 100644
--- a/fonts-config
+++ b/fonts-config
@@ -98,20 +98,6 @@ prefered over system preference list of serif families*).
 
 *) see /etc/fonts/conf.d/60-family-prefer.conf for details
 
-=item B<--(no)metric>
-
-Value of B<--*-families> can be overriden when document 
-or GUI is requesting metric compatible font as defined
-    in /etc/fonts/conf.d/30-metric-aliases.conf,
-e. g. request to Times New Roman will get Liberation Serif
-even if other family is explicitely prefered by B<--serif-families>
-option. (hint, that's because binding="same" in that fontconfig)
-
-You can change this default behaviour with B<--nometric>, but be careful
-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 
@@ -291,10 +277,6 @@ B<--serif-families> option.
 can be set to colon separated list of monospace families, bound to the
 B<--mono-families> option.
 
-=item SEARCH_METRIC_COMPATIBLE
-
-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.
@@ -396,10 +378,6 @@ my %files = (
                  "rendering config template",           "/usr/share/fonts-config/10-rendering-options.conf.template",
                  "rendering config",                    "/etc/fonts/conf.d/10-rendering-options.conf",
                  "user rendering config",               "fontconfig/rendering-options.conf",
-                 "metric compatibility symlink",        "/etc/fonts/conf.d/30-metric-aliases.conf",
-                 "metric compatibility config",         "/etc/fonts/conf.d/30-metric-aliases.conf",
-                 "metric compatibility avail",          "/usr/share/fontconfig/conf.avail/30-metric-aliases.conf",
-                 "metric compatibility bw symlink",     "/etc/fonts/conf.d/31-metric-aliases-bw.conf",
                  "local family list",                   "/etc/fonts/conf.d/58-family-prefer-local.conf",
                  "user family list",                    "fontconfig/family-prefer.conf",
                  "java fontconfig properties template", "/usr/share/fonts-config/fontconfig.SUSE.properties.template",
@@ -434,7 +412,6 @@ unless (GetOptions(\%opt,
                    'sans-families=s',        \$OPT_SANS_FAMILIES,
                    '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,
@@ -1346,41 +1323,9 @@ sub family_preference_list {
   return $cfg;  
 }
 
-sub family_metric_compatibility  {
-  my ($fontconfig_metric_conf, $user) = @_;
-  my $suse_metric = "";
-
-  if (-f "$fontconfig_metric_conf") {
-    open (CONF, "$fontconfig_metric_conf") || die "can't open file $fontconfig_metric_conf: $!";
-    binmode CONF, ":utf8";
-    while (<CONF>) {
-      $suse_metric .= $ARG;
-      if ($ARG =~ /<alias.*>/) {
-        $suse_metric .= "\t  <test name=\"search_metric_aliases\"><bool>true</bool></test>\n"
-      } elsif ($ARG =~ /<!DOCTYPE.*>/) {
-        $suse_metric .= "\n";
-        $suse_metric .= "<!-- DO NOT EDIT; this is a generated file -->\n";
-        $suse_metric .= "<!-- modify $files{($user ? 'user syconfig file' : 'sysconfig file')} && run $0 instead -->\n";
-        $suse_metric .= "\n";
-      }
-    }
-    close (CONF);
-  } else {
-      if ($VERBOSITY >= $VERBOSITY_DEBUG) {
-        print "--- WARNING: $fontconfig_metric_conf doesn't exist!\n";
-      }
-  }
-
-  return $suse_metric;
-}
-
 sub family_preference_config {
   my ($user) = @_;
   my $suse_pref_file = $files{'local family list'};
-  my $suse_metric_file = $files{'metric compatibility config'};
-  my $metric_symlink = $files{'metric compatibility symlink'};
-  my $metric_avail = $files{'metric compatibility avail'};
-  my $suse_metric = "";
   my $suse_pref = "";
   my $edit_options;
 
@@ -1396,35 +1341,6 @@ sub family_preference_config {
     printf "--- generating  $suse_pref_file ---\n";
   }
 
-  if (!$user)
-  {
-    if (-e $metric_avail) {
-      # replace fontconfig's /etc/fonts/conf.d/30-metric-aliases.conf
-      # by fonts-config's one
-
-      if (-l $metric_symlink) {
-        my_remove_symlink($metric_symlink);
-      }
-
-      $suse_metric .= family_metric_compatibility($metric_avail, $user);
-
-      if ($VERBOSITY >= $VERBOSITY_DEBUG) {
-        print "--- writing $suse_metric_file ---\n";
-        print "---\n";
-      }
-      # same name as symlink from fontconfig
-      open (CONF, ">$suse_metric_file") || die "can't open file $suse_metric_file: $!";
-      print CONF $suse_metric;
-      close (CONF);
-    }
-    else {
-      if ($VERBOSITY >= $VERBOSITY_DEBUG) {
-        print "--- WARNING: $metric_avail not found, not writing $suse_metric_file ---\n";
-        print "---\n";
-      }
-    }
-  }
-
   $suse_pref .= "<?xml version=\"1.0\"?>\n";
   $suse_pref .= "<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\n";
   $suse_pref .= "\n";

openSUSE Build Service is sponsored by