Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/fontconfig/include merge fontconfig 2.14.2.
details: https://anonhg.NetBSD.org/xsrc/rev/85f6602c4713
branches: trunk
changeset: 7570:85f6602c4713
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Jun 20 02:21:56 2023 +0000
description:
merge fontconfig 2.14.2.
diffstat:
external/mit/fontconfig/dist/conf.d/10-no-sub-pixel.conf | 15 -
external/mit/fontconfig/dist/doc/FcLangSetGetLangs.3 | 2 +-
external/mit/fontconfig/dist/doc/fontconfig-devel/fclangsetgetlangs.html | 4 +-
external/mit/fontconfig/dist/src/fccache.c | 17 +-
external/mit/fontconfig/dist/src/fccfg.c | 90 +-
external/mit/fontconfig/dist/src/fcint.h | 7 +-
external/mit/fontconfig/dist/src/fcname.c | 26 +-
external/mit/fontconfig/include/fcalias.h | 2 +
external/mit/fontconfig/include/fcaliastail.h | 2 +
external/mit/fontconfig/include/fcobjshash.h | 425 +++++----
10 files changed, 306 insertions(+), 284 deletions(-)
diffs (truncated from 891 to 300 lines):
diff -r 11b341c5acae -r 85f6602c4713 external/mit/fontconfig/dist/conf.d/10-no-sub-pixel.conf
--- a/external/mit/fontconfig/dist/conf.d/10-no-sub-pixel.conf Tue Jun 20 02:19:18 2023 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
-<fontconfig>
- <description>Disable sub-pixel rendering</description>
-<!-- Disable sub-pixel rendering -->
- <match target="pattern">
- <!--
- This sort of configuration is available on the major desktop environments
- and we don't have to break it with "assign" unconditionally. however, we
- want to set something for others. So we use "append" here to get this working
- in both cases so that most clients would takes a look at the first place only.
- -->
- <edit name="rgba" mode="append"><const>none</const></edit>
- </match>
-</fontconfig>
diff -r 11b341c5acae -r 85f6602c4713 external/mit/fontconfig/dist/doc/FcLangSetGetLangs.3
--- a/external/mit/fontconfig/dist/doc/FcLangSetGetLangs.3 Tue Jun 20 02:19:18 2023 +0000
+++ b/external/mit/fontconfig/dist/doc/FcLangSetGetLangs.3 Tue Jun 20 02:21:56 2023 +0000
@@ -1,5 +1,5 @@
.\" auto-generated by docbook2man-spec from docbook-utils package
-.TH "FcLangSetGetLangs" "3" "21 10月 2022" "Fontconfig 2.14.1" ""
+.TH "FcLangSetGetLangs" "3" "27 1月 2023" "Fontconfig 2.14.2" ""
.SH NAME
FcLangSetGetLangs \- get the list of languages in the langset
.SH SYNOPSIS
diff -r 11b341c5acae -r 85f6602c4713 external/mit/fontconfig/dist/doc/fontconfig-devel/fclangsetgetlangs.html
--- a/external/mit/fontconfig/dist/doc/fontconfig-devel/fclangsetgetlangs.html Tue Jun 20 02:19:18 2023 +0000
+++ b/external/mit/fontconfig/dist/doc/fontconfig-devel/fclangsetgetlangs.html Tue Jun 20 02:21:56 2023 +0000
@@ -103,7 +103,7 @@ WIDTH="100%"
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include <fontconfig/fontconfig.h>
- </PRE
+ </PRE
></TD
></TR
></TABLE
@@ -140,7 +140,7 @@ CLASS="PARAMETER"
>langset</I
></TT
>.
- </P
+ </P
></DIV
><DIV
CLASS="NAVFOOTER"
diff -r 11b341c5acae -r 85f6602c4713 external/mit/fontconfig/dist/src/fccache.c
--- a/external/mit/fontconfig/dist/src/fccache.c Tue Jun 20 02:19:18 2023 +0000
+++ b/external/mit/fontconfig/dist/src/fccache.c Tue Jun 20 02:21:56 2023 +0000
@@ -295,7 +295,7 @@ FcDirCacheUnlink (const FcChar8 *dir, Fc
ret = FcFalse;
goto bail;
}
-
+
while ((cache_dir = FcStrListNext (list)))
{
if (sysroot)
@@ -395,7 +395,7 @@ FcDirCacheProcess (FcConfig *config, con
list = FcStrListCreate (config->cacheDirs);
if (!list)
return FcFalse;
-
+
while ((cache_dir = FcStrListNext (list)))
{
FcChar8 *cache_hashed;
@@ -814,20 +814,17 @@ FcCacheFini (void)
{
int i;
- for (i = 0; i < FC_CACHE_MAX_LEVEL; i++)
+ if (FcDebug() & FC_DBG_CACHE)
{
- if (FcDebug() & FC_DBG_CACHE)
+ for (i = 0; i < FC_CACHE_MAX_LEVEL; i++)
{
if (fcCacheChains[i] != NULL)
{
FcCacheSkip *s = fcCacheChains[i];
- printf("Fontconfig error: not freed %p (dir: %s, refcount %" FC_ATOMIC_INT_FORMAT ")\n", s->cache, FcCacheDir(s->cache), s->ref.count);
+ fprintf(stderr, "Fontconfig error: not freed %p (dir: %s, refcount %" FC_ATOMIC_INT_FORMAT ")\n", s->cache, FcCacheDir(s->cache), s->ref.count);
}
}
- else
- assert (fcCacheChains[i] == NULL);
}
- assert (fcCacheMaxLevel == 0);
free_lock ();
}
@@ -1039,7 +1036,7 @@ FcDirCacheMapFd (FcConfig *config, int f
/* Mark allocated caches so they're freed rather than unmapped */
if (allocated)
cache->magic = FC_CACHE_MAGIC_ALLOC;
-
+
return cache;
}
@@ -1731,7 +1728,7 @@ FcCacheCopySet args1(const FcCache *c)
for (i = 0; i < old->nfont; i++)
{
FcPattern *font = FcFontSetFont (old, i);
-
+
FcPatternReference (font);
if (!FcFontSetAdd (new, font))
{
diff -r 11b341c5acae -r 85f6602c4713 external/mit/fontconfig/dist/src/fccfg.c
--- a/external/mit/fontconfig/dist/src/fccfg.c Tue Jun 20 02:19:18 2023 +0000
+++ b/external/mit/fontconfig/dist/src/fccfg.c Tue Jun 20 02:21:56 2023 +0000
@@ -362,40 +362,43 @@ FcConfigDestroy (FcConfig *config)
FcExprPage *page;
FcMatchKind k;
- if (FcRefDec (&config->ref) != 1)
- return;
-
- (void) fc_atomic_ptr_cmpexch (&_fcConfig, config, NULL);
-
- FcStrSetDestroy (config->configDirs);
- FcStrSetDestroy (config->configMapDirs);
- FcStrSetDestroy (config->fontDirs);
- FcStrSetDestroy (config->cacheDirs);
- FcStrSetDestroy (config->configFiles);
- FcStrSetDestroy (config->acceptGlobs);
- FcStrSetDestroy (config->rejectGlobs);
- FcFontSetDestroy (config->acceptPatterns);
- FcFontSetDestroy (config->rejectPatterns);
-
- for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
- FcPtrListDestroy (config->subst[k]);
- FcPtrListDestroy (config->rulesetList);
- FcStrSetDestroy (config->availConfigFiles);
- for (set = FcSetSystem; set <= FcSetApplication; set++)
- if (config->fonts[set])
- FcFontSetDestroy (config->fonts[set]);
-
- page = config->expr_pool;
- while (page)
+ if (config)
{
- FcExprPage *next = page->next_page;
- free (page);
- page = next;
+ if (FcRefDec (&config->ref) != 1)
+ return;
+
+ (void) fc_atomic_ptr_cmpexch (&_fcConfig, config, NULL);
+
+ FcStrSetDestroy (config->configDirs);
+ FcStrSetDestroy (config->configMapDirs);
+ FcStrSetDestroy (config->fontDirs);
+ FcStrSetDestroy (config->cacheDirs);
+ FcStrSetDestroy (config->configFiles);
+ FcStrSetDestroy (config->acceptGlobs);
+ FcStrSetDestroy (config->rejectGlobs);
+ FcFontSetDestroy (config->acceptPatterns);
+ FcFontSetDestroy (config->rejectPatterns);
+
+ for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
+ FcPtrListDestroy (config->subst[k]);
+ FcPtrListDestroy (config->rulesetList);
+ FcStrSetDestroy (config->availConfigFiles);
+ for (set = FcSetSystem; set <= FcSetApplication; set++)
+ if (config->fonts[set])
+ FcFontSetDestroy (config->fonts[set]);
+
+ page = config->expr_pool;
+ while (page)
+ {
+ FcExprPage *next = page->next_page;
+ free (page);
+ page = next;
+ }
+ if (config->sysRoot)
+ FcStrFree (config->sysRoot);
+
+ free (config);
}
- if (config->sysRoot)
- FcStrFree (config->sysRoot);
-
- free (config);
}
/*
@@ -421,7 +424,7 @@ FcConfigAddCache (FcConfig *config, FcCa
if (fs)
{
int nref = 0;
-
+
for (i = 0; i < fs->nfont; i++)
{
FcPattern *font = FcFontSetFont (fs, i);
@@ -505,7 +508,7 @@ FcConfigAddDirList (FcConfig *config, Fc
dirlist = FcStrListCreate (dirSet);
if (!dirlist)
return FcFalse;
-
+
while ((dir = FcStrListNext (dirlist)))
{
if (FcDebug () & FC_DBG_FONTSET)
@@ -534,7 +537,7 @@ FcConfigBuildFonts (FcConfig *config)
config = FcConfigReference (config);
if (!config)
return FcFalse;
-
+
fonts = FcFontSetCreate ();
if (!fonts)
{
@@ -1331,7 +1334,7 @@ FcConfigEvaluate (FcPattern *p, FcPatter
v.u.b = FcConfigCompareValue (&vl, e->op, &vr);
FcValueDestroy (vl);
FcValueDestroy (vr);
- break;
+ break;
case FcOpOr:
case FcOpAnd:
case FcOpPlus:
@@ -1347,7 +1350,7 @@ FcConfigEvaluate (FcPattern *p, FcPatter
switch ((int) vle.type) {
case FcTypeDouble:
switch ((int) op) {
- case FcOpPlus:
+ case FcOpPlus:
v.type = FcTypeDouble;
v.u.d = vle.u.d + vre.u.d;
break;
@@ -1396,7 +1399,7 @@ FcConfigEvaluate (FcPattern *p, FcPatter
str = FcStrPlus (vle.u.s, vre.u.s);
v.u.s = FcStrdup (str);
FcStrFree (str);
-
+
if (!v.u.s)
v.type = FcTypeVoid;
break;
@@ -2829,7 +2832,7 @@ FcConfigAppFontAddFile (FcConfig *con
}
FcConfigSetFonts (config, set, FcSetApplication);
}
-
+
if (!FcFileScanConfig (set, subdirs, file, config))
{
FcStrSetDestroy (subdirs);
@@ -2920,8 +2923,13 @@ FcConfigGlobAdd (FcConfig *config,
FcBool accept)
{
FcStrSet *set = accept ? config->acceptGlobs : config->rejectGlobs;
-
- return FcStrSetAdd (set, glob);
+ FcChar8 *realglob = FcStrCopyFilename(glob);
+ if (!realglob)
+ return FcFalse;
+
+ FcBool ret = FcStrSetAdd (set, realglob);
+ FcStrFree(realglob);
+ return ret;
}
static FcBool
diff -r 11b341c5acae -r 85f6602c4713 external/mit/fontconfig/dist/src/fcint.h
--- a/external/mit/fontconfig/dist/src/fcint.h Tue Jun 20 02:19:18 2023 +0000
+++ b/external/mit/fontconfig/dist/src/fcint.h Tue Jun 20 02:21:56 2023 +0000
@@ -199,7 +199,7 @@ typedef struct _FcValueList {
} FcValueList;
#define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
-
+
typedef int FcObject;
/* The 1024 is to leave some room for future added internal objects, such
@@ -238,7 +238,7 @@ struct _FcPattern {
FcFontSetFonts(fs)[i], \
FcPattern) : \
fs->fonts[i])
-
+
typedef enum _FcOp {
FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
FcOpNil,
@@ -909,6 +909,9 @@ FcGetDefaultLang (void);
FcPrivate FcChar8 *
FcGetPrgname (void);
+FcPrivate FcChar8 *
+FcGetDesktopName (void);
+
FcPrivate void
Home |
Main Index |
Thread Index |
Old Index