Compare commits

...

14 Commits

Author SHA1 Message Date
Akira TAGOH 665584a19b Validate cache more carefully
Reject caches when FcPattern isn't a constant.
This is usually unlikely to happen but reported.
I've decided to add more validation since this isn't reproducible
and easy to have a workaround rather than investigating 'why'.

https://bugs.freedesktop.org/show_bug.cgi?id=103237
2017-11-14 20:59:27 +09:00
Alban Browaeys bc0240bf12 Fixes cleanup
Remove leftover references to run-test271.sh.
2017-10-17 16:39:42 +09:00
Behdad Esfahbod 73c45cde5f Remove stray printf()
Ouch.
2017-10-12 18:04:29 +09:00
Alexander Kanavin b5016e3018 src/fcxml.c: avoid double free() of filename
It's also freed after bail1, so no need to do it here.
2017-10-12 11:26:21 +09:00
Bastien Nocera ffee275e52 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
2017-10-05 20:32:03 +09:00
Akira TAGOH b546940435 Bump version to 2.12.6 2017-09-21 17:06:17 +09:00
Akira TAGOH fc08a0e9af Update libtool revision 2017-09-21 17:05:51 +09:00
Akira TAGOH 33c760ce2d Fix again to keep the same behavior to the return value of FcConfigParseAndLoad
https://bugs.freedesktop.org/show_bug.cgi?id=102141
2017-09-21 16:57:55 +09:00
Akira TAGOH 918ed92226 Revert "Keep the same behavior to the return value of FcConfigParseAndLoad"
This reverts commit dc56ff8040.
2017-09-21 16:57:42 +09:00
Florian Müllner 3b69b7ad92 build: Remove references to deleted file
Commit cc67d7df17 removed 30-urw-aliases.conf, so don't try to
install it.
2017-09-21 16:57:26 +09:00
David Kaspar [Dee'Kej] fa27b150fb conf.d: Drop aliases for (URW)++ fonts
They have become a part of (URW)++ upstream release now:
  https://github.com/ArtifexSoftware/urw-base35-fonts/tree/master/fontconfig
2017-09-21 16:57:08 +09:00
Akira TAGOH 0671eec812 und_zsye.orth: polish to get for NotoEmoji-Regular.ttf 2017-09-21 16:56:52 +09:00
Behdad Esfahbod 2c85f709ad [fc-query] Fix linking order 2017-09-21 16:54:14 +09:00
Behdad Esfahbod ef3252e027 Minor 2017-09-21 16:53:35 +09:00
15 changed files with 48 additions and 93 deletions

22
README
View File

@ -1,12 +1,30 @@
Fontconfig Fontconfig
Font configuration and customization library Font configuration and customization library
Version 2.12.5 Version 2.12.6
2017-09-09 2017-09-21
Check INSTALL for compilation and installation instructions. Check INSTALL for compilation and installation instructions.
Report bugs to https://bugs.freedesktop.org in the fontconfig module. Report bugs to https://bugs.freedesktop.org in the fontconfig module.
2.12.6
Akira TAGOH (4):
und_zsye.orth: polish to get for NotoEmoji-Regular.ttf
Revert "Keep the same behavior to the return value of FcConfigParseAndLoad"
Fix again to keep the same behavior to the return value of FcConfigParseAndLoad
Update libtool revision
Behdad Esfahbod (2):
Minor
[fc-query] Fix linking order
David Kaspar [Dee'Kej] (1):
conf.d: Drop aliases for (URW)++ fonts
Florian Müllner (1):
build: Remove references to deleted file
2.12.5 2.12.5
Akira TAGOH (17): Akira TAGOH (17):

View File

@ -44,6 +44,9 @@ but in an order preferring similar designs first. We do this in three steps:
3) Alias each generic to its specifics. 3) Alias each generic to its specifics.
e.g. Arial to Liberation Sans, Arimo, Albany, and Albany AMT 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 --> <!-- Map specifics to generics -->
@ -308,7 +311,6 @@ but in an order preferring similar designs first. We do this in three steps:
</default> </default>
</alias> </alias>
<!-- Microsoft --> <!-- Microsoft -->
<alias binding="same"> <alias binding="same">
<family>Arimo</family> <family>Arimo</family>
@ -460,7 +462,6 @@ but in an order preferring similar designs first. We do this in three steps:
</default> </default>
</alias> </alias>
<!-- Microsoft --> <!-- Microsoft -->
<alias> <alias>
<family>Arial</family> <family>Arial</family>
@ -490,8 +491,6 @@ but in an order preferring similar designs first. We do this in three steps:
</default> </default>
</alias> </alias>
<!-- Map generics to specifics --> <!-- Map generics to specifics -->
<!-- PostScript --> <!-- PostScript -->
@ -499,8 +498,6 @@ but in an order preferring similar designs first. We do this in three steps:
<family>Helvetica</family> <family>Helvetica</family>
<accept> <accept>
<family>TeX Gyre Heros</family> <family>TeX Gyre Heros</family>
<family>Nimbus Sans</family>
<family>Nimbus Sans L</family>
</accept> </accept>
</alias> </alias>
@ -508,7 +505,6 @@ but in an order preferring similar designs first. We do this in three steps:
<family>Helvetica Narrow</family> <family>Helvetica Narrow</family>
<accept> <accept>
<family>TeX Gyre Heros Cn</family> <family>TeX Gyre Heros Cn</family>
<family>Nimbus Sans Narrow</family>
</accept> </accept>
</alias> </alias>
@ -516,8 +512,6 @@ but in an order preferring similar designs first. We do this in three steps:
<family>Times</family> <family>Times</family>
<accept> <accept>
<family>TeX Gyre Termes</family> <family>TeX Gyre Termes</family>
<family>Nimbus Roman</family>
<family>Nimbus Roman No9 L</family>
</accept> </accept>
</alias> </alias>
@ -525,9 +519,6 @@ but in an order preferring similar designs first. We do this in three steps:
<family>Courier</family> <family>Courier</family>
<accept> <accept>
<family>TeX Gyre Cursor</family> <family>TeX Gyre Cursor</family>
<family>Nimbus Mono PS</family>
<family>Nimbus Mono</family>
<family>Nimbus Mono L</family>
</accept> </accept>
</alias> </alias>
@ -535,8 +526,6 @@ but in an order preferring similar designs first. We do this in three steps:
<family>ITC Avant Garde Gothic</family> <family>ITC Avant Garde Gothic</family>
<accept> <accept>
<family>TeX Gyre Adventor</family> <family>TeX Gyre Adventor</family>
<family>URW Gothic</family>
<family>URW Gothic L</family>
</accept> </accept>
</alias> </alias>
@ -545,9 +534,6 @@ but in an order preferring similar designs first. We do this in three steps:
<accept> <accept>
<family>Bookman Old Style</family> <family>Bookman Old Style</family>
<family>TeX Gyre Bonum</family> <family>TeX Gyre Bonum</family>
<family>URW Bookman</family>
<family>Bookman URW</family>
<family>URW Bookman L</family>
</accept> </accept>
</alias> </alias>
@ -555,9 +541,6 @@ but in an order preferring similar designs first. We do this in three steps:
<family>ITC Zapf Chancery</family> <family>ITC Zapf Chancery</family>
<accept> <accept>
<family>TeX Gyre Chorus</family> <family>TeX Gyre Chorus</family>
<family>Z003</family>
<family>Chancery URW</family>
<family>URW Chancery L</family>
</accept> </accept>
</alias> </alias>
@ -566,9 +549,6 @@ but in an order preferring similar designs first. We do this in three steps:
<accept> <accept>
<family>Palatino Linotype</family> <family>Palatino Linotype</family>
<family>TeX Gyre Pagella</family> <family>TeX Gyre Pagella</family>
<family>P052</family>
<family>Palladio URW</family>
<family>URW Palladio L</family>
</accept> </accept>
</alias> </alias>
@ -577,9 +557,6 @@ but in an order preferring similar designs first. We do this in three steps:
<accept> <accept>
<family>Century Schoolbook</family> <family>Century Schoolbook</family>
<family>TeX Gyre Schola</family> <family>TeX Gyre Schola</family>
<family>C059</family>
<family>Century SchoolBook URW</family>
<family>Century Schoolbook L</family>
</accept> </accept>
</alias> </alias>

