Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Akira TAGOH
938b90f307 Remove the debug print in fc-query. (#1509790) 2017-11-08 17:25:35 +09:00
Akira TAGOH
c07053bf30 Backport a patch to change the order of the emoji fonts. (#1496761) 2017-10-05 21:00:25 +09:00
Akira TAGOH
1161c4a337 Revert URW changes in the config. 2017-10-03 19:51:38 +09:00
Akira TAGOH
812cb7e365 Revert URW changes in the config. 2017-10-03 19:51:26 +09:00
Akira TAGOH
74db2e7ea3 Revert URW changes in the config. 2017-10-03 19:50:51 +09:00
4 changed files with 320 additions and 1 deletions

94
fontconfig-emoji.patch Normal file
View file

@ -0,0 +1,94 @@
From b861a2a5b09e06795dea4de6e72447d364b89473 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 5 Oct 2017 12:17:59 +0200
Subject: [PATCH] conf: Prefer system emoji fonts to third-party ones
Prefer the system provided emoji fonts on systems which provide one,
such as Windows, MacOS and Android, even if the Emoji One or Emoji Two
fonts are installed.
This also allows free software OSes such as GNOME to prefer the Emoji
One font, which is not used in other OSes and therefore has a unique
brand identity, by installing them and only them by default.
Users can use more capable fonts while Emoji One and Emoji Two catch up
by installing a font otherwise already used by another system, such as
Google's freely redistributable Noto Emoji font.
https://bugzilla.redhat.com/show_bug.cgi?id=1496761
---
conf.d/45-generic.conf | 16 +++++++++-------
conf.d/60-generic.conf | 5 +++--
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/conf.d/45-generic.conf b/conf.d/45-generic.conf
index f6076bb..791d12d 100644
--- a/conf.d/45-generic.conf
+++ b/conf.d/45-generic.conf
@@ -5,32 +5,34 @@
<!-- Emoji -->
+ <!-- System emoji -->
<alias binding="same">
- <family>Emoji Two</family>
+ <family>Noto Color Emoji</family> <!-- Google -->
<default><family>emoji</family></default>
</alias>
<alias binding="same">
- <family>Emoji One</family>
+ <family>Apple Color Emoji</family> <!-- Apple -->
<default><family>emoji</family></default>
</alias>
<alias binding="same">
- <family>Noto Color Emoji</family> <!-- Google -->
+ <family>Segoe UI Emoji</family> <!-- Microsoft -->
<default><family>emoji</family></default>
</alias>
<alias binding="same">
- <family>Apple Color Emoji</family> <!-- Apple -->
+ <family>Twitter Color Emoji</family> <!-- Twitter -->
<default><family>emoji</family></default>
</alias>
<alias binding="same">
- <family>Segoe UI Emoji</family> <!-- Microsoft -->
+ <family>EmojiOne Mozilla</family> <!-- Mozilla -->
<default><family>emoji</family></default>
</alias>
+ <!-- Third-party emoji -->
<alias binding="same">
- <family>Twitter Color Emoji</family> <!-- Twitter -->
+ <family>Emoji Two</family>
<default><family>emoji</family></default>
</alias>
<alias binding="same">
- <family>EmojiOne Mozilla</family> <!-- Mozilla -->
+ <family>Emoji One</family>
<default><family>emoji</family></default>
</alias>
<!-- B&W -->
diff --git a/conf.d/60-generic.conf b/conf.d/60-generic.conf
index 2a2b809..7985ce9 100644
--- a/conf.d/60-generic.conf
+++ b/conf.d/60-generic.conf
@@ -29,14 +29,15 @@
<alias binding="same">
<family>emoji</family>
<prefer>
- <family>Emoji Two</family>
- <family>Emoji One</family>
<!-- System fonts -->
<family>Noto Color Emoji</family> <!-- Google -->
<family>Apple Color Emoji</family> <!-- Apple -->
<family>Segoe UI Emoji</family> <!-- Microsoft -->
<family>Twitter Color Emoji</family> <!-- Twitter -->
<family>EmojiOne Mozilla</family> <!-- Mozilla -->
+ <!-- Third-Party fonts -->
+ <family>Emoji Two</family>
+ <family>Emoji One</family>
<!-- Non-color -->
<family>Noto Emoji</family> <!-- Google -->
<family>Android Emoji</family> <!-- Google -->
--
2.14.1

View file

@ -0,0 +1,25 @@
From b56207a069be2574df455ede0a6ab61f44d5ca2b Mon Sep 17 00:00:00 2001
From: Behdad Esfahbod <behdad@behdad.org>
Date: Tue, 12 Sep 2017 13:25:46 -0400
Subject: [PATCH] Remove stray printf()
Ouch.
---
fc-query/fc-query.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fc-query/fc-query.c b/fc-query/fc-query.c
index 842a8b6..6cd5abd 100644
--- a/fc-query/fc-query.c
+++ b/fc-query/fc-query.c
@@ -170,7 +170,6 @@ main (int argc, char **argv)
FcPattern *pat;
id = ((instance_num << 16) + face_num);
- printf("id %d\n", id);
if (FT_New_Face (ftLibrary, argv[i], id, &face))
break;
num_faces = face->num_faces;
--
2.13.6

183
fontconfig-revert-urw.patch Normal file
View file

@ -0,0 +1,183 @@
diff --git a/conf.d/30-metric-aliases.conf b/conf.d/30-metric-aliases.conf
index c755c5e..1f0778d 100644
--- a/conf.d/30-metric-aliases.conf
+++ b/conf.d/30-metric-aliases.conf
@@ -44,9 +44,6 @@ but in an order preferring similar designs first. We do this in three steps:
3) Alias each generic to its specifics.
e.g. Arial to Liberation Sans, Arimo, Albany, and Albany AMT
-NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
- upstream now includes them in their release of (URW)++ Core Font Set here:
- https://github.com/ArtifexSoftware/urw-base35-fonts/tree/master/fontconfig
-->
<!-- Map specifics to generics -->
@@ -311,6 +308,7 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
</default>
</alias>
+
<!-- Microsoft -->
<alias binding="same">
<family>Arimo</family>
@@ -462,6 +460,7 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
</default>
</alias>
+
<!-- Microsoft -->
<alias>
<family>Arial</family>
@@ -491,6 +490,8 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
</default>
</alias>
+
+
<!-- Map generics to specifics -->
<!-- PostScript -->
@@ -498,6 +499,8 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<family>Helvetica</family>
<accept>
<family>TeX Gyre Heros</family>
+ <family>Nimbus Sans</family>
+ <family>Nimbus Sans L</family>
</accept>
</alias>
@@ -505,6 +508,7 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<family>Helvetica Narrow</family>
<accept>
<family>TeX Gyre Heros Cn</family>
+ <family>Nimbus Sans Narrow</family>
</accept>
</alias>
@@ -512,6 +516,8 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<family>Times</family>
<accept>
<family>TeX Gyre Termes</family>
+ <family>Nimbus Roman</family>
+ <family>Nimbus Roman No9 L</family>
</accept>
</alias>
@@ -519,6 +525,9 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<family>Courier</family>
<accept>
<family>TeX Gyre Cursor</family>
+ <family>Nimbus Mono PS</family>
+ <family>Nimbus Mono</family>
+ <family>Nimbus Mono L</family>
</accept>
</alias>
@@ -526,6 +535,8 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<family>ITC Avant Garde Gothic</family>
<accept>
<family>TeX Gyre Adventor</family>
+ <family>URW Gothic</family>
+ <family>URW Gothic L</family>
</accept>
</alias>
@@ -534,6 +545,9 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<accept>
<family>Bookman Old Style</family>
<family>TeX Gyre Bonum</family>
+ <family>URW Bookman</family>
+ <family>Bookman URW</family>
+ <family>URW Bookman L</family>
</accept>
</alias>
@@ -541,6 +555,9 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<family>ITC Zapf Chancery</family>
<accept>
<family>TeX Gyre Chorus</family>
+ <family>Z003</family>
+ <family>Chancery URW</family>
+ <family>URW Chancery L</family>
</accept>
</alias>
@@ -549,6 +566,9 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<accept>
<family>Palatino Linotype</family>
<family>TeX Gyre Pagella</family>
+ <family>P052</family>
+ <family>Palladio URW</family>
+ <family>URW Palladio L</family>
</accept>
</alias>
@@ -557,6 +577,9 @@ NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
<accept>
<family>Century Schoolbook</family>
<family>TeX Gyre Schola</family>
+ <family>C059</family>
+ <family>Century SchoolBook URW</family>
+ <family>Century Schoolbook L</family>
</accept>
</alias>
diff --git a/conf.d/30-urw-aliases.conf b/conf.d/30-urw-aliases.conf
new file mode 100644
index 0000000..cfde071
--- /dev/null
+++ b/conf.d/30-urw-aliases.conf
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+<!--
+ URW provides metric and shape compatible fonts for some Adobe families.
+ Most of these are handled in 30-metric-aliases.conf.
+ -->
+ <alias binding="same">
+ <family>Zapf Dingbats</family>
+ <accept>
+ <family>D050000L</family>
+ <family>Dingbats</family>
+ </accept>
+ </alias>
+ <alias binding="same">
+ <family>ITC Zapf Dingbats</family>
+ <accept>
+ <family>D050000L</family>
+ <family>Dingbats</family>
+ </accept>
+ </alias>
+ <match target="pattern">
+ <test name="family" compare="eq" ignore-blanks="true">
+ <string>Symbol</string>
+ </test>
+ <edit name="family" mode="append" binding="same">
+ <string>Standard Symbols PS</string>
+ </edit>
+ <edit name="family" mode="append" binding="same">
+ <string>Standard Symbols L</string>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am
index ff03fb2..fd50a5d 100644
--- a/conf.d/Makefile.am
+++ b/conf.d/Makefile.am
@@ -29,6 +29,7 @@ CONF_LINKS = \
10-hinting-$(PREFERRED_HINTING).conf \
10-scale-bitmap-fonts.conf \
20-unhint-small-vera.conf \
+ 30-urw-aliases.conf \
30-metric-aliases.conf \
40-nonlatin.conf \
45-generic.conf \
@@ -69,6 +70,7 @@ template_DATA = \
11-lcdfilter-light.conf \
20-unhint-small-vera.conf \
25-unhint-nonlatin.conf \
+ 30-urw-aliases.conf \
30-metric-aliases.conf \
40-nonlatin.conf \
45-generic.conf \

View file

@ -3,7 +3,7 @@
Summary: Font configuration and customization library
Name: fontconfig
Version: 2.12.6
Release: 1%{?dist}
Release: 4%{?dist}
# src/ftglue.[ch] is in Public Domain
# src/fccache.c contains Public Domain code
# fc-case/CaseFolding.txt is in the UCD
@ -16,6 +16,11 @@ Source2: fc-cache
# https://bugzilla.redhat.com/show_bug.cgi?id=140335
Patch0: %{name}-sleep-less.patch
Patch1: %{name}-revert-urw.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1496761
Patch2: %{name}-emoji.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1509790
Patch3: %{name}-remove-debug-print-in-fc-query.patch
BuildRequires: expat-devel
BuildRequires: freetype-devel >= %{freetype_version}
@ -60,6 +65,9 @@ which is useful for developing applications that uses fontconfig.
%prep
%setup -q
%patch0 -p1 -b .sleep-less
%patch1 -p1 -b .urw
%patch2 -p1 -b .emoji
%patch3 -p1 -b .fc-query
%build
# We don't want to rebuild the docs, but we want to install the included ones.
@ -151,6 +159,15 @@ HOME=/root /usr/bin/fc-cache -s
%doc fontconfig-devel.txt fontconfig-devel
%changelog
* Wed Nov 8 2017 Akira TAGOH <tagoh@redhat.com> - 2.12.6-4
- Remove the debug print in fc-query. (#1509790)
* Thu Oct 5 2017 Akira TAGOH <tagoh@redhat.com> - 2.12.6-3
- Backport a patch to change the order of the emoji fonts. (#1496761)
* Tue Oct 3 2017 Akira TAGOH <tagoh@redhat.com> - 2.12.6-2
- Revert URW changes in the config.
* Thu Sep 21 2017 Akira TAGOH <tagoh@redhat.com> - 2.12.6-1
- New upstream release.