View File

@ -1,33 +0,0 @@
<?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>

View File

@ -5,14 +5,7 @@
<!-- Emoji --> <!-- Emoji -->
<alias binding="same"> <!-- System emoji -->
<family>Emoji Two</family>
<default><family>emoji</family></default>
</alias>
<alias binding="same">
<family>Emoji One</family>
<default><family>emoji</family></default>
</alias>
<alias binding="same"> <alias binding="same">
<family>Noto Color Emoji</family> <!-- Google --> <family>Noto Color Emoji</family> <!-- Google -->
<default><family>emoji</family></default> <default><family>emoji</family></default>
@ -33,6 +26,15 @@
<family>EmojiOne Mozilla</family> <!-- Mozilla --> <family>EmojiOne Mozilla</family> <!-- Mozilla -->
<default><family>emoji</family></default> <default><family>emoji</family></default>
</alias> </alias>
<!-- Third-party emoji -->
<alias binding="same">
<family>Emoji Two</family>
<default><family>emoji</family></default>
</alias>
<alias binding="same">
<family>Emoji One</family>
<default><family>emoji</family></default>
</alias>
<!-- B&W --> <!-- B&W -->
<alias binding="same"> <alias binding="same">
<family>Noto Emoji</family> <!-- Google --> <family>Noto Emoji</family> <!-- Google -->

View File

@ -29,14 +29,15 @@
<alias binding="same"> <alias binding="same">
<family>emoji</family> <family>emoji</family>
<prefer> <prefer>
<family>Emoji Two</family>
<family>Emoji One</family>
<!-- System fonts --> <!-- System fonts -->
<family>Noto Color Emoji</family> <!-- Google --> <family>Noto Color Emoji</family> <!-- Google -->
<family>Apple Color Emoji</family> <!-- Apple --> <family>Apple Color Emoji</family> <!-- Apple -->
<family>Segoe UI Emoji</family> <!-- Microsoft --> <family>Segoe UI Emoji</family> <!-- Microsoft -->
<family>Twitter Color Emoji</family> <!-- Twitter --> <family>Twitter Color Emoji</family> <!-- Twitter -->
<family>EmojiOne Mozilla</family> <!-- Mozilla --> <family>EmojiOne Mozilla</family> <!-- Mozilla -->
<!-- Third-Party fonts -->
<family>Emoji Two</family>
<family>Emoji One</family>
<!-- Non-color --> <!-- Non-color -->
<family>Noto Emoji</family> <!-- Google --> <family>Noto Emoji</family> <!-- Google -->
<family>Android Emoji</family> <!-- Google --> <family>Android Emoji</family> <!-- Google -->

View File

@ -29,7 +29,6 @@ CONF_LINKS = \
10-hinting-$(PREFERRED_HINTING).conf \ 10-hinting-$(PREFERRED_HINTING).conf \
10-scale-bitmap-fonts.conf \ 10-scale-bitmap-fonts.conf \
20-unhint-small-vera.conf \ 20-unhint-small-vera.conf \
30-urw-aliases.conf \
30-metric-aliases.conf \ 30-metric-aliases.conf \
40-nonlatin.conf \ 40-nonlatin.conf \
45-generic.conf \ 45-generic.conf \
@ -70,7 +69,6 @@ template_DATA = \
11-lcdfilter-light.conf \ 11-lcdfilter-light.conf \
20-unhint-small-vera.conf \ 20-unhint-small-vera.conf \
25-unhint-nonlatin.conf \ 25-unhint-nonlatin.conf \
30-urw-aliases.conf \
30-metric-aliases.conf \ 30-metric-aliases.conf \
40-nonlatin.conf \ 40-nonlatin.conf \
45-generic.conf \ 45-generic.conf \

View File

@ -33,7 +33,7 @@ dnl This is the package version number, not the shared library
dnl version. This same version number must appear in fontconfig/fontconfig.h dnl version. This same version number must appear in fontconfig/fontconfig.h
dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
dnl not possible to extract the version number here from fontconfig.h dnl not possible to extract the version number here from fontconfig.h
AC_INIT([fontconfig], [2.12.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig]) AC_INIT([fontconfig], [2.12.6], [https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig])
AM_INIT_AUTOMAKE([1.11 parallel-tests dist-bzip2]) AM_INIT_AUTOMAKE([1.11 parallel-tests dist-bzip2])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@ -75,7 +75,7 @@ dnl bump revision when fixing bugs
dnl bump current and age, reset revision to zero when adding APIs dnl bump current and age, reset revision to zero when adding APIs
dnl bump current, leave age, reset revision to zero when changing/removing APIS dnl bump current, leave age, reset revision to zero when changing/removing APIS
LIBT_CURRENT=11 LIBT_CURRENT=11
LIBT_REVISION=0 LIBT_REVISION=1
AC_SUBST(LIBT_CURRENT) AC_SUBST(LIBT_CURRENT)
AC_SUBST(LIBT_REVISION) AC_SUBST(LIBT_REVISION)
LIBT_AGE=10 LIBT_AGE=10

View File

@ -85,7 +85,7 @@
1F3E0..1F3F0 # 6.0 [17] (🏠..🏰) house..castle 1F3E0..1F3F0 # 6.0 [17] (🏠..🏰) house..castle
# 1F3F4 # 7.0 [1] (🏴) black flag # 1F3F4 # 7.0 [1] (🏴) black flag
# 1F3F8..1F3FF # 8.0 [8] (🏸..🏿) badminton..dark skin tone # 1F3F8..1F3FF # 8.0 [8] (🏸..🏿) badminton..dark skin tone
1F400..1F43E # 6.0 [63] (🐀..🐾) rat..paw prints # 1F400..1F43E # 6.0 [63] (🐀..🐾) rat..paw prints
1F440 # 6.0 [1] (👀) eyes 1F440 # 6.0 [1] (👀) eyes
1F442..1F4F7 # 6.0[182] (👂..📷) ear..camera 1F442..1F4F7 # 6.0[182] (👂..📷) ear..camera
# 1F4F8 # 7.0 [1] (📸) camera with flash # 1F4F8 # 7.0 [1] (📸) camera with flash
@ -123,7 +123,7 @@
# 1F641..1F642 # 7.0 [2] (🙁..🙂) slightly frowning face..slightly smiling face # 1F641..1F642 # 7.0 [2] (🙁..🙂) slightly frowning face..slightly smiling face
# 1F643..1F644 # 8.0 [2] (🙃..🙄) upside-down face..face with rolling eyes # 1F643..1F644 # 8.0 [2] (🙃..🙄) upside-down face..face with rolling eyes
1F645..1F64F # 6.0 [11] (🙅..🙏) person gesturing NO..folded hands 1F645..1F64F # 6.0 [11] (🙅..🙏) person gesturing NO..folded hands
1F680..1F6C5 # 6.0 [70] (🚀..🛅) rocket..left luggage # 1F680..1F6C5 # 6.0 [70] (🚀..🛅) rocket..left luggage
# 1F6CC # 7.0 [1] (🛌) person in bed # 1F6CC # 7.0 [1] (🛌) person in bed
# 1F6D0 # 8.0 [1] (🛐) place of worship # 1F6D0 # 8.0 [1] (🛐) place of worship
# 1F6D1..1F6D2 # 9.0 [2] (🛑..🛒) stop sign..shopping cart # 1F6D1..1F6D2 # 9.0 [2] (🛑..🛒) stop sign..shopping cart

View File

@ -41,7 +41,7 @@ EXTRA_DIST=fc-query.sgml $(BUILT_MANS)
CLEANFILES = CLEANFILES =
fc_query_LDADD = $(FREETYPE_LIBS) ${top_builddir}/src/libfontconfig.la fc_query_LDADD = ${top_builddir}/src/libfontconfig.la $(FREETYPE_LIBS)
if USEDOCBOOK if USEDOCBOOK

View File

@ -170,7 +170,6 @@ main (int argc, char **argv)
FcPattern *pat; FcPattern *pat;
id = ((instance_num << 16) + face_num); id = ((instance_num << 16) + face_num);
printf("id %d\n", id);
if (FT_New_Face (ftLibrary, argv[i], id, &face)) if (FT_New_Face (ftLibrary, argv[i], id, &face))
break; break;
num_faces = face->num_faces; num_faces = face->num_faces;

View File

@ -53,7 +53,7 @@ typedef int FcBool;
#define FC_MAJOR 2 #define FC_MAJOR 2
#define FC_MINOR 12 #define FC_MINOR 12
#define FC_REVISION 5 #define FC_REVISION 6
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION)) #define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))

View File

@ -646,7 +646,8 @@ FcCacheOffsetsValid (FcCache *cache)
(char *) font > end - sizeof (FcFontSet) || (char *) font > end - sizeof (FcFontSet) ||
font->elts_offset < 0 || font->elts_offset < 0 ||
font->elts_offset > end - (char *) font || font->elts_offset > end - (char *) font ||
font->num > (end - (char *) font - font->elts_offset) / sizeof (FcPatternElt)) font->num > (end - (char *) font - font->elts_offset) / sizeof (FcPatternElt) ||
!FcRefIsConst (&font->ref))
return FcFalse; return FcFalse;

View File

@ -1219,14 +1219,11 @@ FcFreeTypeQueryFace (const FT_Face face,
int has_outline = !!(face->face_flags & FT_FACE_FLAG_SCALABLE); int has_outline = !!(face->face_flags & FT_FACE_FLAG_SCALABLE);
int has_color = 0; int has_color = 0;
#ifdef FT_FACE_FLAG_COLOR
has_color = !!(face->face_flags & FT_FACE_FLAG_COLOR);
#endif
if (!FcPatternAddBool (pat, FC_OUTLINE, has_outline)) if (!FcPatternAddBool (pat, FC_OUTLINE, has_outline))
goto bail1; goto bail1;
#ifdef FT_FACE_FLAG_COLOR #ifdef FT_FACE_FLAG_COLOR
has_color = !!(face->face_flags & FT_FACE_FLAG_COLOR);
if (!FcPatternAddBool (pat, FC_COLOR, has_color)) if (!FcPatternAddBool (pat, FC_COLOR, has_color))
goto bail1; goto bail1;
#endif #endif

View File

@ -3368,10 +3368,7 @@ FcConfigParseAndLoad (FcConfig *config,
f = FcConfigFilename (name); f = FcConfigFilename (name);
if (!f) if (!f)
{
ret = FcTrue;
goto bail0; goto bail0;
}
if (sysroot) if (sysroot)
filename = FcStrBuildFilename (sysroot, f, NULL); filename = FcStrBuildFilename (sysroot, f, NULL);
else else
@ -3401,8 +3398,6 @@ FcConfigParseAndLoad (FcConfig *config,
fd = FcOpen ((char *) filename, O_RDONLY); fd = FcOpen ((char *) filename, O_RDONLY);
if (fd == -1) { if (fd == -1) {
FcStrFree (filename);
ret = FcTrue;
goto bail1; goto bail1;
} }
@ -3432,7 +3427,7 @@ bail0:
FcConfigMessage (0, FcSevereError, "Cannot load default config file"); FcConfigMessage (0, FcSevereError, "Cannot load default config file");
return FcFalse; return FcFalse;
} }
return ret; return FcTrue;
} }
#define __fcxml__ #define __fcxml__
#include "fcaliastail.h" #include "fcaliastail.h"

View File

@ -20,7 +20,7 @@ else
TESTS=run-test.sh TESTS=run-test.sh
endif endif
TESTDATA=4x6.pcf 8x16.pcf out.expected out271.expected fonts.conf.in TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
@ -54,7 +54,7 @@ check_PROGRAMS += test-bz96676
test_bz96676_LDADD = $(top_builddir)/src/libfontconfig.la test_bz96676_LDADD = $(top_builddir)/src/libfontconfig.la
TESTS += test-bz96676 TESTS += test-bz96676
EXTRA_DIST=run-test.sh run-test271.sh $(TESTDATA) EXTRA_DIST=run-test.sh $(TESTDATA)
CLEANFILES= CLEANFILES=