Remove all training whitespaces
This commit is contained in:
parent
d0d1f3904c
commit
594dcef0f3
|
@ -79,7 +79,7 @@ FcAtomicCreate (const FcChar8 *file)
|
||||||
if (!atomic)
|
if (!atomic)
|
||||||
return 0;
|
return 0;
|
||||||
FcMemAlloc (FC_MEM_ATOMIC, total_len);
|
FcMemAlloc (FC_MEM_ATOMIC, total_len);
|
||||||
|
|
||||||
atomic->file = (FcChar8 *) (atomic + 1);
|
atomic->file = (FcChar8 *) (atomic + 1);
|
||||||
strcpy ((char *) atomic->file, (char *) file);
|
strcpy ((char *) atomic->file, (char *) file);
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ FcAtomicDestroy (FcAtomic *atomic)
|
||||||
{
|
{
|
||||||
FcMemFree (FC_MEM_ATOMIC, sizeof (FcAtomic) +
|
FcMemFree (FC_MEM_ATOMIC, sizeof (FcAtomic) +
|
||||||
strlen ((char *) atomic->file) * 4 + 4 +
|
strlen ((char *) atomic->file) * 4 + 4 +
|
||||||
sizeof (NEW_NAME) + sizeof (LCK_NAME) +
|
sizeof (NEW_NAME) + sizeof (LCK_NAME) +
|
||||||
sizeof (TMP_NAME));
|
sizeof (TMP_NAME));
|
||||||
|
|
||||||
free (atomic);
|
free (atomic);
|
||||||
|
|
|
@ -92,10 +92,10 @@ FcStat (const char *file, struct stat *statb)
|
||||||
char full_path_name[MAX_PATH];
|
char full_path_name[MAX_PATH];
|
||||||
char *basename;
|
char *basename;
|
||||||
DWORD rc;
|
DWORD rc;
|
||||||
|
|
||||||
if (!GetFileAttributesEx (file, GetFileExInfoStandard, &wfad))
|
if (!GetFileAttributesEx (file, GetFileExInfoStandard, &wfad))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
statb->st_dev = 0;
|
statb->st_dev = 0;
|
||||||
|
|
||||||
/* Calculate a pseudo inode number as a hash of the full path name.
|
/* Calculate a pseudo inode number as a hash of the full path name.
|
||||||
|
@ -108,7 +108,7 @@ FcStat (const char *file, struct stat *statb)
|
||||||
|
|
||||||
rc = GetLongPathName (full_path_name, full_path_name, sizeof (full_path_name));
|
rc = GetLongPathName (full_path_name, full_path_name, sizeof (full_path_name));
|
||||||
statb->st_ino = FcStringHash (full_path_name);
|
statb->st_ino = FcStringHash (full_path_name);
|
||||||
|
|
||||||
statb->st_mode = _S_IREAD | _S_IWRITE;
|
statb->st_mode = _S_IREAD | _S_IWRITE;
|
||||||
statb->st_mode |= (statb->st_mode >> 3) | (statb->st_mode >> 6);
|
statb->st_mode |= (statb->st_mode >> 3) | (statb->st_mode >> 6);
|
||||||
|
|
||||||
|
@ -116,19 +116,19 @@ FcStat (const char *file, struct stat *statb)
|
||||||
statb->st_mode |= _S_IFDIR;
|
statb->st_mode |= _S_IFDIR;
|
||||||
else
|
else
|
||||||
statb->st_mode |= _S_IFREG;
|
statb->st_mode |= _S_IFREG;
|
||||||
|
|
||||||
statb->st_nlink = 1;
|
statb->st_nlink = 1;
|
||||||
statb->st_uid = statb->st_gid = 0;
|
statb->st_uid = statb->st_gid = 0;
|
||||||
statb->st_rdev = 0;
|
statb->st_rdev = 0;
|
||||||
|
|
||||||
if (wfad.nFileSizeHigh > 0)
|
if (wfad.nFileSizeHigh > 0)
|
||||||
return -1;
|
return -1;
|
||||||
statb->st_size = wfad.nFileSizeLow;
|
statb->st_size = wfad.nFileSizeLow;
|
||||||
|
|
||||||
statb->st_atime = (*(INT64 *)&wfad.ftLastAccessTime)/10000000 - EPOCH_OFFSET;
|
statb->st_atime = (*(INT64 *)&wfad.ftLastAccessTime)/10000000 - EPOCH_OFFSET;
|
||||||
statb->st_mtime = (*(INT64 *)&wfad.ftLastWriteTime)/10000000 - EPOCH_OFFSET;
|
statb->st_mtime = (*(INT64 *)&wfad.ftLastWriteTime)/10000000 - EPOCH_OFFSET;
|
||||||
statb->st_ctime = statb->st_mtime;
|
statb->st_ctime = statb->st_mtime;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -215,13 +215,13 @@ FcDirCacheOpenFile (const FcChar8 *cache_file, struct stat *file_stat)
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Look for a cache file for the specified dir. Attempt
|
* Look for a cache file for the specified dir. Attempt
|
||||||
* to use each one we find, stopping when the callback
|
* to use each one we find, stopping when the callback
|
||||||
* indicates success
|
* indicates success
|
||||||
*/
|
*/
|
||||||
static FcBool
|
static FcBool
|
||||||
FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
|
FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
|
||||||
FcBool (*callback) (int fd, struct stat *fd_stat,
|
FcBool (*callback) (int fd, struct stat *fd_stat,
|
||||||
struct stat *dir_stat, void *closure),
|
struct stat *dir_stat, void *closure),
|
||||||
void *closure, FcChar8 **cache_file_ret)
|
void *closure, FcChar8 **cache_file_ret)
|
||||||
|
@ -263,7 +263,7 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
|
||||||
FcStrFree (cache_hashed);
|
FcStrFree (cache_hashed);
|
||||||
}
|
}
|
||||||
FcStrListDone (list);
|
FcStrListDone (list);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ FcCacheInsert (FcCache *cache, struct stat *cache_stat)
|
||||||
update[fcCacheMaxLevel] = &fcCacheChains[fcCacheMaxLevel];
|
update[fcCacheMaxLevel] = &fcCacheChains[fcCacheMaxLevel];
|
||||||
fcCacheMaxLevel = level;
|
fcCacheMaxLevel = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = malloc (sizeof (FcCacheSkip) + (level - 1) * sizeof (FcCacheSkip *));
|
s = malloc (sizeof (FcCacheSkip) + (level - 1) * sizeof (FcCacheSkip *));
|
||||||
if (!s)
|
if (!s)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
@ -382,7 +382,7 @@ FcCacheInsert (FcCache *cache, struct stat *cache_stat)
|
||||||
s->cache_ino = 0;
|
s->cache_ino = 0;
|
||||||
s->cache_mtime = 0;
|
s->cache_mtime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Insert into all fcCacheChains
|
* Insert into all fcCacheChains
|
||||||
*/
|
*/
|
||||||
|
@ -564,7 +564,7 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat)
|
||||||
PAGE_READONLY, 0, 0, NULL);
|
PAGE_READONLY, 0, 0, NULL);
|
||||||
if (hFileMap != NULL)
|
if (hFileMap != NULL)
|
||||||
{
|
{
|
||||||
cache = MapViewOfFile (hFileMap, FILE_MAP_READ, 0, 0,
|
cache = MapViewOfFile (hFileMap, FILE_MAP_READ, 0, 0,
|
||||||
fd_stat->st_size);
|
fd_stat->st_size);
|
||||||
CloseHandle (hFileMap);
|
CloseHandle (hFileMap);
|
||||||
}
|
}
|
||||||
|
@ -583,8 +583,8 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
allocated = FcTrue;
|
allocated = FcTrue;
|
||||||
}
|
}
|
||||||
if (cache->magic != FC_CACHE_MAGIC_MMAP ||
|
if (cache->magic != FC_CACHE_MAGIC_MMAP ||
|
||||||
cache->version < FC_CACHE_CONTENT_VERSION ||
|
cache->version < FC_CACHE_CONTENT_VERSION ||
|
||||||
cache->size != fd_stat->st_size ||
|
cache->size != fd_stat->st_size ||
|
||||||
!FcCacheTimeValid (cache, dir_stat) ||
|
!FcCacheTimeValid (cache, dir_stat) ||
|
||||||
|
@ -674,7 +674,7 @@ FcDirCacheValidateHelper (int fd, struct stat *fd_stat, struct stat *dir_stat, v
|
||||||
{
|
{
|
||||||
FcBool ret = FcTrue;
|
FcBool ret = FcTrue;
|
||||||
FcCache c;
|
FcCache c;
|
||||||
|
|
||||||
if (read (fd, &c, sizeof (FcCache)) != sizeof (FcCache))
|
if (read (fd, &c, sizeof (FcCache)) != sizeof (FcCache))
|
||||||
ret = FcFalse;
|
ret = FcFalse;
|
||||||
else if (c.magic != FC_CACHE_MAGIC_MMAP)
|
else if (c.magic != FC_CACHE_MAGIC_MMAP)
|
||||||
|
@ -691,7 +691,7 @@ FcDirCacheValidateHelper (int fd, struct stat *fd_stat, struct stat *dir_stat, v
|
||||||
static FcBool
|
static FcBool
|
||||||
FcDirCacheValidConfig (const FcChar8 *dir, FcConfig *config)
|
FcDirCacheValidConfig (const FcChar8 *dir, FcConfig *config)
|
||||||
{
|
{
|
||||||
return FcDirCacheProcess (config, dir,
|
return FcDirCacheProcess (config, dir,
|
||||||
FcDirCacheValidateHelper,
|
FcDirCacheValidateHelper,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
@ -700,7 +700,7 @@ FcBool
|
||||||
FcDirCacheValid (const FcChar8 *dir)
|
FcDirCacheValid (const FcChar8 *dir)
|
||||||
{
|
{
|
||||||
FcConfig *config;
|
FcConfig *config;
|
||||||
|
|
||||||
config = FcConfigGetCurrent ();
|
config = FcConfigGetCurrent ();
|
||||||
if (!config)
|
if (!config)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
@ -722,7 +722,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
|
||||||
FcChar8 *dir_serialize;
|
FcChar8 *dir_serialize;
|
||||||
intptr_t *dirs_serialize;
|
intptr_t *dirs_serialize;
|
||||||
FcFontSet *set_serialize;
|
FcFontSet *set_serialize;
|
||||||
|
|
||||||
if (!serialize)
|
if (!serialize)
|
||||||
return NULL;
|
return NULL;
|
||||||
/*
|
/*
|
||||||
|
@ -747,7 +747,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
|
||||||
*/
|
*/
|
||||||
if (!FcFontSetSerializeAlloc (serialize, set))
|
if (!FcFontSetSerializeAlloc (serialize, set))
|
||||||
goto bail1;
|
goto bail1;
|
||||||
|
|
||||||
/* Serialize layout complete. Now allocate space and fill it */
|
/* Serialize layout complete. Now allocate space and fill it */
|
||||||
cache = malloc (serialize->size);
|
cache = malloc (serialize->size);
|
||||||
if (!cache)
|
if (!cache)
|
||||||
|
@ -769,7 +769,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
|
||||||
if (!dir_serialize)
|
if (!dir_serialize)
|
||||||
goto bail2;
|
goto bail2;
|
||||||
cache->dir = FcPtrToOffset (cache, dir_serialize);
|
cache->dir = FcPtrToOffset (cache, dir_serialize);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Serialize sub dirs
|
* Serialize sub dirs
|
||||||
*/
|
*/
|
||||||
|
@ -778,14 +778,14 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
|
||||||
goto bail2;
|
goto bail2;
|
||||||
cache->dirs = FcPtrToOffset (cache, dirs_serialize);
|
cache->dirs = FcPtrToOffset (cache, dirs_serialize);
|
||||||
cache->dirs_count = dirs->num;
|
cache->dirs_count = dirs->num;
|
||||||
for (i = 0; i < dirs->num; i++)
|
for (i = 0; i < dirs->num; i++)
|
||||||
{
|
{
|
||||||
FcChar8 *d_serialize = FcStrSerialize (serialize, dirs->strs[i]);
|
FcChar8 *d_serialize = FcStrSerialize (serialize, dirs->strs[i]);
|
||||||
if (!d_serialize)
|
if (!d_serialize)
|
||||||
goto bail2;
|
goto bail2;
|
||||||
dirs_serialize[i] = FcPtrToOffset (dirs_serialize, d_serialize);
|
dirs_serialize[i] = FcPtrToOffset (dirs_serialize, d_serialize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Serialize font set
|
* Serialize font set
|
||||||
*/
|
*/
|
||||||
|
@ -795,7 +795,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
|
||||||
cache->set = FcPtrToOffset (cache, set_serialize);
|
cache->set = FcPtrToOffset (cache, set_serialize);
|
||||||
|
|
||||||
FcSerializeDestroy (serialize);
|
FcSerializeDestroy (serialize);
|
||||||
|
|
||||||
FcCacheInsert (cache, NULL);
|
FcCacheInsert (cache, NULL);
|
||||||
|
|
||||||
return cache;
|
return cache;
|
||||||
|
@ -817,10 +817,10 @@ FcMakeDirectory (const FcChar8 *dir)
|
||||||
{
|
{
|
||||||
FcChar8 *parent;
|
FcChar8 *parent;
|
||||||
FcBool ret;
|
FcBool ret;
|
||||||
|
|
||||||
if (strlen ((char *) dir) == 0)
|
if (strlen ((char *) dir) == 0)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
||||||
parent = FcStrDirname (dir);
|
parent = FcStrDirname (dir);
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
@ -854,7 +854,7 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
|
||||||
/*
|
/*
|
||||||
* Write it to the first directory in the list which is writable
|
* Write it to the first directory in the list which is writable
|
||||||
*/
|
*/
|
||||||
|
|
||||||
list = FcStrListCreate (config->cacheDirs);
|
list = FcStrListCreate (config->cacheDirs);
|
||||||
if (!list)
|
if (!list)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
@ -909,21 +909,21 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
|
||||||
fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY, 0666);
|
fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY, 0666);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
goto bail4;
|
goto bail4;
|
||||||
|
|
||||||
/* Temporarily switch magic to MMAP while writing to file */
|
/* Temporarily switch magic to MMAP while writing to file */
|
||||||
magic = cache->magic;
|
magic = cache->magic;
|
||||||
if (magic != FC_CACHE_MAGIC_MMAP)
|
if (magic != FC_CACHE_MAGIC_MMAP)
|
||||||
cache->magic = FC_CACHE_MAGIC_MMAP;
|
cache->magic = FC_CACHE_MAGIC_MMAP;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write cache contents to file
|
* Write cache contents to file
|
||||||
*/
|
*/
|
||||||
written = write (fd, cache, cache->size);
|
written = write (fd, cache, cache->size);
|
||||||
|
|
||||||
/* Switch magic back */
|
/* Switch magic back */
|
||||||
if (magic != FC_CACHE_MAGIC_MMAP)
|
if (magic != FC_CACHE_MAGIC_MMAP)
|
||||||
cache->magic = magic;
|
cache->magic = magic;
|
||||||
|
|
||||||
if (written != cache->size)
|
if (written != cache->size)
|
||||||
{
|
{
|
||||||
perror ("write cache");
|
perror ("write cache");
|
||||||
|
@ -982,7 +982,7 @@ FcCacheCopySet args1(const FcCache *c)
|
||||||
FcFontSet *old = FcCacheSet (c);
|
FcFontSet *old = FcCacheSet (c);
|
||||||
FcFontSet *new = FcFontSetCreate ();
|
FcFontSet *new = FcFontSetCreate ();
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!new)
|
if (!new)
|
||||||
return NULL;
|
return NULL;
|
||||||
for (i = 0; i < old->nfont; i++)
|
for (i = 0; i < old->nfont; i++)
|
||||||
|
@ -1116,7 +1116,7 @@ static void MD5Update(struct MD5Context *ctx, const unsigned char *buf, unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Final wrapup - pad to 64-byte boundary with the bit pattern
|
* Final wrapup - pad to 64-byte boundary with the bit pattern
|
||||||
* 1 0* (64-bit count of bits processed, MSB-first)
|
* 1 0* (64-bit count of bits processed, MSB-first)
|
||||||
*/
|
*/
|
||||||
static void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
|
static void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
|
||||||
|
|
118
src/fccfg.c
118
src/fccfg.c
|
@ -48,19 +48,19 @@ FcConfigCreate (void)
|
||||||
if (!config)
|
if (!config)
|
||||||
goto bail0;
|
goto bail0;
|
||||||
FcMemAlloc (FC_MEM_CONFIG, sizeof (FcConfig));
|
FcMemAlloc (FC_MEM_CONFIG, sizeof (FcConfig));
|
||||||
|
|
||||||
config->configDirs = FcStrSetCreate ();
|
config->configDirs = FcStrSetCreate ();
|
||||||
if (!config->configDirs)
|
if (!config->configDirs)
|
||||||
goto bail1;
|
goto bail1;
|
||||||
|
|
||||||
config->configFiles = FcStrSetCreate ();
|
config->configFiles = FcStrSetCreate ();
|
||||||
if (!config->configFiles)
|
if (!config->configFiles)
|
||||||
goto bail2;
|
goto bail2;
|
||||||
|
|
||||||
config->fontDirs = FcStrSetCreate ();
|
config->fontDirs = FcStrSetCreate ();
|
||||||
if (!config->fontDirs)
|
if (!config->fontDirs)
|
||||||
goto bail3;
|
goto bail3;
|
||||||
|
|
||||||
config->acceptGlobs = FcStrSetCreate ();
|
config->acceptGlobs = FcStrSetCreate ();
|
||||||
if (!config->acceptGlobs)
|
if (!config->acceptGlobs)
|
||||||
goto bail4;
|
goto bail4;
|
||||||
|
@ -72,7 +72,7 @@ FcConfigCreate (void)
|
||||||
config->acceptPatterns = FcFontSetCreate ();
|
config->acceptPatterns = FcFontSetCreate ();
|
||||||
if (!config->acceptPatterns)
|
if (!config->acceptPatterns)
|
||||||
goto bail6;
|
goto bail6;
|
||||||
|
|
||||||
config->rejectPatterns = FcFontSetCreate ();
|
config->rejectPatterns = FcFontSetCreate ();
|
||||||
if (!config->rejectPatterns)
|
if (!config->rejectPatterns)
|
||||||
goto bail7;
|
goto bail7;
|
||||||
|
@ -80,7 +80,7 @@ FcConfigCreate (void)
|
||||||
config->cacheDirs = FcStrSetCreate ();
|
config->cacheDirs = FcStrSetCreate ();
|
||||||
if (!config->cacheDirs)
|
if (!config->cacheDirs)
|
||||||
goto bail8;
|
goto bail8;
|
||||||
|
|
||||||
config->blanks = 0;
|
config->blanks = 0;
|
||||||
|
|
||||||
config->substPattern = 0;
|
config->substPattern = 0;
|
||||||
|
@ -91,12 +91,12 @@ FcConfigCreate (void)
|
||||||
config->fonts[set] = 0;
|
config->fonts[set] = 0;
|
||||||
|
|
||||||
config->rescanTime = time(0);
|
config->rescanTime = time(0);
|
||||||
config->rescanInterval = 30;
|
config->rescanInterval = 30;
|
||||||
|
|
||||||
config->expr_pool = NULL;
|
config->expr_pool = NULL;
|
||||||
|
|
||||||
config->ref = 1;
|
config->ref = 1;
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
|
|
||||||
bail8:
|
bail8:
|
||||||
|
@ -181,7 +181,7 @@ static void
|
||||||
FcSubstDestroy (FcSubst *s)
|
FcSubstDestroy (FcSubst *s)
|
||||||
{
|
{
|
||||||
FcSubst *n;
|
FcSubst *n;
|
||||||
|
|
||||||
while (s)
|
while (s)
|
||||||
{
|
{
|
||||||
n = s->next;
|
n = s->next;
|
||||||
|
@ -279,7 +279,7 @@ FcConfigDestroy (FcConfig *config)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FcBool
|
FcBool
|
||||||
FcConfigAddCache (FcConfig *config, FcCache *cache,
|
FcConfigAddCache (FcConfig *config, FcCache *cache,
|
||||||
FcSetName set, FcStrSet *dirSet)
|
FcSetName set, FcStrSet *dirSet)
|
||||||
{
|
{
|
||||||
FcFontSet *fs;
|
FcFontSet *fs;
|
||||||
|
@ -343,7 +343,7 @@ FcConfigAddDirList (FcConfig *config, FcSetName set, FcStrSet *dirSet)
|
||||||
FcStrList *dirlist;
|
FcStrList *dirlist;
|
||||||
FcChar8 *dir;
|
FcChar8 *dir;
|
||||||
FcCache *cache;
|
FcCache *cache;
|
||||||
|
|
||||||
dirlist = FcStrListCreate (dirSet);
|
dirlist = FcStrListCreate (dirSet);
|
||||||
if (!dirlist)
|
if (!dirlist)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
@ -382,9 +382,9 @@ FcConfigBuildFonts (FcConfig *config)
|
||||||
fonts = FcFontSetCreate ();
|
fonts = FcFontSetCreate ();
|
||||||
if (!fonts)
|
if (!fonts)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
||||||
FcConfigSetFonts (config, fonts, FcSetSystem);
|
FcConfigSetFonts (config, fonts, FcSetSystem);
|
||||||
|
|
||||||
if (!FcConfigAddDirList (config, FcSetSystem, config->fontDirs))
|
if (!FcConfigAddDirList (config, FcSetSystem, config->fontDirs))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
if (FcDebug () & FC_DBG_FONTSET)
|
if (FcDebug () & FC_DBG_FONTSET)
|
||||||
|
@ -447,7 +447,7 @@ FcBool
|
||||||
FcConfigAddDir (FcConfig *config,
|
FcConfigAddDir (FcConfig *config,
|
||||||
const FcChar8 *d)
|
const FcChar8 *d)
|
||||||
{
|
{
|
||||||
return (FcConfigAddConfigDir (config, d) &&
|
return (FcConfigAddConfigDir (config, d) &&
|
||||||
FcConfigAddFontDir (config, d));
|
FcConfigAddFontDir (config, d));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,17 +481,17 @@ FcConfigGetCacheDirs (FcConfig *config)
|
||||||
}
|
}
|
||||||
return FcStrListCreate (config->cacheDirs);
|
return FcStrListCreate (config->cacheDirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
FcBool
|
FcBool
|
||||||
FcConfigAddConfigFile (FcConfig *config,
|
FcConfigAddConfigFile (FcConfig *config,
|
||||||
const FcChar8 *f)
|
const FcChar8 *f)
|
||||||
{
|
{
|
||||||
FcBool ret;
|
FcBool ret;
|
||||||
FcChar8 *file = FcConfigFilename (f);
|
FcChar8 *file = FcConfigFilename (f);
|
||||||
|
|
||||||
if (!file)
|
if (!file)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
||||||
ret = FcStrSetAdd (config->configFiles, file);
|
ret = FcStrSetAdd (config->configFiles, file);
|
||||||
FcStrFree (file);
|
FcStrFree (file);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -555,7 +555,7 @@ FcConfigAddBlank (FcConfig *config,
|
||||||
FcChar32 blank)
|
FcChar32 blank)
|
||||||
{
|
{
|
||||||
FcBlanks *b, *freeme = 0;
|
FcBlanks *b, *freeme = 0;
|
||||||
|
|
||||||
b = config->blanks;
|
b = config->blanks;
|
||||||
if (!b)
|
if (!b)
|
||||||
{
|
{
|
||||||
|
@ -613,7 +613,7 @@ FcConfigSetRescanInverval (FcConfig *config, int rescanInterval)
|
||||||
return FcConfigSetRescanInterval (config, rescanInterval);
|
return FcConfigSetRescanInterval (config, rescanInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FcBool
|
FcBool
|
||||||
FcConfigAddEdit (FcConfig *config,
|
FcConfigAddEdit (FcConfig *config,
|
||||||
FcTest *test,
|
FcTest *test,
|
||||||
|
@ -697,10 +697,10 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
FcValue left = FcValueCanonicalize(left_o);
|
FcValue left = FcValueCanonicalize(left_o);
|
||||||
FcValue right = FcValueCanonicalize(right_o);
|
FcValue right = FcValueCanonicalize(right_o);
|
||||||
FcBool ret = FcFalse;
|
FcBool ret = FcFalse;
|
||||||
|
|
||||||
left = FcConfigPromote (left, right);
|
left = FcConfigPromote (left, right);
|
||||||
right = FcConfigPromote (right, left);
|
right = FcConfigPromote (right, left);
|
||||||
if (left.type == right.type)
|
if (left.type == right.type)
|
||||||
{
|
{
|
||||||
switch (left.type) {
|
switch (left.type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
|
@ -716,16 +716,16 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
case FcOpNotContains:
|
case FcOpNotContains:
|
||||||
ret = left.u.d != right.u.d;
|
ret = left.u.d != right.u.d;
|
||||||
break;
|
break;
|
||||||
case FcOpLess:
|
case FcOpLess:
|
||||||
ret = left.u.d < right.u.d;
|
ret = left.u.d < right.u.d;
|
||||||
break;
|
break;
|
||||||
case FcOpLessEqual:
|
case FcOpLessEqual:
|
||||||
ret = left.u.d <= right.u.d;
|
ret = left.u.d <= right.u.d;
|
||||||
break;
|
break;
|
||||||
case FcOpMore:
|
case FcOpMore:
|
||||||
ret = left.u.d > right.u.d;
|
ret = left.u.d > right.u.d;
|
||||||
break;
|
break;
|
||||||
case FcOpMoreEqual:
|
case FcOpMoreEqual:
|
||||||
ret = left.u.d >= right.u.d;
|
ret = left.u.d >= right.u.d;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -734,7 +734,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
break;
|
break;
|
||||||
case FcTypeBool:
|
case FcTypeBool:
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case FcOpEqual:
|
case FcOpEqual:
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
ret = left.u.b == right.u.b;
|
ret = left.u.b == right.u.b;
|
||||||
|
@ -749,7 +749,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
break;
|
break;
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case FcOpEqual:
|
case FcOpEqual:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
ret = FcStrCmpIgnoreCase (left.u.s, right.u.s) == 0;
|
ret = FcStrCmpIgnoreCase (left.u.s, right.u.s) == 0;
|
||||||
break;
|
break;
|
||||||
|
@ -872,7 +872,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
FcResult r;
|
FcResult r;
|
||||||
FcMatrix *m;
|
FcMatrix *m;
|
||||||
FcChar8 *str;
|
FcChar8 *str;
|
||||||
|
|
||||||
switch (e->op) {
|
switch (e->op) {
|
||||||
case FcOpInteger:
|
case FcOpInteger:
|
||||||
v.type = FcTypeInteger;
|
v.type = FcTypeInteger;
|
||||||
|
@ -957,24 +957,24 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
switch (vl.type) {
|
switch (vl.type) {
|
||||||
case FcTypeDouble:
|
case FcTypeDouble:
|
||||||
switch (e->op) {
|
switch (e->op) {
|
||||||
case FcOpPlus:
|
case FcOpPlus:
|
||||||
v.type = FcTypeDouble;
|
v.type = FcTypeDouble;
|
||||||
v.u.d = vl.u.d + vr.u.d;
|
v.u.d = vl.u.d + vr.u.d;
|
||||||
break;
|
break;
|
||||||
case FcOpMinus:
|
case FcOpMinus:
|
||||||
v.type = FcTypeDouble;
|
v.type = FcTypeDouble;
|
||||||
v.u.d = vl.u.d - vr.u.d;
|
v.u.d = vl.u.d - vr.u.d;
|
||||||
break;
|
break;
|
||||||
case FcOpTimes:
|
case FcOpTimes:
|
||||||
v.type = FcTypeDouble;
|
v.type = FcTypeDouble;
|
||||||
v.u.d = vl.u.d * vr.u.d;
|
v.u.d = vl.u.d * vr.u.d;
|
||||||
break;
|
break;
|
||||||
case FcOpDivide:
|
case FcOpDivide:
|
||||||
v.type = FcTypeDouble;
|
v.type = FcTypeDouble;
|
||||||
v.u.d = vl.u.d / vr.u.d;
|
v.u.d = vl.u.d / vr.u.d;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
v.type = FcTypeVoid;
|
v.type = FcTypeVoid;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (v.type == FcTypeDouble &&
|
if (v.type == FcTypeDouble &&
|
||||||
|
@ -995,7 +995,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
v.u.b = vl.u.b && vr.u.b;
|
v.u.b = vl.u.b && vr.u.b;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
v.type = FcTypeVoid;
|
v.type = FcTypeVoid;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1006,7 +1006,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
str = FcStrPlus (vl.u.s, vr.u.s);
|
str = FcStrPlus (vl.u.s, vr.u.s);
|
||||||
v.u.s = FcStrStaticName (str);
|
v.u.s = FcStrStaticName (str);
|
||||||
FcStrFree (str);
|
FcStrFree (str);
|
||||||
|
|
||||||
if (!v.u.s)
|
if (!v.u.s)
|
||||||
v.type = FcTypeVoid;
|
v.type = FcTypeVoid;
|
||||||
break;
|
break;
|
||||||
|
@ -1139,7 +1139,7 @@ FcConfigMatchValueList (FcPattern *p,
|
||||||
FcExpr *e = t->expr;
|
FcExpr *e = t->expr;
|
||||||
FcValue value;
|
FcValue value;
|
||||||
FcValueList *v;
|
FcValueList *v;
|
||||||
|
|
||||||
while (e)
|
while (e)
|
||||||
{
|
{
|
||||||
/* Compute the value of the match expression */
|
/* Compute the value of the match expression */
|
||||||
|
@ -1180,7 +1180,7 @@ static FcValueList *
|
||||||
FcConfigValues (FcPattern *p, FcExpr *e, FcValueBinding binding)
|
FcConfigValues (FcPattern *p, FcExpr *e, FcValueBinding binding)
|
||||||
{
|
{
|
||||||
FcValueList *l;
|
FcValueList *l;
|
||||||
|
|
||||||
if (!e)
|
if (!e)
|
||||||
return 0;
|
return 0;
|
||||||
l = (FcValueList *) malloc (sizeof (FcValueList));
|
l = (FcValueList *) malloc (sizeof (FcValueList));
|
||||||
|
@ -1218,7 +1218,7 @@ FcConfigAdd (FcValueListPtr *head,
|
||||||
{
|
{
|
||||||
FcValueListPtr *prev, last, v;
|
FcValueListPtr *prev, last, v;
|
||||||
FcValueBinding sameBinding;
|
FcValueBinding sameBinding;
|
||||||
|
|
||||||
if (position)
|
if (position)
|
||||||
sameBinding = position->binding;
|
sameBinding = position->binding;
|
||||||
else
|
else
|
||||||
|
@ -1231,7 +1231,7 @@ FcConfigAdd (FcValueListPtr *head,
|
||||||
if (position)
|
if (position)
|
||||||
prev = &position->next;
|
prev = &position->next;
|
||||||
else
|
else
|
||||||
for (prev = head; *prev != NULL;
|
for (prev = head; *prev != NULL;
|
||||||
prev = &(*prev)->next)
|
prev = &(*prev)->next)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -1239,7 +1239,7 @@ FcConfigAdd (FcValueListPtr *head,
|
||||||
{
|
{
|
||||||
if (position)
|
if (position)
|
||||||
{
|
{
|
||||||
for (prev = head; *prev != NULL;
|
for (prev = head; *prev != NULL;
|
||||||
prev = &(*prev)->next)
|
prev = &(*prev)->next)
|
||||||
{
|
{
|
||||||
if (*prev == position)
|
if (*prev == position)
|
||||||
|
@ -1262,24 +1262,24 @@ FcConfigAdd (FcValueListPtr *head,
|
||||||
FcValueListPrint (*head);
|
FcValueListPrint (*head);
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new)
|
if (new)
|
||||||
{
|
{
|
||||||
last = new;
|
last = new;
|
||||||
while (last->next != NULL)
|
while (last->next != NULL)
|
||||||
last = last->next;
|
last = last->next;
|
||||||
|
|
||||||
last->next = *prev;
|
last->next = *prev;
|
||||||
*prev = new;
|
*prev = new;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FcDebug () & FC_DBG_EDIT)
|
if (FcDebug () & FC_DBG_EDIT)
|
||||||
{
|
{
|
||||||
printf ("%s list after ", append ? "Append" : "Prepend");
|
printf ("%s list after ", append ? "Append" : "Prepend");
|
||||||
FcValueListPrint (*head);
|
FcValueListPrint (*head);
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1310,7 +1310,7 @@ FcConfigPatternAdd (FcPattern *p,
|
||||||
if (list)
|
if (list)
|
||||||
{
|
{
|
||||||
FcPatternElt *e = FcPatternObjectInsertElt (p, object);
|
FcPatternElt *e = FcPatternObjectInsertElt (p, object);
|
||||||
|
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
FcConfigAdd (&e->values, 0, append, list);
|
FcConfigAdd (&e->values, 0, append, list);
|
||||||
|
@ -1462,7 +1462,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
||||||
if ((t->kind == FcMatchFont || kind == FcMatchPattern) &&
|
if ((t->kind == FcMatchFont || kind == FcMatchPattern) &&
|
||||||
t->object == e->object)
|
t->object == e->object)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* KLUDGE - the pattern may have been reallocated or
|
* KLUDGE - the pattern may have been reallocated or
|
||||||
* things may have been inserted or deleted above
|
* things may have been inserted or deleted above
|
||||||
* this element by other edits. Go back and find
|
* this element by other edits. Go back and find
|
||||||
|
@ -1485,7 +1485,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
||||||
{
|
{
|
||||||
FcValueList *thisValue = st[i].value;
|
FcValueList *thisValue = st[i].value;
|
||||||
FcValueList *nextValue = thisValue;
|
FcValueList *nextValue = thisValue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Append the new list of values after the current value
|
* Append the new list of values after the current value
|
||||||
*/
|
*/
|
||||||
|
@ -1624,7 +1624,7 @@ DllMain (HINSTANCE hinstDLL,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fontconfig_path[0] = '\0';
|
fontconfig_path[0] = '\0';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1671,7 +1671,7 @@ FcConfigFileExists (const FcChar8 *dir, const FcChar8 *file)
|
||||||
FcMemAlloc (FC_MEM_STRING, strlen ((char *) path) + 1);
|
FcMemAlloc (FC_MEM_STRING, strlen ((char *) path) + 1);
|
||||||
if (access ((char *) path, R_OK) == 0)
|
if (access ((char *) path, R_OK) == 0)
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
FcStrFree (path);
|
FcStrFree (path);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1703,7 +1703,7 @@ FcConfigGetPath (void)
|
||||||
if (env)
|
if (env)
|
||||||
{
|
{
|
||||||
e = env;
|
e = env;
|
||||||
while (*e)
|
while (*e)
|
||||||
{
|
{
|
||||||
colon = (FcChar8 *) strchr ((char *) e, FC_SEARCH_PATH_SEPARATOR);
|
colon = (FcChar8 *) strchr ((char *) e, FC_SEARCH_PATH_SEPARATOR);
|
||||||
if (!colon)
|
if (!colon)
|
||||||
|
@ -1720,7 +1720,7 @@ FcConfigGetPath (void)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (fontconfig_path[0] == '\0')
|
if (fontconfig_path[0] == '\0')
|
||||||
{
|
{
|
||||||
|
@ -1858,7 +1858,7 @@ FcConfigAppFontAddFile (FcConfig *config,
|
||||||
subdirs = FcStrSetCreate ();
|
subdirs = FcStrSetCreate ();
|
||||||
if (!subdirs)
|
if (!subdirs)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
||||||
set = FcConfigGetFonts (config, FcSetApplication);
|
set = FcConfigGetFonts (config, FcSetApplication);
|
||||||
if (!set)
|
if (!set)
|
||||||
{
|
{
|
||||||
|
@ -1894,7 +1894,7 @@ FcConfigAppFontAddDir (FcConfig *config,
|
||||||
{
|
{
|
||||||
FcFontSet *set;
|
FcFontSet *set;
|
||||||
FcStrSet *dirs;
|
FcStrSet *dirs;
|
||||||
|
|
||||||
if (!config)
|
if (!config)
|
||||||
{
|
{
|
||||||
config = FcConfigGetCurrent ();
|
config = FcConfigGetCurrent ();
|
||||||
|
@ -1905,7 +1905,7 @@ FcConfigAppFontAddDir (FcConfig *config,
|
||||||
dirs = FcStrSetCreate ();
|
dirs = FcStrSetCreate ();
|
||||||
if (!dirs)
|
if (!dirs)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
||||||
set = FcConfigGetFonts (config, FcSetApplication);
|
set = FcConfigGetFonts (config, FcSetApplication);
|
||||||
if (!set)
|
if (!set)
|
||||||
{
|
{
|
||||||
|
@ -1917,9 +1917,9 @@ FcConfigAppFontAddDir (FcConfig *config,
|
||||||
}
|
}
|
||||||
FcConfigSetFonts (config, set, FcSetApplication);
|
FcConfigSetFonts (config, set, FcSetApplication);
|
||||||
}
|
}
|
||||||
|
|
||||||
FcStrSetAddFilename (dirs, dir);
|
FcStrSetAddFilename (dirs, dir);
|
||||||
|
|
||||||
if (!FcConfigAddDirList (config, FcSetApplication, dirs))
|
if (!FcConfigAddDirList (config, FcSetApplication, dirs))
|
||||||
{
|
{
|
||||||
FcStrSetDestroy (dirs);
|
FcStrSetDestroy (dirs);
|
||||||
|
@ -1962,7 +1962,7 @@ FcConfigGlobMatch (const FcChar8 *glob,
|
||||||
{
|
{
|
||||||
FcChar8 c;
|
FcChar8 c;
|
||||||
|
|
||||||
while ((c = *glob++))
|
while ((c = *glob++))
|
||||||
{
|
{
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '*':
|
case '*':
|
||||||
|
@ -2034,7 +2034,7 @@ FcConfigPatternsMatch (const FcFontSet *patterns,
|
||||||
const FcPattern *font)
|
const FcPattern *font)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < patterns->nfont; i++)
|
for (i = 0; i < patterns->nfont; i++)
|
||||||
if (FcListPatternMatchAny (patterns->fonts[i], font))
|
if (FcListPatternMatchAny (patterns->fonts[i], font))
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
|
|
150
src/fccharset.c
150
src/fccharset.c
|
@ -53,7 +53,7 @@ void
|
||||||
FcCharSetDestroy (FcCharSet *fcs)
|
FcCharSetDestroy (FcCharSet *fcs)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (fcs->ref == FC_REF_CONSTANT)
|
if (fcs->ref == FC_REF_CONSTANT)
|
||||||
{
|
{
|
||||||
FcCacheObjectDereference (fcs);
|
FcCacheObjectDereference (fcs);
|
||||||
|
@ -135,9 +135,9 @@ FcCharSetFindLeaf (const FcCharSet *fcs, FcChar32 ucs4)
|
||||||
#define FC_IS_ZERO_OR_POWER_OF_TWO(x) (!((x) & ((x)-1)))
|
#define FC_IS_ZERO_OR_POWER_OF_TWO(x) (!((x) & ((x)-1)))
|
||||||
|
|
||||||
static FcBool
|
static FcBool
|
||||||
FcCharSetPutLeaf (FcCharSet *fcs,
|
FcCharSetPutLeaf (FcCharSet *fcs,
|
||||||
FcChar32 ucs4,
|
FcChar32 ucs4,
|
||||||
FcCharLeaf *leaf,
|
FcCharLeaf *leaf,
|
||||||
int pos)
|
int pos)
|
||||||
{
|
{
|
||||||
intptr_t *leaves = FcCharSetLeaves (fcs);
|
intptr_t *leaves = FcCharSetLeaves (fcs);
|
||||||
|
@ -188,8 +188,8 @@ FcCharSetPutLeaf (FcCharSet *fcs,
|
||||||
fcs->leaves_offset = FcPtrToOffset (fcs, leaves);
|
fcs->leaves_offset = FcPtrToOffset (fcs, leaves);
|
||||||
fcs->numbers_offset = FcPtrToOffset (fcs, numbers);
|
fcs->numbers_offset = FcPtrToOffset (fcs, numbers);
|
||||||
}
|
}
|
||||||
|
|
||||||
memmove (leaves + pos + 1, leaves + pos,
|
memmove (leaves + pos + 1, leaves + pos,
|
||||||
(fcs->num - pos) * sizeof (*leaves));
|
(fcs->num - pos) * sizeof (*leaves));
|
||||||
memmove (numbers + pos + 1, numbers + pos,
|
memmove (numbers + pos + 1, numbers + pos,
|
||||||
(fcs->num - pos) * sizeof (*numbers));
|
(fcs->num - pos) * sizeof (*numbers));
|
||||||
|
@ -213,11 +213,11 @@ FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4)
|
||||||
pos = FcCharSetFindLeafPos (fcs, ucs4);
|
pos = FcCharSetFindLeafPos (fcs, ucs4);
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
return FcCharSetLeaf(fcs, pos);
|
return FcCharSetLeaf(fcs, pos);
|
||||||
|
|
||||||
leaf = calloc (1, sizeof (FcCharLeaf));
|
leaf = calloc (1, sizeof (FcCharLeaf));
|
||||||
if (!leaf)
|
if (!leaf)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
pos = -pos - 1;
|
pos = -pos - 1;
|
||||||
if (!FcCharSetPutLeaf (fcs, ucs4, leaf, pos))
|
if (!FcCharSetPutLeaf (fcs, ucs4, leaf, pos))
|
||||||
{
|
{
|
||||||
|
@ -251,7 +251,7 @@ FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4)
|
||||||
{
|
{
|
||||||
FcCharLeaf *leaf;
|
FcCharLeaf *leaf;
|
||||||
FcChar32 *b;
|
FcChar32 *b;
|
||||||
|
|
||||||
if (fcs->ref == FC_REF_CONSTANT)
|
if (fcs->ref == FC_REF_CONSTANT)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
leaf = FcCharSetFindLeafCreate (fcs, ucs4);
|
leaf = FcCharSetFindLeafCreate (fcs, ucs4);
|
||||||
|
@ -337,7 +337,7 @@ FcCharSetEqual (const FcCharSet *a, const FcCharSet *b)
|
||||||
{
|
{
|
||||||
FcCharSetIter ai, bi;
|
FcCharSetIter ai, bi;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (a == b)
|
if (a == b)
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
for (FcCharSetIterStart (a, &ai), FcCharSetIterStart (b, &bi);
|
for (FcCharSetIterStart (a, &ai), FcCharSetIterStart (b, &bi);
|
||||||
|
@ -568,7 +568,7 @@ FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b)
|
||||||
{
|
{
|
||||||
FcCharSetIter ai, bi;
|
FcCharSetIter ai, bi;
|
||||||
FcChar32 count = 0;
|
FcChar32 count = 0;
|
||||||
|
|
||||||
FcCharSetIterStart (a, &ai);
|
FcCharSetIterStart (a, &ai);
|
||||||
FcCharSetIterStart (b, &bi);
|
FcCharSetIterStart (b, &bi);
|
||||||
while (ai.leaf && bi.leaf)
|
while (ai.leaf && bi.leaf)
|
||||||
|
@ -581,7 +581,7 @@ FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b)
|
||||||
while (i--)
|
while (i--)
|
||||||
count += FcCharSetPopCount (*am++ & *bm++);
|
count += FcCharSetPopCount (*am++ & *bm++);
|
||||||
FcCharSetIterNext (a, &ai);
|
FcCharSetIterNext (a, &ai);
|
||||||
}
|
}
|
||||||
else if (ai.ucs4 < bi.ucs4)
|
else if (ai.ucs4 < bi.ucs4)
|
||||||
{
|
{
|
||||||
ai.ucs4 = bi.ucs4;
|
ai.ucs4 = bi.ucs4;
|
||||||
|
@ -601,7 +601,7 @@ FcCharSetCount (const FcCharSet *a)
|
||||||
{
|
{
|
||||||
FcCharSetIter ai;
|
FcCharSetIter ai;
|
||||||
FcChar32 count = 0;
|
FcChar32 count = 0;
|
||||||
|
|
||||||
for (FcCharSetIterStart (a, &ai); ai.leaf; FcCharSetIterNext (a, &ai))
|
for (FcCharSetIterStart (a, &ai); ai.leaf; FcCharSetIterNext (a, &ai))
|
||||||
{
|
{
|
||||||
int i = 256/32;
|
int i = 256/32;
|
||||||
|
@ -618,7 +618,7 @@ FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b)
|
||||||
{
|
{
|
||||||
FcCharSetIter ai, bi;
|
FcCharSetIter ai, bi;
|
||||||
FcChar32 count = 0;
|
FcChar32 count = 0;
|
||||||
|
|
||||||
FcCharSetIterStart (a, &ai);
|
FcCharSetIterStart (a, &ai);
|
||||||
FcCharSetIterStart (b, &bi);
|
FcCharSetIterStart (b, &bi);
|
||||||
while (ai.leaf)
|
while (ai.leaf)
|
||||||
|
@ -657,7 +657,7 @@ FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b)
|
||||||
{
|
{
|
||||||
int ai, bi;
|
int ai, bi;
|
||||||
FcChar16 an, bn;
|
FcChar16 an, bn;
|
||||||
|
|
||||||
if (a == b) return FcTrue;
|
if (a == b) return FcTrue;
|
||||||
bi = 0;
|
bi = 0;
|
||||||
ai = 0;
|
ai = 0;
|
||||||
|
@ -672,7 +672,7 @@ FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b)
|
||||||
{
|
{
|
||||||
FcChar32 *am = FcCharSetLeaf(a, ai)->map;
|
FcChar32 *am = FcCharSetLeaf(a, ai)->map;
|
||||||
FcChar32 *bm = FcCharSetLeaf(b, bi)->map;
|
FcChar32 *bm = FcCharSetLeaf(b, bi)->map;
|
||||||
|
|
||||||
if (am != bm)
|
if (am != bm)
|
||||||
{
|
{
|
||||||
int i = 256/32;
|
int i = 256/32;
|
||||||
|
@ -710,7 +710,7 @@ FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FcChar32
|
FcChar32
|
||||||
FcCharSetNextPage (const FcCharSet *a,
|
FcCharSetNextPage (const FcCharSet *a,
|
||||||
FcChar32 map[FC_CHARSET_MAP_SIZE],
|
FcChar32 map[FC_CHARSET_MAP_SIZE],
|
||||||
FcChar32 *next)
|
FcChar32 *next)
|
||||||
{
|
{
|
||||||
|
@ -721,7 +721,7 @@ FcCharSetNextPage (const FcCharSet *a,
|
||||||
FcCharSetIterSet (a, &ai);
|
FcCharSetIterSet (a, &ai);
|
||||||
if (!ai.leaf)
|
if (!ai.leaf)
|
||||||
return FC_CHARSET_DONE;
|
return FC_CHARSET_DONE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Save current information
|
* Save current information
|
||||||
*/
|
*/
|
||||||
|
@ -737,7 +737,7 @@ FcCharSetNextPage (const FcCharSet *a,
|
||||||
}
|
}
|
||||||
|
|
||||||
FcChar32
|
FcChar32
|
||||||
FcCharSetFirstPage (const FcCharSet *a,
|
FcCharSetFirstPage (const FcCharSet *a,
|
||||||
FcChar32 map[FC_CHARSET_MAP_SIZE],
|
FcChar32 map[FC_CHARSET_MAP_SIZE],
|
||||||
FcChar32 *next)
|
FcChar32 *next)
|
||||||
{
|
{
|
||||||
|
@ -748,7 +748,7 @@ FcCharSetFirstPage (const FcCharSet *a,
|
||||||
/*
|
/*
|
||||||
* old coverage API, rather hard to use correctly
|
* old coverage API, rather hard to use correctly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FcChar32
|
FcChar32
|
||||||
FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result)
|
FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result)
|
||||||
{
|
{
|
||||||
|
@ -772,7 +772,7 @@ FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ASCII representation of charsets.
|
* ASCII representation of charsets.
|
||||||
*
|
*
|
||||||
* Each leaf is represented as 9 32-bit values, the code of the first character followed
|
* Each leaf is represented as 9 32-bit values, the code of the first character followed
|
||||||
* by 8 32 bit values for the leaf itself. Each value is encoded as 5 ASCII characters,
|
* by 8 32 bit values for the leaf itself. Each value is encoded as 5 ASCII characters,
|
||||||
* only 85 different values are used to avoid control characters as well as the other
|
* only 85 different values are used to avoid control characters as well as the other
|
||||||
|
@ -781,38 +781,38 @@ FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const unsigned char charToValue[256] = {
|
static const unsigned char charToValue[256] = {
|
||||||
/* "" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\b" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\b" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\020" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\020" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\030" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\030" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* " " */ 0xff, 0x00, 0xff, 0x01, 0x02, 0x03, 0x04, 0xff,
|
/* " " */ 0xff, 0x00, 0xff, 0x01, 0x02, 0x03, 0x04, 0xff,
|
||||||
/* "(" */ 0x05, 0x06, 0x07, 0x08, 0xff, 0xff, 0x09, 0x0a,
|
/* "(" */ 0x05, 0x06, 0x07, 0x08, 0xff, 0xff, 0x09, 0x0a,
|
||||||
/* "0" */ 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
|
/* "0" */ 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
|
||||||
/* "8" */ 0x13, 0x14, 0xff, 0x15, 0x16, 0xff, 0x17, 0x18,
|
/* "8" */ 0x13, 0x14, 0xff, 0x15, 0x16, 0xff, 0x17, 0x18,
|
||||||
/* "@" */ 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
|
/* "@" */ 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
|
||||||
/* "H" */ 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
|
/* "H" */ 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
|
||||||
/* "P" */ 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
|
/* "P" */ 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
|
||||||
/* "X" */ 0x31, 0x32, 0x33, 0x34, 0xff, 0x35, 0x36, 0xff,
|
/* "X" */ 0x31, 0x32, 0x33, 0x34, 0xff, 0x35, 0x36, 0xff,
|
||||||
/* "`" */ 0xff, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d,
|
/* "`" */ 0xff, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d,
|
||||||
/* "h" */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45,
|
/* "h" */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45,
|
||||||
/* "p" */ 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d,
|
/* "p" */ 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d,
|
||||||
/* "x" */ 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0xff,
|
/* "x" */ 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0xff,
|
||||||
/* "\200" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\200" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\210" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\210" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\220" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\220" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\230" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\230" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\240" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\240" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\250" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\250" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\260" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\260" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\270" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\270" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\300" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\300" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\310" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\310" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\320" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\320" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\330" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\330" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\340" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\340" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\350" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\350" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\360" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\360" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
/* "\370" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* "\370" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const FcChar8 valueToChar[0x55] = {
|
static const FcChar8 valueToChar[0x55] = {
|
||||||
|
@ -835,7 +835,7 @@ FcCharSetParseValue (FcChar8 *string, FcChar32 *value)
|
||||||
int i;
|
int i;
|
||||||
FcChar32 v;
|
FcChar32 v;
|
||||||
FcChar32 c;
|
FcChar32 c;
|
||||||
|
|
||||||
if (*string == ' ')
|
if (*string == ' ')
|
||||||
{
|
{
|
||||||
v = 0;
|
v = 0;
|
||||||
|
@ -1006,7 +1006,7 @@ FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c)
|
||||||
FcCharSetDestroy (check);
|
FcCharSetDestroy (check);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1093,7 +1093,7 @@ FcCharSetFreezeLeaf (FcCharSetFreezer *freezer, FcCharLeaf *leaf)
|
||||||
FcChar32 hash = FcCharLeafHash (leaf);
|
FcChar32 hash = FcCharLeafHash (leaf);
|
||||||
FcCharLeafEnt **bucket = &freezer->leaf_hash_table[hash % FC_CHAR_LEAF_HASH_SIZE];
|
FcCharLeafEnt **bucket = &freezer->leaf_hash_table[hash % FC_CHAR_LEAF_HASH_SIZE];
|
||||||
FcCharLeafEnt *ent;
|
FcCharLeafEnt *ent;
|
||||||
|
|
||||||
for (ent = *bucket; ent; ent = ent->next)
|
for (ent = *bucket; ent; ent = ent->next)
|
||||||
{
|
{
|
||||||
if (ent->hash == hash && !memcmp (&ent->leaf, leaf, sizeof (FcCharLeaf)))
|
if (ent->hash == hash && !memcmp (&ent->leaf, leaf, sizeof (FcCharLeaf)))
|
||||||
|
@ -1130,7 +1130,7 @@ FcCharSetFreezeOrig (FcCharSetFreezer *freezer, const FcCharSet *orig, const FcC
|
||||||
{
|
{
|
||||||
FcCharSetOrigEnt **bucket = &freezer->orig_hash_table[((uintptr_t) orig) & FC_CHAR_SET_HASH_SIZE];
|
FcCharSetOrigEnt **bucket = &freezer->orig_hash_table[((uintptr_t) orig) & FC_CHAR_SET_HASH_SIZE];
|
||||||
FcCharSetOrigEnt *ent;
|
FcCharSetOrigEnt *ent;
|
||||||
|
|
||||||
ent = malloc (sizeof (FcCharSetOrigEnt));
|
ent = malloc (sizeof (FcCharSetOrigEnt));
|
||||||
if (!ent)
|
if (!ent)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
@ -1154,7 +1154,7 @@ FcCharSetFreezeBase (FcCharSetFreezer *freezer, FcCharSet *fcs, const FcCharSet
|
||||||
{
|
{
|
||||||
if (ent->hash == hash &&
|
if (ent->hash == hash &&
|
||||||
ent->set.num == fcs->num &&
|
ent->set.num == fcs->num &&
|
||||||
!memcmp (FcCharSetNumbers(&ent->set),
|
!memcmp (FcCharSetNumbers(&ent->set),
|
||||||
FcCharSetNumbers(fcs),
|
FcCharSetNumbers(fcs),
|
||||||
fcs->num * sizeof (FcChar16)))
|
fcs->num * sizeof (FcChar16)))
|
||||||
{
|
{
|
||||||
|
@ -1176,9 +1176,9 @@ FcCharSetFreezeBase (FcCharSetFreezer *freezer, FcCharSet *fcs, const FcCharSet
|
||||||
if (!ent)
|
if (!ent)
|
||||||
return 0;
|
return 0;
|
||||||
FcMemAlloc (FC_MEM_CHARSET, size);
|
FcMemAlloc (FC_MEM_CHARSET, size);
|
||||||
|
|
||||||
freezer->charsets_allocated++;
|
freezer->charsets_allocated++;
|
||||||
|
|
||||||
ent->set.ref = FC_REF_CONSTANT;
|
ent->set.ref = FC_REF_CONSTANT;
|
||||||
ent->set.num = fcs->num;
|
ent->set.num = fcs->num;
|
||||||
if (fcs->num)
|
if (fcs->num)
|
||||||
|
@ -1188,13 +1188,13 @@ FcCharSetFreezeBase (FcCharSetFreezer *freezer, FcCharSet *fcs, const FcCharSet
|
||||||
ent->set.leaves_offset = sizeof (ent->set);
|
ent->set.leaves_offset = sizeof (ent->set);
|
||||||
ent->set.numbers_offset = (ent->set.leaves_offset +
|
ent->set.numbers_offset = (ent->set.leaves_offset +
|
||||||
fcs->num * sizeof (intptr_t));
|
fcs->num * sizeof (intptr_t));
|
||||||
|
|
||||||
ent_leaves = FcCharSetLeaves (&ent->set);
|
ent_leaves = FcCharSetLeaves (&ent->set);
|
||||||
for (i = 0; i < fcs->num; i++)
|
for (i = 0; i < fcs->num; i++)
|
||||||
ent_leaves[i] = FcPtrToOffset (ent_leaves,
|
ent_leaves[i] = FcPtrToOffset (ent_leaves,
|
||||||
FcCharSetLeaf (fcs, i));
|
FcCharSetLeaf (fcs, i));
|
||||||
memcpy (FcCharSetNumbers (&ent->set),
|
memcpy (FcCharSetNumbers (&ent->set),
|
||||||
FcCharSetNumbers (fcs),
|
FcCharSetNumbers (fcs),
|
||||||
fcs->num * sizeof (FcChar16));
|
fcs->num * sizeof (FcChar16));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1215,7 +1215,7 @@ FcCharSetFindFrozen (FcCharSetFreezer *freezer, const FcCharSet *orig)
|
||||||
{
|
{
|
||||||
FcCharSetOrigEnt **bucket = &freezer->orig_hash_table[((uintptr_t) orig) & FC_CHAR_SET_HASH_SIZE];
|
FcCharSetOrigEnt **bucket = &freezer->orig_hash_table[((uintptr_t) orig) & FC_CHAR_SET_HASH_SIZE];
|
||||||
FcCharSetOrigEnt *ent;
|
FcCharSetOrigEnt *ent;
|
||||||
|
|
||||||
for (ent = *bucket; ent; ent = ent->next)
|
for (ent = *bucket; ent; ent = ent->next)
|
||||||
if (ent->orig == orig)
|
if (ent->orig == orig)
|
||||||
return ent->frozen;
|
return ent->frozen;
|
||||||
|
@ -1325,7 +1325,7 @@ FcCharSetSerializeAlloc (FcSerialize *serialize, const FcCharSet *cs)
|
||||||
intptr_t *leaves;
|
intptr_t *leaves;
|
||||||
FcChar16 *numbers;
|
FcChar16 *numbers;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (cs->ref != FC_REF_CONSTANT)
|
if (cs->ref != FC_REF_CONSTANT)
|
||||||
{
|
{
|
||||||
if (!serialize->cs_freezer)
|
if (!serialize->cs_freezer)
|
||||||
|
@ -1336,13 +1336,13 @@ FcCharSetSerializeAlloc (FcSerialize *serialize, const FcCharSet *cs)
|
||||||
}
|
}
|
||||||
if (FcCharSetFindFrozen (serialize->cs_freezer, cs))
|
if (FcCharSetFindFrozen (serialize->cs_freezer, cs))
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
|
|
||||||
cs = FcCharSetFreeze (serialize->cs_freezer, cs);
|
cs = FcCharSetFreeze (serialize->cs_freezer, cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
leaves = FcCharSetLeaves (cs);
|
leaves = FcCharSetLeaves (cs);
|
||||||
numbers = FcCharSetNumbers (cs);
|
numbers = FcCharSetNumbers (cs);
|
||||||
|
|
||||||
if (!FcSerializeAlloc (serialize, cs, sizeof (FcCharSet)))
|
if (!FcSerializeAlloc (serialize, cs, sizeof (FcCharSet)))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
if (!FcSerializeAlloc (serialize, leaves, cs->num * sizeof (intptr_t)))
|
if (!FcSerializeAlloc (serialize, leaves, cs->num * sizeof (intptr_t)))
|
||||||
|
@ -1355,7 +1355,7 @@ FcCharSetSerializeAlloc (FcSerialize *serialize, const FcCharSet *cs)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
FcCharSet *
|
FcCharSet *
|
||||||
FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs)
|
FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs)
|
||||||
{
|
{
|
||||||
|
@ -1371,11 +1371,11 @@ FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs)
|
||||||
if (!cs)
|
if (!cs)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cs_serialized = FcSerializePtr (serialize, cs);
|
cs_serialized = FcSerializePtr (serialize, cs);
|
||||||
if (!cs_serialized)
|
if (!cs_serialized)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
cs_serialized->ref = FC_REF_CONSTANT;
|
cs_serialized->ref = FC_REF_CONSTANT;
|
||||||
cs_serialized->num = cs->num;
|
cs_serialized->num = cs->num;
|
||||||
|
|
||||||
|
@ -1385,7 +1385,7 @@ FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs)
|
||||||
leaves_serialized = FcSerializePtr (serialize, leaves);
|
leaves_serialized = FcSerializePtr (serialize, leaves);
|
||||||
if (!leaves_serialized)
|
if (!leaves_serialized)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
cs_serialized->leaves_offset = FcPtrToOffset (cs_serialized,
|
cs_serialized->leaves_offset = FcPtrToOffset (cs_serialized,
|
||||||
leaves_serialized);
|
leaves_serialized);
|
||||||
|
|
||||||
|
@ -1393,10 +1393,10 @@ FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs)
|
||||||
numbers_serialized = FcSerializePtr (serialize, numbers);
|
numbers_serialized = FcSerializePtr (serialize, numbers);
|
||||||
if (!numbers)
|
if (!numbers)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
cs_serialized->numbers_offset = FcPtrToOffset (cs_serialized,
|
cs_serialized->numbers_offset = FcPtrToOffset (cs_serialized,
|
||||||
numbers_serialized);
|
numbers_serialized);
|
||||||
|
|
||||||
for (i = 0; i < cs->num; i++)
|
for (i = 0; i < cs->num; i++)
|
||||||
{
|
{
|
||||||
leaf = FcCharSetLeaf (cs, i);
|
leaf = FcCharSetLeaf (cs, i);
|
||||||
|
@ -1404,7 +1404,7 @@ FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs)
|
||||||
if (!leaf_serialized)
|
if (!leaf_serialized)
|
||||||
return NULL;
|
return NULL;
|
||||||
*leaf_serialized = *leaf;
|
*leaf_serialized = *leaf;
|
||||||
leaves_serialized[i] = FcPtrToOffset (leaves_serialized,
|
leaves_serialized[i] = FcPtrToOffset (leaves_serialized,
|
||||||
leaf_serialized);
|
leaf_serialized);
|
||||||
numbers_serialized[i] = numbers[i];
|
numbers_serialized[i] = numbers[i];
|
||||||
}
|
}
|
||||||
|
@ -1414,7 +1414,7 @@ FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs)
|
||||||
cs_serialized->leaves_offset = 0;
|
cs_serialized->leaves_offset = 0;
|
||||||
cs_serialized->numbers_offset = 0;
|
cs_serialized->numbers_offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return cs_serialized;
|
return cs_serialized;
|
||||||
}
|
}
|
||||||
#define __fccharset__
|
#define __fccharset__
|
||||||
|
|
14
src/fcdbg.c
14
src/fcdbg.c
|
@ -87,7 +87,7 @@ FcLangSetPrint (const FcLangSet *ls)
|
||||||
{
|
{
|
||||||
FcStrBuf buf;
|
FcStrBuf buf;
|
||||||
FcChar8 init_buf[1024];
|
FcChar8 init_buf[1024];
|
||||||
|
|
||||||
FcStrBufInit (&buf, init_buf, sizeof (init_buf));
|
FcStrBufInit (&buf, init_buf, sizeof (init_buf));
|
||||||
if (FcNameUnparseLangSet (&buf, ls) && FcStrBufChar (&buf,'\0'))
|
if (FcNameUnparseLangSet (&buf, ls) && FcStrBufChar (&buf,'\0'))
|
||||||
printf ("%s", buf.buf);
|
printf ("%s", buf.buf);
|
||||||
|
@ -102,16 +102,16 @@ FcCharSetPrint (const FcCharSet *c)
|
||||||
int i, j;
|
int i, j;
|
||||||
intptr_t *leaves = FcCharSetLeaves (c);
|
intptr_t *leaves = FcCharSetLeaves (c);
|
||||||
FcChar16 *numbers = FcCharSetNumbers (c);
|
FcChar16 *numbers = FcCharSetNumbers (c);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
printf ("CharSet 0x%x\n", (intptr_t) c);
|
printf ("CharSet 0x%x\n", (intptr_t) c);
|
||||||
printf ("Leaves: +%d = 0x%x\n", c->leaves_offset, (intptr_t) leaves);
|
printf ("Leaves: +%d = 0x%x\n", c->leaves_offset, (intptr_t) leaves);
|
||||||
printf ("Numbers: +%d = 0x%x\n", c->numbers_offset, (intptr_t) numbers);
|
printf ("Numbers: +%d = 0x%x\n", c->numbers_offset, (intptr_t) numbers);
|
||||||
|
|
||||||
for (i = 0; i < c->num; i++)
|
for (i = 0; i < c->num; i++)
|
||||||
{
|
{
|
||||||
printf ("Page %d: %04x +%d = 0x%x\n",
|
printf ("Page %d: %04x +%d = 0x%x\n",
|
||||||
i, numbers[i], leaves[i],
|
i, numbers[i], leaves[i],
|
||||||
(intptr_t) FcOffsetToPtr (leaves, leaves[i], FcCharLeaf));
|
(intptr_t) FcOffsetToPtr (leaves, leaves[i], FcCharLeaf));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -135,7 +135,7 @@ FcPatternPrint (const FcPattern *p)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
FcPatternElt *e;
|
FcPatternElt *e;
|
||||||
|
|
||||||
if (!p)
|
if (!p)
|
||||||
{
|
{
|
||||||
printf ("Null pattern\n");
|
printf ("Null pattern\n");
|
||||||
|
@ -347,7 +347,7 @@ FcSubstPrint (const FcSubst *subst)
|
||||||
{
|
{
|
||||||
FcEdit *e;
|
FcEdit *e;
|
||||||
FcTest *t;
|
FcTest *t;
|
||||||
|
|
||||||
printf ("match\n");
|
printf ("match\n");
|
||||||
for (t = subst->test; t; t = t->next)
|
for (t = subst->test; t; t = t->next)
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,7 +134,7 @@ FcDefaultSubstitute (FcPattern *pattern)
|
||||||
for (i = 0; i < NUM_FC_BOOL_DEFAULTS; i++)
|
for (i = 0; i < NUM_FC_BOOL_DEFAULTS; i++)
|
||||||
if (FcPatternObjectGet (pattern, FcBoolDefaults[i].field, 0, &v) == FcResultNoMatch)
|
if (FcPatternObjectGet (pattern, FcBoolDefaults[i].field, 0, &v) == FcResultNoMatch)
|
||||||
FcPatternObjectAddBool (pattern, FcBoolDefaults[i].field, FcBoolDefaults[i].value);
|
FcPatternObjectAddBool (pattern, FcBoolDefaults[i].field, FcBoolDefaults[i].value);
|
||||||
|
|
||||||
if (FcPatternObjectGet (pattern, FC_PIXEL_SIZE_OBJECT, 0, &v) == FcResultNoMatch)
|
if (FcPatternObjectGet (pattern, FC_PIXEL_SIZE_OBJECT, 0, &v) == FcResultNoMatch)
|
||||||
{
|
{
|
||||||
double dpi, size, scale;
|
double dpi, size, scale;
|
||||||
|
|
14
src/fcdir.c
14
src/fcdir.c
|
@ -45,7 +45,7 @@ FcFileScanFontConfig (FcFontSet *set,
|
||||||
FcBool ret = FcTrue;
|
FcBool ret = FcTrue;
|
||||||
int id;
|
int id;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
id = 0;
|
id = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,7 @@ FcDirScanConfig (FcFontSet *set,
|
||||||
strcpy ((char *) file, (char *) dir);
|
strcpy ((char *) file, (char *) dir);
|
||||||
strcat ((char *) file, "/");
|
strcat ((char *) file, "/");
|
||||||
base = file + strlen ((char *) file);
|
base = file + strlen ((char *) file);
|
||||||
|
|
||||||
if (FcDebug () & FC_DBG_SCAN)
|
if (FcDebug () & FC_DBG_SCAN)
|
||||||
printf ("\tScanning dir %s\n", dir);
|
printf ("\tScanning dir %s\n", dir);
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ FcDirScanConfig (FcFontSet *set,
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < files->num; i++)
|
for (i = 0; i < files->num; i++)
|
||||||
FcFileScanConfig (set, dirs, blanks, files->strs[i], config);
|
FcFileScanConfig (set, dirs, blanks, files->strs[i], config);
|
||||||
|
|
||||||
bail2:
|
bail2:
|
||||||
FcStrSetDestroy (files);
|
FcStrSetDestroy (files);
|
||||||
bail1:
|
bail1:
|
||||||
|
@ -282,12 +282,12 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config)
|
||||||
ret = FcFalse;
|
ret = FcFalse;
|
||||||
goto bail2;
|
goto bail2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write out the cache file, ignoring any troubles
|
* Write out the cache file, ignoring any troubles
|
||||||
*/
|
*/
|
||||||
FcDirCacheWrite (cache, config);
|
FcDirCacheWrite (cache, config);
|
||||||
|
|
||||||
bail2:
|
bail2:
|
||||||
FcStrSetDestroy (dirs);
|
FcStrSetDestroy (dirs);
|
||||||
bail1:
|
bail1:
|
||||||
|
@ -310,11 +310,11 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config)
|
||||||
/* Try to use existing cache file */
|
/* Try to use existing cache file */
|
||||||
if (!force)
|
if (!force)
|
||||||
cache = FcDirCacheLoad (dir, config, NULL);
|
cache = FcDirCacheLoad (dir, config, NULL);
|
||||||
|
|
||||||
/* Not using existing cache file, construct new cache */
|
/* Not using existing cache file, construct new cache */
|
||||||
if (!cache)
|
if (!cache)
|
||||||
cache = FcDirCacheScan (dir, config);
|
cache = FcDirCacheScan (dir, config);
|
||||||
|
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,14 +252,14 @@ static const FcFtLanguage fcFtLanguage[] = {
|
||||||
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_DZONGKHA, "dz" },
|
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_DZONGKHA, "dz" },
|
||||||
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_JAVANESE, "jw" },
|
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_JAVANESE, "jw" },
|
||||||
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_SUNDANESE, "su" },
|
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_SUNDANESE, "su" },
|
||||||
|
|
||||||
#if 0 /* these seem to be errors that have been dropped */
|
#if 0 /* these seem to be errors that have been dropped */
|
||||||
|
|
||||||
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_SCOTTISH_GAELIC },
|
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_SCOTTISH_GAELIC },
|
||||||
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_IRISH_GAELIC },
|
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_IRISH_GAELIC },
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The following codes are new as of 2000-03-10 */
|
/* The following codes are new as of 2000-03-10 */
|
||||||
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_GALICIAN, "gl" },
|
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_GALICIAN, "gl" },
|
||||||
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_AFRIKAANS, "af" },
|
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_AFRIKAANS, "af" },
|
||||||
|
@ -495,7 +495,7 @@ static const FcFtLanguage fcFtLanguage[] = {
|
||||||
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_PASHTO_AFGHANISTAN, "ps" },
|
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_PASHTO_AFGHANISTAN, "ps" },
|
||||||
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_FILIPINO_PHILIPPINES, "phi" },
|
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_FILIPINO_PHILIPPINES, "phi" },
|
||||||
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_DHIVEHI_MALDIVES, "div" },
|
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_DHIVEHI_MALDIVES, "div" },
|
||||||
|
|
||||||
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_OROMO_ETHIOPIA, "om" },
|
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_OROMO_ETHIOPIA, "om" },
|
||||||
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_TIGRIGNA_ETHIOPIA, "ti" },
|
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_TIGRIGNA_ETHIOPIA, "ti" },
|
||||||
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_TIGRIGNA_ERYTHREA, "ti" },
|
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_TIGRIGNA_ERYTHREA, "ti" },
|
||||||
|
@ -744,7 +744,7 @@ FcSfntNameTranscode (FT_SfntName *sname)
|
||||||
|
|
||||||
while (in_bytes_left)
|
while (in_bytes_left)
|
||||||
{
|
{
|
||||||
size_t did = iconv (cd,
|
size_t did = iconv (cd,
|
||||||
&inbuf, &in_bytes_left,
|
&inbuf, &in_bytes_left,
|
||||||
&outbuf, &out_bytes_left);
|
&outbuf, &out_bytes_left);
|
||||||
if (did == (size_t) (-1))
|
if (did == (size_t) (-1))
|
||||||
|
@ -786,7 +786,7 @@ FcSfntNameLanguage (FT_SfntName *sname)
|
||||||
{
|
{
|
||||||
language_id = TT_MAC_LANGID_JAPANESE;
|
language_id = TT_MAC_LANGID_JAPANESE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < NUM_FC_FT_LANGUAGE; i++)
|
for (i = 0; i < NUM_FC_FT_LANGUAGE; i++)
|
||||||
if (fcFtLanguage[i].platform_id == platform_id &&
|
if (fcFtLanguage[i].platform_id == platform_id &&
|
||||||
(fcFtLanguage[i].language_id == TT_LANGUAGE_DONT_CARE ||
|
(fcFtLanguage[i].language_id == TT_LANGUAGE_DONT_CARE ||
|
||||||
|
@ -871,7 +871,7 @@ FcVendorMatch(const FT_Char vendor[4], const FT_Char *vendor_string)
|
||||||
{
|
{
|
||||||
/* vendor is not necessarily NUL-terminated. */
|
/* vendor is not necessarily NUL-terminated. */
|
||||||
int i, len;
|
int i, len;
|
||||||
|
|
||||||
len = strlen((char *) vendor_string);
|
len = strlen((char *) vendor_string);
|
||||||
if (memcmp(vendor, vendor_string, len) != 0)
|
if (memcmp(vendor, vendor_string, len) != 0)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
@ -927,7 +927,7 @@ static const FcChar8 *
|
||||||
FcVendorFoundry(const FT_Char vendor[4])
|
FcVendorFoundry(const FT_Char vendor[4])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (vendor)
|
if (vendor)
|
||||||
for(i = 0; i < NUM_VENDOR_FOUNDRIES; i++)
|
for(i = 0; i < NUM_VENDOR_FOUNDRIES; i++)
|
||||||
if (FcVendorMatch (vendor, FcVendorFoundries[i].vendor))
|
if (FcVendorMatch (vendor, FcVendorFoundries[i].vendor))
|
||||||
|
@ -1140,7 +1140,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
const FcChar8 *exclusiveLang = 0;
|
const FcChar8 *exclusiveLang = 0;
|
||||||
FT_SfntName sname;
|
FT_SfntName sname;
|
||||||
FT_UInt snamei, snamec;
|
FT_UInt snamei, snamec;
|
||||||
|
|
||||||
int nfamily = 0;
|
int nfamily = 0;
|
||||||
int nfamily_lang = 0;
|
int nfamily_lang = 0;
|
||||||
int nstyle = 0;
|
int nstyle = 0;
|
||||||
|
@ -1152,7 +1152,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
|
|
||||||
FcChar8 *style = 0;
|
FcChar8 *style = 0;
|
||||||
int st;
|
int st;
|
||||||
|
|
||||||
pat = FcPatternCreate ();
|
pat = FcPatternCreate ();
|
||||||
if (!pat)
|
if (!pat)
|
||||||
goto bail0;
|
goto bail0;
|
||||||
|
@ -1178,7 +1178,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
* the Postscript FontInfo dictionary. Finally, the
|
* the Postscript FontInfo dictionary. Finally, the
|
||||||
* BDF properties will queried.
|
* BDF properties will queried.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (os2 && os2->version >= 0x0001 && os2->version != 0xffff)
|
if (os2 && os2->version >= 0x0001 && os2->version != 0xffff)
|
||||||
foundry = FcVendorFoundry(os2->achVendID);
|
foundry = FcVendorFoundry(os2->achVendID);
|
||||||
|
|
||||||
|
@ -1248,7 +1248,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
#endif
|
#endif
|
||||||
case TT_NAME_ID_PREFERRED_FAMILY:
|
case TT_NAME_ID_PREFERRED_FAMILY:
|
||||||
case TT_NAME_ID_FONT_FAMILY:
|
case TT_NAME_ID_FONT_FAMILY:
|
||||||
#if 0
|
#if 0
|
||||||
case TT_NAME_ID_PS_NAME:
|
case TT_NAME_ID_PS_NAME:
|
||||||
case TT_NAME_ID_UNIQUE_ID:
|
case TT_NAME_ID_UNIQUE_ID:
|
||||||
#endif
|
#endif
|
||||||
|
@ -1335,7 +1335,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nfamily && face->family_name &&
|
if (!nfamily && face->family_name &&
|
||||||
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0)
|
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0)
|
||||||
{
|
{
|
||||||
if (FcDebug () & FC_DBG_SCANV)
|
if (FcDebug () & FC_DBG_SCANV)
|
||||||
|
@ -1344,7 +1344,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
goto bail1;
|
goto bail1;
|
||||||
++nfamily;
|
++nfamily;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nstyle && face->style_name &&
|
if (!nstyle && face->style_name &&
|
||||||
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->style_name, (FcChar8 *) "") != 0)
|
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->style_name, (FcChar8 *) "") != 0)
|
||||||
{
|
{
|
||||||
|
@ -1354,7 +1354,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
goto bail1;
|
goto bail1;
|
||||||
++nstyle;
|
++nstyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nfamily)
|
if (!nfamily)
|
||||||
{
|
{
|
||||||
FcChar8 *start, *end;
|
FcChar8 *start, *end;
|
||||||
|
@ -1433,7 +1433,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
}
|
}
|
||||||
if (bits & (1 << bit))
|
if (bits & (1 << bit))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If the font advertises support for multiple
|
* If the font advertises support for multiple
|
||||||
* "exclusive" languages, then include support
|
* "exclusive" languages, then include support
|
||||||
* for any language found to have coverage
|
* for any language found to have coverage
|
||||||
|
@ -1505,7 +1505,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
* Type 1: Check for FontInfo dictionary information
|
* Type 1: Check for FontInfo dictionary information
|
||||||
* Code from g2@magestudios.net (Gerard Escalante)
|
* Code from g2@magestudios.net (Gerard Escalante)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if HAVE_FT_GET_PS_FONT_INFO
|
#if HAVE_FT_GET_PS_FONT_INFO
|
||||||
if (FT_Get_PS_Font_Info(face, &psfontinfo) == 0)
|
if (FT_Get_PS_Font_Info(face, &psfontinfo) == 0)
|
||||||
{
|
{
|
||||||
|
@ -1516,23 +1516,23 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
printf ("\tType1 weight %s maps to %d\n",
|
printf ("\tType1 weight %s maps to %d\n",
|
||||||
psfontinfo.weight, weight);
|
psfontinfo.weight, weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* Don't bother with italic_angle; FreeType already extracts that
|
* Don't bother with italic_angle; FreeType already extracts that
|
||||||
* information for us and sticks it into style_flags
|
* information for us and sticks it into style_flags
|
||||||
*/
|
*/
|
||||||
if (psfontinfo.italic_angle)
|
if (psfontinfo.italic_angle)
|
||||||
slant = FC_SLANT_ITALIC;
|
slant = FC_SLANT_ITALIC;
|
||||||
else
|
else
|
||||||
slant = FC_SLANT_ROMAN;
|
slant = FC_SLANT_ROMAN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!foundry)
|
if(!foundry)
|
||||||
foundry = FcNoticeFoundry(psfontinfo.notice);
|
foundry = FcNoticeFoundry(psfontinfo.notice);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_FT_GET_PS_FONT_INFO */
|
#endif /* HAVE_FT_GET_PS_FONT_INFO */
|
||||||
|
|
||||||
#if HAVE_FT_GET_BDF_PROPERTY
|
#if HAVE_FT_GET_BDF_PROPERTY
|
||||||
/*
|
/*
|
||||||
* Finally, look for a FOUNDRY BDF property if no other
|
* Finally, look for a FOUNDRY BDF property if no other
|
||||||
|
@ -1554,7 +1554,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
prop.type == BDF_PROPERTY_TYPE_CARDINAL))
|
prop.type == BDF_PROPERTY_TYPE_CARDINAL))
|
||||||
{
|
{
|
||||||
FT_Int32 value;
|
FT_Int32 value;
|
||||||
|
|
||||||
if (prop.type == BDF_PROPERTY_TYPE_INTEGER)
|
if (prop.type == BDF_PROPERTY_TYPE_INTEGER)
|
||||||
value = prop.u.integer;
|
value = prop.u.integer;
|
||||||
else
|
else
|
||||||
|
@ -1731,7 +1731,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
* Drop our reference to the charset
|
* Drop our reference to the charset
|
||||||
*/
|
*/
|
||||||
FcCharSetDestroy (cs);
|
FcCharSetDestroy (cs);
|
||||||
|
|
||||||
return pat;
|
return pat;
|
||||||
|
|
||||||
bail2:
|
bail2:
|
||||||
|
@ -1751,10 +1751,10 @@ FcFreeTypeQuery(const FcChar8 *file,
|
||||||
FT_Face face;
|
FT_Face face;
|
||||||
FT_Library ftLibrary;
|
FT_Library ftLibrary;
|
||||||
FcPattern *pat = NULL;
|
FcPattern *pat = NULL;
|
||||||
|
|
||||||
if (FT_Init_FreeType (&ftLibrary))
|
if (FT_Init_FreeType (&ftLibrary))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (FT_New_Face (ftLibrary, (char *) file, id, &face))
|
if (FT_New_Face (ftLibrary, (char *) file, id, &face))
|
||||||
goto bail;
|
goto bail;
|
||||||
|
|
||||||
|
@ -2226,7 +2226,7 @@ static const FcCharMap AdobeSymbol = {
|
||||||
AdobeSymbolEnt,
|
AdobeSymbolEnt,
|
||||||
sizeof (AdobeSymbolEnt) / sizeof (AdobeSymbolEnt[0]),
|
sizeof (AdobeSymbolEnt) / sizeof (AdobeSymbolEnt[0]),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const FcFontDecode fcFontDecoders[] = {
|
static const FcFontDecode fcFontDecoders[] = {
|
||||||
{ ft_encoding_unicode, 0, (1 << 21) - 1 },
|
{ ft_encoding_unicode, 0, (1 << 21) - 1 },
|
||||||
{ ft_encoding_symbol, &AdobeSymbol, (1 << 16) - 1 },
|
{ ft_encoding_symbol, &AdobeSymbol, (1 << 16) - 1 },
|
||||||
|
@ -2311,7 +2311,7 @@ static FcBool
|
||||||
FcFreeTypeUseNames (FT_Face face)
|
FcFreeTypeUseNames (FT_Face face)
|
||||||
{
|
{
|
||||||
FT_Int map;
|
FT_Int map;
|
||||||
|
|
||||||
if (!FT_Has_PS_Glyph_Names (face))
|
if (!FT_Has_PS_Glyph_Names (face))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
for (map = 0; map < face->num_charmaps; map++)
|
for (map = 0; map < face->num_charmaps; map++)
|
||||||
|
@ -2331,7 +2331,7 @@ FcUcs4ToGlyphName (FcChar32 ucs4)
|
||||||
{
|
{
|
||||||
if (_fc_glyph_names[gn].ucs == ucs4)
|
if (_fc_glyph_names[gn].ucs == ucs4)
|
||||||
return _fc_glyph_names[gn].name;
|
return _fc_glyph_names[gn].name;
|
||||||
if (!r)
|
if (!r)
|
||||||
{
|
{
|
||||||
r = (int) (ucs4 % FC_GLYPHNAME_REHASH);
|
r = (int) (ucs4 % FC_GLYPHNAME_REHASH);
|
||||||
if (!r)
|
if (!r)
|
||||||
|
@ -2356,7 +2356,7 @@ FcGlyphNameToUcs4 (FcChar8 *name)
|
||||||
{
|
{
|
||||||
if (!strcmp ((char *) name, (char *) _fc_glyph_names[gn].name))
|
if (!strcmp ((char *) name, (char *) _fc_glyph_names[gn].name))
|
||||||
return _fc_glyph_names[gn].ucs;
|
return _fc_glyph_names[gn].ucs;
|
||||||
if (!r)
|
if (!r)
|
||||||
{
|
{
|
||||||
r = (int) (h % FC_GLYPHNAME_REHASH);
|
r = (int) (h % FC_GLYPHNAME_REHASH);
|
||||||
if (!r)
|
if (!r)
|
||||||
|
@ -2479,14 +2479,14 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4)
|
||||||
}
|
}
|
||||||
|
|
||||||
static FcBool
|
static FcBool
|
||||||
FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4,
|
FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4,
|
||||||
FT_UInt glyph, FcBlanks *blanks,
|
FT_UInt glyph, FcBlanks *blanks,
|
||||||
FT_Pos *advance,
|
FT_Pos *advance,
|
||||||
FcBool using_strike)
|
FcBool using_strike)
|
||||||
{
|
{
|
||||||
FT_Int load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
|
FT_Int load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
|
||||||
FT_GlyphSlot slot;
|
FT_GlyphSlot slot;
|
||||||
|
|
||||||
if (using_strike)
|
if (using_strike)
|
||||||
load_flags &= ~FT_LOAD_NO_SCALE;
|
load_flags &= ~FT_LOAD_NO_SCALE;
|
||||||
|
|
||||||
|
@ -2499,14 +2499,14 @@ FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4,
|
||||||
*/
|
*/
|
||||||
if (face->face_flags & FT_FACE_FLAG_SCALABLE)
|
if (face->face_flags & FT_FACE_FLAG_SCALABLE)
|
||||||
load_flags |= FT_LOAD_NO_BITMAP;
|
load_flags |= FT_LOAD_NO_BITMAP;
|
||||||
|
|
||||||
if (FT_Load_Glyph (face, glyph, load_flags))
|
if (FT_Load_Glyph (face, glyph, load_flags))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
||||||
slot = face->glyph;
|
slot = face->glyph;
|
||||||
if (!glyph)
|
if (!glyph)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
||||||
*advance = slot->metrics.horiAdvance;
|
*advance = slot->metrics.horiAdvance;
|
||||||
|
|
||||||
switch (slot->format) {
|
switch (slot->format) {
|
||||||
|
@ -2560,7 +2560,7 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing
|
||||||
fcs = FcCharSetCreate ();
|
fcs = FcCharSetCreate ();
|
||||||
if (!fcs)
|
if (!fcs)
|
||||||
goto bail0;
|
goto bail0;
|
||||||
|
|
||||||
#if HAVE_FT_SELECT_SIZE
|
#if HAVE_FT_SELECT_SIZE
|
||||||
if (strike_index >= 0) {
|
if (strike_index >= 0) {
|
||||||
if (FT_Select_Size (face, strike_index) != FT_Err_Ok)
|
if (FT_Select_Size (face, strike_index) != FT_Err_Ok)
|
||||||
|
@ -2587,10 +2587,10 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing
|
||||||
{
|
{
|
||||||
ucs4 = map->ent[i].bmp;
|
ucs4 = map->ent[i].bmp;
|
||||||
glyph = FT_Get_Char_Index (face, map->ent[i].encode);
|
glyph = FT_Get_Char_Index (face, map->ent[i].encode);
|
||||||
if (glyph &&
|
if (glyph &&
|
||||||
FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike))
|
FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* ignore glyphs with zero advance. They’re
|
* ignore glyphs with zero advance. They’re
|
||||||
* combining characters, and while their behaviour
|
* combining characters, and while their behaviour
|
||||||
* isn’t well defined for monospaced applications in
|
* isn’t well defined for monospaced applications in
|
||||||
|
@ -2702,7 +2702,7 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing
|
||||||
if (FT_Get_Glyph_Name (face, glyph, name_buf, FC_GLYPHNAME_BUFLEN+1) == 0)
|
if (FT_Get_Glyph_Name (face, glyph, name_buf, FC_GLYPHNAME_BUFLEN+1) == 0)
|
||||||
{
|
{
|
||||||
ucs4 = FcGlyphNameToUcs4 (name_buf);
|
ucs4 = FcGlyphNameToUcs4 (name_buf);
|
||||||
if (ucs4 != 0xffff &&
|
if (ucs4 != 0xffff &&
|
||||||
FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike))
|
FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike))
|
||||||
{
|
{
|
||||||
if (advance)
|
if (advance)
|
||||||
|
@ -2772,13 +2772,13 @@ FcCharSet *
|
||||||
FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing)
|
FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing)
|
||||||
{
|
{
|
||||||
FcCharSet *cs;
|
FcCharSet *cs;
|
||||||
|
|
||||||
cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, -1);
|
cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, -1);
|
||||||
/*
|
/*
|
||||||
* Check for bitmap-only ttf fonts that are missing the glyf table.
|
* Check for bitmap-only ttf fonts that are missing the glyf table.
|
||||||
* In that case, pick a size and look for glyphs in that size instead
|
* In that case, pick a size and look for glyphs in that size instead
|
||||||
*/
|
*/
|
||||||
if (FcCharSetCount (cs) == 0)
|
if (FcCharSetCount (cs) == 0)
|
||||||
{
|
{
|
||||||
/* Check for non-scalable TT fonts */
|
/* Check for non-scalable TT fonts */
|
||||||
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE) &&
|
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE) &&
|
||||||
|
@ -2790,7 +2790,7 @@ FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing)
|
||||||
|
|
||||||
/* Select the face closest to 16 pixels tall */
|
/* Select the face closest to 16 pixels tall */
|
||||||
for (i = 1; i < face->num_fixed_sizes; i++) {
|
for (i = 1; i < face->num_fixed_sizes; i++) {
|
||||||
if (abs (face->available_sizes[i].height - 16) <
|
if (abs (face->available_sizes[i].height - 16) <
|
||||||
abs (face->available_sizes[strike_index].height - 16))
|
abs (face->available_sizes[strike_index].height - 16))
|
||||||
strike_index = i;
|
strike_index = i;
|
||||||
}
|
}
|
||||||
|
@ -2826,7 +2826,7 @@ FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks)
|
||||||
*/
|
*/
|
||||||
#define FcIsSpace(x) (040 == (x))
|
#define FcIsSpace(x) (040 == (x))
|
||||||
#define FcIsValidScript(x) (FcIsLower(x) || FcIsUpper (x) || FcIsSpace(x))
|
#define FcIsValidScript(x) (FcIsLower(x) || FcIsUpper (x) || FcIsSpace(x))
|
||||||
|
|
||||||
static void
|
static void
|
||||||
addtag(FcChar8 *complex_, FT_ULong tag)
|
addtag(FcChar8 *complex_, FT_ULong tag)
|
||||||
{
|
{
|
||||||
|
@ -2837,7 +2837,7 @@ addtag(FcChar8 *complex_, FT_ULong tag)
|
||||||
tagstring[2] = (FcChar8)(tag >> 8),
|
tagstring[2] = (FcChar8)(tag >> 8),
|
||||||
tagstring[3] = (FcChar8)(tag);
|
tagstring[3] = (FcChar8)(tag);
|
||||||
tagstring[4] = '\0';
|
tagstring[4] = '\0';
|
||||||
|
|
||||||
/* skip tags which aren't alphabetic, under the assumption that
|
/* skip tags which aren't alphabetic, under the assumption that
|
||||||
* they're probably broken
|
* they're probably broken
|
||||||
*/
|
*/
|
||||||
|
@ -2965,7 +2965,7 @@ FcFontCapabilities(FT_Face face)
|
||||||
if (!issilgraphitefont && !gsub_count && !gpos_count)
|
if (!issilgraphitefont && !gsub_count && !gpos_count)
|
||||||
goto bail;
|
goto bail;
|
||||||
|
|
||||||
maxsize = (((FT_ULong) gpos_count + (FT_ULong) gsub_count) * OTLAYOUT_LEN +
|
maxsize = (((FT_ULong) gpos_count + (FT_ULong) gsub_count) * OTLAYOUT_LEN +
|
||||||
(issilgraphitefont ? 13 : 0));
|
(issilgraphitefont ? 13 : 0));
|
||||||
complex_ = malloc (sizeof (FcChar8) * maxsize);
|
complex_ = malloc (sizeof (FcChar8) * maxsize);
|
||||||
if (!complex_)
|
if (!complex_)
|
||||||
|
|
|
@ -61,7 +61,7 @@ FcFontSetAdd (FcFontSet *s, FcPattern *font)
|
||||||
{
|
{
|
||||||
FcPattern **f;
|
FcPattern **f;
|
||||||
int sfont;
|
int sfont;
|
||||||
|
|
||||||
if (s->nfont == s->sfont)
|
if (s->nfont == s->sfont)
|
||||||
{
|
{
|
||||||
sfont = s->sfont + 32;
|
sfont = s->sfont + 32;
|
||||||
|
@ -85,7 +85,7 @@ FcBool
|
||||||
FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s)
|
FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!FcSerializeAlloc (serialize, s, sizeof (FcFontSet)))
|
if (!FcSerializeAlloc (serialize, s, sizeof (FcFontSet)))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
if (!FcSerializeAlloc (serialize, s->fonts, s->nfont * sizeof (FcPattern *)))
|
if (!FcSerializeAlloc (serialize, s->fonts, s->nfont * sizeof (FcPattern *)))
|
||||||
|
@ -111,7 +111,7 @@ FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s)
|
||||||
return NULL;
|
return NULL;
|
||||||
*s_serialize = *s;
|
*s_serialize = *s;
|
||||||
s_serialize->sfont = s_serialize->nfont;
|
s_serialize->sfont = s_serialize->nfont;
|
||||||
|
|
||||||
fonts_serialize = FcSerializePtr (serialize, s->fonts);
|
fonts_serialize = FcSerializePtr (serialize, s->fonts);
|
||||||
if (!fonts_serialize)
|
if (!fonts_serialize)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -50,5 +50,5 @@ FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map);
|
||||||
|
|
||||||
FcPrivate const FcCharMap *
|
FcPrivate const FcCharMap *
|
||||||
FcFreeTypeGetPrivateMap (FT_Encoding encoding);
|
FcFreeTypeGetPrivateMap (FT_Encoding encoding);
|
||||||
|
|
||||||
#endif /* _FCFTINT_H_ */
|
#endif /* _FCFTINT_H_ */
|
||||||
|
|
|
@ -58,18 +58,18 @@ FcConfig *
|
||||||
FcInitLoadConfig (void)
|
FcInitLoadConfig (void)
|
||||||
{
|
{
|
||||||
FcConfig *config;
|
FcConfig *config;
|
||||||
|
|
||||||
FcInitDebug ();
|
FcInitDebug ();
|
||||||
config = FcConfigCreate ();
|
config = FcConfigCreate ();
|
||||||
if (!config)
|
if (!config)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
||||||
if (!FcConfigParseAndLoad (config, 0, FcTrue))
|
if (!FcConfigParseAndLoad (config, 0, FcTrue))
|
||||||
{
|
{
|
||||||
FcConfigDestroy (config);
|
FcConfigDestroy (config);
|
||||||
return FcInitFallbackConfig ();
|
return FcInitFallbackConfig ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config->cacheDirs && config->cacheDirs->num == 0)
|
if (config->cacheDirs && config->cacheDirs->num == 0)
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
|
|
42
src/fcint.h
42
src/fcint.h
|
@ -130,7 +130,7 @@ typedef enum _FcValueBinding {
|
||||||
* Serialized data structures use only offsets instead of pointers
|
* Serialized data structures use only offsets instead of pointers
|
||||||
* A low bit of 1 indicates an offset.
|
* A low bit of 1 indicates an offset.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Is the provided pointer actually an offset? */
|
/* Is the provided pointer actually an offset? */
|
||||||
#define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
|
#define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
|
||||||
|
|
||||||
|
@ -181,13 +181,13 @@ typedef struct _FcValueList {
|
||||||
} FcValueList;
|
} FcValueList;
|
||||||
|
|
||||||
#define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
|
#define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
|
||||||
|
|
||||||
typedef int FcObject;
|
typedef int FcObject;
|
||||||
|
|
||||||
typedef struct _FcPatternElt *FcPatternEltPtr;
|
typedef struct _FcPatternElt *FcPatternEltPtr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pattern elts are stuck in a structure connected to the pattern,
|
* Pattern elts are stuck in a structure connected to the pattern,
|
||||||
* so they get moved around when the pattern is resized. Hence, the
|
* so they get moved around when the pattern is resized. Hence, the
|
||||||
* values field must be a pointer/offset instead of just an offset
|
* values field must be a pointer/offset instead of just an offset
|
||||||
*/
|
*/
|
||||||
|
@ -216,13 +216,13 @@ struct _FcPattern {
|
||||||
fs->fonts[i])
|
fs->fonts[i])
|
||||||
|
|
||||||
typedef enum _FcOp {
|
typedef enum _FcOp {
|
||||||
FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet,
|
FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet,
|
||||||
FcOpNil,
|
FcOpNil,
|
||||||
FcOpField, FcOpConst,
|
FcOpField, FcOpConst,
|
||||||
FcOpAssign, FcOpAssignReplace,
|
FcOpAssign, FcOpAssignReplace,
|
||||||
FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
|
FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
|
||||||
FcOpQuest,
|
FcOpQuest,
|
||||||
FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
|
FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
|
||||||
FcOpContains, FcOpListing, FcOpNotContains,
|
FcOpContains, FcOpListing, FcOpNotContains,
|
||||||
FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
|
FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
|
||||||
FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
|
FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
|
||||||
|
@ -373,7 +373,7 @@ typedef struct _FcSerialize {
|
||||||
void *linear;
|
void *linear;
|
||||||
FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
|
FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
|
||||||
} FcSerialize;
|
} FcSerialize;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To map adobe glyph names to unicode values, a precomputed hash
|
* To map adobe glyph names to unicode values, a precomputed hash
|
||||||
* table is used
|
* table is used
|
||||||
|
@ -387,14 +387,14 @@ typedef struct _FcGlyphName {
|
||||||
/*
|
/*
|
||||||
* To perform case-insensitive string comparisons, a table
|
* To perform case-insensitive string comparisons, a table
|
||||||
* is used which holds three different kinds of folding data.
|
* is used which holds three different kinds of folding data.
|
||||||
*
|
*
|
||||||
* The first is a range of upper case values mapping to a range
|
* The first is a range of upper case values mapping to a range
|
||||||
* of their lower case equivalents. Within each range, the offset
|
* of their lower case equivalents. Within each range, the offset
|
||||||
* between upper and lower case is constant.
|
* between upper and lower case is constant.
|
||||||
*
|
*
|
||||||
* The second is a range of upper case values which are interleaved
|
* The second is a range of upper case values which are interleaved
|
||||||
* with their lower case equivalents.
|
* with their lower case equivalents.
|
||||||
*
|
*
|
||||||
* The third is a set of raw unicode values mapping to a list
|
* The third is a set of raw unicode values mapping to a list
|
||||||
* of unicode values for comparison purposes. This allows conversion
|
* of unicode values for comparison purposes. This allows conversion
|
||||||
* of ß to "ss" so that SS, ss and ß all match. A separate array
|
* of ß to "ss" so that SS, ss and ß all match. A separate array
|
||||||
|
@ -448,7 +448,7 @@ struct _FcConfig {
|
||||||
FcBlanks *blanks;
|
FcBlanks *blanks;
|
||||||
/*
|
/*
|
||||||
* List of directories containing fonts,
|
* List of directories containing fonts,
|
||||||
* built by recursively scanning the set
|
* built by recursively scanning the set
|
||||||
* of configured directories
|
* of configured directories
|
||||||
*/
|
*/
|
||||||
FcStrSet *fontDirs;
|
FcStrSet *fontDirs;
|
||||||
|
@ -497,7 +497,7 @@ struct _FcConfig {
|
||||||
|
|
||||||
FcExprPage *expr_pool; /* pool of FcExpr's */
|
FcExprPage *expr_pool; /* pool of FcExpr's */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern FcPrivate FcConfig *_fcConfig;
|
extern FcPrivate FcConfig *_fcConfig;
|
||||||
|
|
||||||
typedef struct _FcFileTime {
|
typedef struct _FcFileTime {
|
||||||
|
@ -519,7 +519,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
|
||||||
|
|
||||||
FcPrivate FcBool
|
FcPrivate FcBool
|
||||||
FcDirCacheWrite (FcCache *cache, FcConfig *config);
|
FcDirCacheWrite (FcCache *cache, FcConfig *config);
|
||||||
|
|
||||||
FcPrivate void
|
FcPrivate void
|
||||||
FcCacheObjectReference (void *object);
|
FcCacheObjectReference (void *object);
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ FcCacheObjectDereference (void *object);
|
||||||
|
|
||||||
FcPrivate void
|
FcPrivate void
|
||||||
FcCacheFini (void);
|
FcCacheFini (void);
|
||||||
|
|
||||||
FcPrivate void
|
FcPrivate void
|
||||||
FcDirCacheReference (FcCache *cache, int nref);
|
FcDirCacheReference (FcCache *cache, int nref);
|
||||||
|
|
||||||
|
@ -606,13 +606,13 @@ FcPrivate FcFileTime
|
||||||
FcConfigModifiedTime (FcConfig *config);
|
FcConfigModifiedTime (FcConfig *config);
|
||||||
|
|
||||||
FcPrivate FcBool
|
FcPrivate FcBool
|
||||||
FcConfigAddCache (FcConfig *config, FcCache *cache,
|
FcConfigAddCache (FcConfig *config, FcCache *cache,
|
||||||
FcSetName set, FcStrSet *dirSet);
|
FcSetName set, FcStrSet *dirSet);
|
||||||
|
|
||||||
/* fcserialize.c */
|
/* fcserialize.c */
|
||||||
FcPrivate intptr_t
|
FcPrivate intptr_t
|
||||||
FcAlignSize (intptr_t size);
|
FcAlignSize (intptr_t size);
|
||||||
|
|
||||||
FcPrivate FcSerialize *
|
FcPrivate FcSerialize *
|
||||||
FcSerializeCreate (void);
|
FcSerializeCreate (void);
|
||||||
|
|
||||||
|
@ -702,7 +702,7 @@ FcSubstPrint (const FcSubst *subst);
|
||||||
|
|
||||||
FcPrivate void
|
FcPrivate void
|
||||||
FcCharSetPrint (const FcCharSet *c);
|
FcCharSetPrint (const FcCharSet *c);
|
||||||
|
|
||||||
extern FcPrivate int FcDebugVal;
|
extern FcPrivate int FcDebugVal;
|
||||||
|
|
||||||
#define FcDebug() (FcDebugVal)
|
#define FcDebug() (FcDebugVal)
|
||||||
|
@ -763,12 +763,12 @@ FcMemFree (int kind, int size);
|
||||||
|
|
||||||
/* fclang.c */
|
/* fclang.c */
|
||||||
FcPrivate FcLangSet *
|
FcPrivate FcLangSet *
|
||||||
FcFreeTypeLangSet (const FcCharSet *charset,
|
FcFreeTypeLangSet (const FcCharSet *charset,
|
||||||
const FcChar8 *exclusiveLang);
|
const FcChar8 *exclusiveLang);
|
||||||
|
|
||||||
FcPrivate FcLangResult
|
FcPrivate FcLangResult
|
||||||
FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
|
FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
|
||||||
|
|
||||||
FcPrivate FcLangSet *
|
FcPrivate FcLangSet *
|
||||||
FcLangSetPromote (const FcChar8 *lang);
|
FcLangSetPromote (const FcChar8 *lang);
|
||||||
|
|
||||||
|
@ -885,13 +885,13 @@ FcPatternObjectAddWithBinding (FcPattern *p,
|
||||||
|
|
||||||
FcPrivate FcBool
|
FcPrivate FcBool
|
||||||
FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
|
FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
|
||||||
|
|
||||||
FcPrivate FcBool
|
FcPrivate FcBool
|
||||||
FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
|
FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
|
||||||
|
|
||||||
FcPrivate FcResult
|
FcPrivate FcResult
|
||||||
FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
|
FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
|
||||||
|
|
||||||
FcPrivate FcBool
|
FcPrivate FcBool
|
||||||
FcPatternObjectDel (FcPattern *p, FcObject object);
|
FcPatternObjectDel (FcPattern *p, FcObject object);
|
||||||
|
|
||||||
|
|
28
src/fclang.c
28
src/fclang.c
|
@ -72,7 +72,7 @@ FcLangSetBitGet (const FcLangSet *ls,
|
||||||
}
|
}
|
||||||
|
|
||||||
FcLangSet *
|
FcLangSet *
|
||||||
FcFreeTypeLangSet (const FcCharSet *charset,
|
FcFreeTypeLangSet (const FcCharSet *charset,
|
||||||
const FcChar8 *exclusiveLang)
|
const FcChar8 *exclusiveLang)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -85,7 +85,7 @@ FcFreeTypeLangSet (const FcCharSet *charset,
|
||||||
ls = FcLangSetCreate ();
|
ls = FcLangSetCreate ();
|
||||||
if (!ls)
|
if (!ls)
|
||||||
return 0;
|
return 0;
|
||||||
if (FcDebug() & FC_DBG_LANGSET)
|
if (FcDebug() & FC_DBG_LANGSET)
|
||||||
{
|
{
|
||||||
printf ("font charset");
|
printf ("font charset");
|
||||||
FcCharSetPrint (charset);
|
FcCharSetPrint (charset);
|
||||||
|
@ -93,7 +93,7 @@ FcFreeTypeLangSet (const FcCharSet *charset,
|
||||||
}
|
}
|
||||||
for (i = 0; i < NUM_LANG_CHAR_SET; i++)
|
for (i = 0; i < NUM_LANG_CHAR_SET; i++)
|
||||||
{
|
{
|
||||||
if (FcDebug() & FC_DBG_LANGSET)
|
if (FcDebug() & FC_DBG_LANGSET)
|
||||||
{
|
{
|
||||||
printf ("%s charset", fcLangCharSets[i].lang);
|
printf ("%s charset", fcLangCharSets[i].lang);
|
||||||
FcCharSetPrint (&fcLangCharSets[i].charset);
|
FcCharSetPrint (&fcLangCharSets[i].charset);
|
||||||
|
@ -112,7 +112,7 @@ FcFreeTypeLangSet (const FcCharSet *charset,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (j = 0; j < fcLangCharSets[i].charset.num; j++)
|
for (j = 0; j < fcLangCharSets[i].charset.num; j++)
|
||||||
if (FcCharSetLeaf(&fcLangCharSets[i].charset, j) !=
|
if (FcCharSetLeaf(&fcLangCharSets[i].charset, j) !=
|
||||||
FcCharSetLeaf(exclusiveCharset, j))
|
FcCharSetLeaf(exclusiveCharset, j))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ FcFreeTypeLangSet (const FcCharSet *charset,
|
||||||
{
|
{
|
||||||
if (missing && missing < 10)
|
if (missing && missing < 10)
|
||||||
{
|
{
|
||||||
FcCharSet *missed = FcCharSetSubtract (&fcLangCharSets[i].charset,
|
FcCharSet *missed = FcCharSetSubtract (&fcLangCharSets[i].charset,
|
||||||
charset);
|
charset);
|
||||||
FcChar32 ucs4;
|
FcChar32 ucs4;
|
||||||
FcChar32 map[FC_CHARSET_MAP_SIZE];
|
FcChar32 map[FC_CHARSET_MAP_SIZE];
|
||||||
|
@ -154,8 +154,8 @@ FcFreeTypeLangSet (const FcCharSet *charset,
|
||||||
|
|
||||||
if (FcDebug() & FC_DBG_SCANV)
|
if (FcDebug() & FC_DBG_SCANV)
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
|
|
||||||
|
|
||||||
return ls;
|
return ls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ FcLangCompare (const FcChar8 *s1, const FcChar8 *s2)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return FcTrue when super contains sub.
|
* Return FcTrue when super contains sub.
|
||||||
*
|
*
|
||||||
* super contains sub if super and sub have the same
|
* super contains sub if super and sub have the same
|
||||||
* language and either the same country or one
|
* language and either the same country or one
|
||||||
|
@ -329,9 +329,9 @@ FcLangSetIndex (const FcChar8 *lang)
|
||||||
{
|
{
|
||||||
int low, high, mid = 0;
|
int low, high, mid = 0;
|
||||||
int cmp = 0;
|
int cmp = 0;
|
||||||
FcChar8 firstChar = FcToLower(lang[0]);
|
FcChar8 firstChar = FcToLower(lang[0]);
|
||||||
FcChar8 secondChar = firstChar ? FcToLower(lang[1]) : '\0';
|
FcChar8 secondChar = firstChar ? FcToLower(lang[1]) : '\0';
|
||||||
|
|
||||||
if (firstChar < 'a')
|
if (firstChar < 'a')
|
||||||
{
|
{
|
||||||
low = 0;
|
low = 0;
|
||||||
|
@ -360,11 +360,11 @@ FcLangSetIndex (const FcChar8 *lang)
|
||||||
{ /* fast path for resolving 2-letter languages (by far the most common) after
|
{ /* fast path for resolving 2-letter languages (by far the most common) after
|
||||||
* finding the first char (probably already true because of the hash table) */
|
* finding the first char (probably already true because of the hash table) */
|
||||||
cmp = fcLangCharSets[mid].lang[1] - secondChar;
|
cmp = fcLangCharSets[mid].lang[1] - secondChar;
|
||||||
if (cmp == 0 &&
|
if (cmp == 0 &&
|
||||||
(fcLangCharSets[mid].lang[2] != '\0' ||
|
(fcLangCharSets[mid].lang[2] != '\0' ||
|
||||||
lang[2] != '\0'))
|
lang[2] != '\0'))
|
||||||
{
|
{
|
||||||
cmp = FcStrCmpIgnoreCase(fcLangCharSets[mid].lang+2,
|
cmp = FcStrCmpIgnoreCase(fcLangCharSets[mid].lang+2,
|
||||||
lang+2);
|
lang+2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -727,7 +727,7 @@ FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb)
|
||||||
if (missing)
|
if (missing)
|
||||||
{
|
{
|
||||||
for (j = 0; j < 32; j++)
|
for (j = 0; j < 32; j++)
|
||||||
if (missing & (1 << j))
|
if (missing & (1 << j))
|
||||||
{
|
{
|
||||||
if (!FcLangSetContainsLang (lsa,
|
if (!FcLangSetContainsLang (lsa,
|
||||||
fcLangCharSets[fcLangCharSetIndicesInv[i*32 + j]].lang))
|
fcLangCharSets[fcLangCharSetIndicesInv[i*32 + j]].lang))
|
||||||
|
|
30
src/fclist.c
30
src/fclist.c
|
@ -46,7 +46,7 @@ FcObjectSetAdd (FcObjectSet *os, const char *object)
|
||||||
int s;
|
int s;
|
||||||
const char **objects;
|
const char **objects;
|
||||||
int high, low, mid, c;
|
int high, low, mid, c;
|
||||||
|
|
||||||
if (os->nobject == os->sobject)
|
if (os->nobject == os->sobject)
|
||||||
{
|
{
|
||||||
s = os->sobject + 4;
|
s = os->sobject + 4;
|
||||||
|
@ -81,7 +81,7 @@ FcObjectSetAdd (FcObjectSet *os, const char *object)
|
||||||
}
|
}
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
mid++;
|
mid++;
|
||||||
memmove (os->objects + mid + 1, os->objects + mid,
|
memmove (os->objects + mid + 1, os->objects + mid,
|
||||||
(os->nobject - mid) * sizeof (const char *));
|
(os->nobject - mid) * sizeof (const char *));
|
||||||
os->objects[mid] = object;
|
os->objects[mid] = object;
|
||||||
os->nobject++;
|
os->nobject++;
|
||||||
|
@ -140,8 +140,8 @@ FcListValueListMatchAny (FcValueListPtr patOrig, /* pattern */
|
||||||
* where it requires an exact match)
|
* where it requires an exact match)
|
||||||
*/
|
*/
|
||||||
if (FcConfigCompareValue (&fnt->value,
|
if (FcConfigCompareValue (&fnt->value,
|
||||||
FcOpListing,
|
FcOpListing,
|
||||||
&pat->value))
|
&pat->value))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (fnt == NULL)
|
if (fnt == NULL)
|
||||||
|
@ -226,8 +226,8 @@ FcListPatternMatchAny (const FcPattern *p,
|
||||||
static FcChar32
|
static FcChar32
|
||||||
FcListMatrixHash (const FcMatrix *m)
|
FcListMatrixHash (const FcMatrix *m)
|
||||||
{
|
{
|
||||||
int xx = (int) (m->xx * 100),
|
int xx = (int) (m->xx * 100),
|
||||||
xy = (int) (m->xy * 100),
|
xy = (int) (m->xy * 100),
|
||||||
yx = (int) (m->yx * 100),
|
yx = (int) (m->yx * 100),
|
||||||
yy = (int) (m->yy * 100);
|
yy = (int) (m->yy * 100);
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ static FcChar32
|
||||||
FcListValueListHash (FcValueListPtr list)
|
FcListValueListHash (FcValueListPtr list)
|
||||||
{
|
{
|
||||||
FcChar32 h = 0;
|
FcChar32 h = 0;
|
||||||
|
|
||||||
while (list != NULL)
|
while (list != NULL)
|
||||||
{
|
{
|
||||||
h = h ^ FcListValueHash (&list->value);
|
h = h ^ FcListValueHash (&list->value);
|
||||||
|
@ -303,7 +303,7 @@ typedef struct _FcListHashTable {
|
||||||
int entries;
|
int entries;
|
||||||
FcListBucket *buckets[FC_LIST_HASH_SIZE];
|
FcListBucket *buckets[FC_LIST_HASH_SIZE];
|
||||||
} FcListHashTable;
|
} FcListHashTable;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FcListHashTableInit (FcListHashTable *table)
|
FcListHashTableInit (FcListHashTable *table)
|
||||||
{
|
{
|
||||||
|
@ -382,7 +382,7 @@ FcListAppend (FcListHashTable *table,
|
||||||
for (prev = &table->buckets[hash % FC_LIST_HASH_SIZE];
|
for (prev = &table->buckets[hash % FC_LIST_HASH_SIZE];
|
||||||
(bucket = *prev); prev = &(bucket->next))
|
(bucket = *prev); prev = &(bucket->next))
|
||||||
{
|
{
|
||||||
if (bucket->hash == hash &&
|
if (bucket->hash == hash &&
|
||||||
FcListPatternEqual (bucket->pattern, font, os))
|
FcListPatternEqual (bucket->pattern, font, os))
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
}
|
}
|
||||||
|
@ -395,7 +395,7 @@ FcListAppend (FcListHashTable *table,
|
||||||
bucket->pattern = FcPatternCreate ();
|
bucket->pattern = FcPatternCreate ();
|
||||||
if (!bucket->pattern)
|
if (!bucket->pattern)
|
||||||
goto bail1;
|
goto bail1;
|
||||||
|
|
||||||
for (o = 0; o < os->nobject; o++)
|
for (o = 0; o < os->nobject; o++)
|
||||||
{
|
{
|
||||||
if (!strcmp (os->objects[o], FC_FAMILY) || !strcmp (os->objects[o], FC_FAMILYLANG))
|
if (!strcmp (os->objects[o], FC_FAMILY) || !strcmp (os->objects[o], FC_FAMILYLANG))
|
||||||
|
@ -425,8 +425,8 @@ FcListAppend (FcListHashTable *table,
|
||||||
for (v = FcPatternEltValues(e), idx = 0; v;
|
for (v = FcPatternEltValues(e), idx = 0; v;
|
||||||
v = FcValueListNext(v), ++idx)
|
v = FcValueListNext(v), ++idx)
|
||||||
{
|
{
|
||||||
if (!FcPatternAdd (bucket->pattern,
|
if (!FcPatternAdd (bucket->pattern,
|
||||||
os->objects[o],
|
os->objects[o],
|
||||||
FcValueCanonicalize(&v->value), defidx != idx))
|
FcValueCanonicalize(&v->value), defidx != idx))
|
||||||
goto bail2;
|
goto bail2;
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ FcListAppend (FcListHashTable *table,
|
||||||
++table->entries;
|
++table->entries;
|
||||||
|
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
|
|
||||||
bail2:
|
bail2:
|
||||||
FcPatternDestroy (bucket->pattern);
|
FcPatternDestroy (bucket->pattern);
|
||||||
bail1:
|
bail1:
|
||||||
|
@ -515,7 +515,7 @@ FcFontSetList (FcConfig *config,
|
||||||
full++;
|
full++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf ("used: %d max: %d avg: %g\n", full, max,
|
printf ("used: %d max: %d avg: %g\n", full, max,
|
||||||
(double) ents / FC_LIST_HASH_SIZE);
|
(double) ents / FC_LIST_HASH_SIZE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -535,7 +535,7 @@ FcFontSetList (FcConfig *config,
|
||||||
FcMemFree (FC_MEM_LISTBUCK, sizeof (FcListBucket));
|
FcMemFree (FC_MEM_LISTBUCK, sizeof (FcListBucket));
|
||||||
free (bucket);
|
free (bucket);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
bail2:
|
bail2:
|
||||||
|
|
|
@ -31,7 +31,7 @@ static double
|
||||||
FcCompareNumber (FcValue *value1, FcValue *value2)
|
FcCompareNumber (FcValue *value1, FcValue *value2)
|
||||||
{
|
{
|
||||||
double v1, v2, v;
|
double v1, v2, v;
|
||||||
|
|
||||||
switch (value1->type) {
|
switch (value1->type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v1 = (double) value1->u.i;
|
v1 = (double) value1->u.i;
|
||||||
|
@ -84,7 +84,7 @@ FcCompareLang (FcValue *v1, FcValue *v2)
|
||||||
{
|
{
|
||||||
FcLangResult result;
|
FcLangResult result;
|
||||||
FcValue value1 = FcValueCanonicalize(v1), value2 = FcValueCanonicalize(v2);
|
FcValue value1 = FcValueCanonicalize(v1), value2 = FcValueCanonicalize(v2);
|
||||||
|
|
||||||
switch (value1.type) {
|
switch (value1.type) {
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
switch (value2.type) {
|
switch (value2.type) {
|
||||||
|
@ -92,7 +92,7 @@ FcCompareLang (FcValue *v1, FcValue *v2)
|
||||||
result = FcLangSetCompare (value1.u.l, value2.u.l);
|
result = FcLangSetCompare (value1.u.l, value2.u.l);
|
||||||
break;
|
break;
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
result = FcLangSetHasLang (value1.u.l,
|
result = FcLangSetHasLang (value1.u.l,
|
||||||
value2.u.s);
|
value2.u.s);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -105,7 +105,7 @@ FcCompareLang (FcValue *v1, FcValue *v2)
|
||||||
result = FcLangSetHasLang (value2.u.l, value1.u.s);
|
result = FcLangSetHasLang (value2.u.l, value1.u.s);
|
||||||
break;
|
break;
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
result = FcLangCompare (value1.u.s,
|
result = FcLangCompare (value1.u.s,
|
||||||
value2.u.s);
|
value2.u.s);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -354,10 +354,10 @@ FcCompare (FcPattern *pat,
|
||||||
FcResult *result)
|
FcResult *result)
|
||||||
{
|
{
|
||||||
int i, i1, i2;
|
int i, i1, i2;
|
||||||
|
|
||||||
for (i = 0; i < NUM_MATCH_VALUES; i++)
|
for (i = 0; i < NUM_MATCH_VALUES; i++)
|
||||||
value[i] = 0.0;
|
value[i] = 0.0;
|
||||||
|
|
||||||
i1 = 0;
|
i1 = 0;
|
||||||
i2 = 0;
|
i2 = 0;
|
||||||
while (i1 < pat->num && i2 < fnt->num)
|
while (i1 < pat->num && i2 < fnt->num)
|
||||||
|
@ -394,7 +394,7 @@ FcFontRenderPrepare (FcConfig *config,
|
||||||
FcPatternElt *fe, *pe;
|
FcPatternElt *fe, *pe;
|
||||||
FcValue v;
|
FcValue v;
|
||||||
FcResult result;
|
FcResult result;
|
||||||
|
|
||||||
new = FcPatternCreate ();
|
new = FcPatternCreate ();
|
||||||
if (!new)
|
if (!new)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -404,7 +404,7 @@ FcFontRenderPrepare (FcConfig *config,
|
||||||
pe = FcPatternObjectFindElt (pat, fe->object);
|
pe = FcPatternObjectFindElt (pat, fe->object);
|
||||||
if (pe)
|
if (pe)
|
||||||
{
|
{
|
||||||
if (!FcCompareValueList (pe->object, FcPatternEltValues(pe),
|
if (!FcCompareValueList (pe->object, FcPatternEltValues(pe),
|
||||||
FcPatternEltValues(fe), &v, 0, &result))
|
FcPatternEltValues(fe), &v, 0, &result))
|
||||||
{
|
{
|
||||||
FcPatternDestroy (new);
|
FcPatternDestroy (new);
|
||||||
|
@ -529,7 +529,7 @@ FcFontSetMatch (FcConfig *config,
|
||||||
|
|
||||||
FcPattern *
|
FcPattern *
|
||||||
FcFontMatch (FcConfig *config,
|
FcFontMatch (FcConfig *config,
|
||||||
FcPattern *p,
|
FcPattern *p,
|
||||||
FcResult *result)
|
FcResult *result)
|
||||||
{
|
{
|
||||||
FcFontSet *sets[2];
|
FcFontSet *sets[2];
|
||||||
|
@ -687,21 +687,21 @@ FcFontSetSort (FcConfig *config,
|
||||||
}
|
}
|
||||||
if (!nnodes)
|
if (!nnodes)
|
||||||
goto bail0;
|
goto bail0;
|
||||||
|
|
||||||
for (nPatternLang = 0;
|
for (nPatternLang = 0;
|
||||||
FcPatternGet (p, FC_LANG, nPatternLang, &patternLang) == FcResultMatch;
|
FcPatternGet (p, FC_LANG, nPatternLang, &patternLang) == FcResultMatch;
|
||||||
nPatternLang++)
|
nPatternLang++)
|
||||||
;
|
;
|
||||||
|
|
||||||
/* freed below */
|
/* freed below */
|
||||||
nodes = malloc (nnodes * sizeof (FcSortNode) +
|
nodes = malloc (nnodes * sizeof (FcSortNode) +
|
||||||
nnodes * sizeof (FcSortNode *) +
|
nnodes * sizeof (FcSortNode *) +
|
||||||
nPatternLang * sizeof (FcBool));
|
nPatternLang * sizeof (FcBool));
|
||||||
if (!nodes)
|
if (!nodes)
|
||||||
goto bail0;
|
goto bail0;
|
||||||
nodeps = (FcSortNode **) (nodes + nnodes);
|
nodeps = (FcSortNode **) (nodes + nnodes);
|
||||||
patternLangSat = (FcBool *) (nodeps + nnodes);
|
patternLangSat = (FcBool *) (nodeps + nnodes);
|
||||||
|
|
||||||
new = nodes;
|
new = nodes;
|
||||||
nodep = nodeps;
|
nodep = nodeps;
|
||||||
for (set = 0; set < nsets; set++)
|
for (set = 0; set < nsets; set++)
|
||||||
|
@ -735,13 +735,13 @@ FcFontSetSort (FcConfig *config,
|
||||||
}
|
}
|
||||||
|
|
||||||
nnodes = new - nodes;
|
nnodes = new - nodes;
|
||||||
|
|
||||||
qsort (nodeps, nnodes, sizeof (FcSortNode *),
|
qsort (nodeps, nnodes, sizeof (FcSortNode *),
|
||||||
FcSortCompare);
|
FcSortCompare);
|
||||||
|
|
||||||
for (i = 0; i < nPatternLang; i++)
|
for (i = 0; i < nPatternLang; i++)
|
||||||
patternLangSat[i] = FcFalse;
|
patternLangSat[i] = FcFalse;
|
||||||
|
|
||||||
for (f = 0; f < nnodes; f++)
|
for (f = 0; f < nnodes; f++)
|
||||||
{
|
{
|
||||||
FcBool satisfies = FcFalse;
|
FcBool satisfies = FcFalse;
|
||||||
|
@ -814,7 +814,7 @@ bail0:
|
||||||
|
|
||||||
FcFontSet *
|
FcFontSet *
|
||||||
FcFontSort (FcConfig *config,
|
FcFontSort (FcConfig *config,
|
||||||
FcPattern *p,
|
FcPattern *p,
|
||||||
FcBool trim,
|
FcBool trim,
|
||||||
FcCharSet **csp,
|
FcCharSet **csp,
|
||||||
FcResult *result)
|
FcResult *result)
|
||||||
|
|
|
@ -30,10 +30,10 @@
|
||||||
const FcMatrix FcIdentityMatrix = { 1, 0, 0, 1 };
|
const FcMatrix FcIdentityMatrix = { 1, 0, 0, 1 };
|
||||||
|
|
||||||
FcMatrix *
|
FcMatrix *
|
||||||
FcMatrixCopy (const FcMatrix *mat)
|
FcMatrixCopy (const FcMatrix *mat)
|
||||||
{
|
{
|
||||||
FcMatrix *r;
|
FcMatrix *r;
|
||||||
if(!mat)
|
if(!mat)
|
||||||
return 0;
|
return 0;
|
||||||
r = (FcMatrix *) malloc (sizeof (*r) );
|
r = (FcMatrix *) malloc (sizeof (*r) );
|
||||||
if (!r)
|
if (!r)
|
||||||
|
@ -58,7 +58,7 @@ FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2)
|
||||||
{
|
{
|
||||||
if(mat1 == mat2) return FcTrue;
|
if(mat1 == mat2) return FcTrue;
|
||||||
if(mat1 == 0 || mat2 == 0) return FcFalse;
|
if(mat1 == 0 || mat2 == 0) return FcFalse;
|
||||||
return mat1->xx == mat2->xx &&
|
return mat1->xx == mat2->xx &&
|
||||||
mat1->xy == mat2->xy &&
|
mat1->xy == mat2->xy &&
|
||||||
mat1->yx == mat2->yx &&
|
mat1->yx == mat2->yx &&
|
||||||
mat1->yy == mat2->yy;
|
mat1->yy == mat2->yy;
|
||||||
|
|
28
src/fcname.c
28
src/fcname.c
|
@ -28,9 +28,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Please do not change this list, it is used to initialize the object
|
* Please do not change this list, it is used to initialize the object
|
||||||
* list in this order to match the FC_foo_OBJECT constants. Those
|
* list in this order to match the FC_foo_OBJECT constants. Those
|
||||||
* constants are written into cache files.
|
* constants are written into cache files.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ FcObjectFindByName (const char *object, FcBool insert)
|
||||||
* Hook it into the hash chain
|
* Hook it into the hash chain
|
||||||
*/
|
*/
|
||||||
b = malloc (sizeof(FcObjectBucket));
|
b = malloc (sizeof(FcObjectBucket));
|
||||||
if (!b)
|
if (!b)
|
||||||
return NULL;
|
return NULL;
|
||||||
object = (const char *) FcStrCopy ((FcChar8 *) object);
|
object = (const char *) FcStrCopy ((FcChar8 *) object);
|
||||||
if (!object) {
|
if (!object) {
|
||||||
|
@ -212,7 +212,7 @@ FcObjectHashInsert (const FcObjectType *object, FcBool copy)
|
||||||
* Hook it into the hash chain
|
* Hook it into the hash chain
|
||||||
*/
|
*/
|
||||||
b = malloc (sizeof(FcObjectBucket));
|
b = malloc (sizeof(FcObjectBucket));
|
||||||
if (!b)
|
if (!b)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
if (copy)
|
if (copy)
|
||||||
{
|
{
|
||||||
|
@ -421,7 +421,7 @@ static const FcConstant _FcBaseConstants[] = {
|
||||||
{ (FcChar8 *) "expanded", "width", FC_WIDTH_EXPANDED },
|
{ (FcChar8 *) "expanded", "width", FC_WIDTH_EXPANDED },
|
||||||
{ (FcChar8 *) "extraexpanded", "width", FC_WIDTH_EXTRAEXPANDED },
|
{ (FcChar8 *) "extraexpanded", "width", FC_WIDTH_EXTRAEXPANDED },
|
||||||
{ (FcChar8 *) "ultraexpanded", "width", FC_WIDTH_ULTRAEXPANDED },
|
{ (FcChar8 *) "ultraexpanded", "width", FC_WIDTH_ULTRAEXPANDED },
|
||||||
|
|
||||||
{ (FcChar8 *) "proportional", "spacing", FC_PROPORTIONAL, },
|
{ (FcChar8 *) "proportional", "spacing", FC_PROPORTIONAL, },
|
||||||
{ (FcChar8 *) "dual", "spacing", FC_DUAL, },
|
{ (FcChar8 *) "dual", "spacing", FC_DUAL, },
|
||||||
{ (FcChar8 *) "mono", "spacing", FC_MONO, },
|
{ (FcChar8 *) "mono", "spacing", FC_MONO, },
|
||||||
|
@ -495,8 +495,8 @@ FcNameUnregisterConstants (const FcConstant *consts, int nconsts)
|
||||||
{
|
{
|
||||||
const FcConstantList *l, **prev;
|
const FcConstantList *l, **prev;
|
||||||
|
|
||||||
for (prev = &_FcConstants;
|
for (prev = &_FcConstants;
|
||||||
(l = *prev);
|
(l = *prev);
|
||||||
prev = (const FcConstantList **) &(l->next))
|
prev = (const FcConstantList **) &(l->next))
|
||||||
{
|
{
|
||||||
if (l->consts == consts && l->nconsts == nconsts)
|
if (l->consts == consts && l->nconsts == nconsts)
|
||||||
|
@ -620,7 +620,7 @@ static const FcChar8 *
|
||||||
FcNameFindNext (const FcChar8 *cur, const char *delim, FcChar8 *save, FcChar8 *last)
|
FcNameFindNext (const FcChar8 *cur, const char *delim, FcChar8 *save, FcChar8 *last)
|
||||||
{
|
{
|
||||||
FcChar8 c;
|
FcChar8 c;
|
||||||
|
|
||||||
while ((c = *cur))
|
while ((c = *cur))
|
||||||
{
|
{
|
||||||
if (c == '\\')
|
if (c == '\\')
|
||||||
|
@ -765,7 +765,7 @@ bail0:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
static FcBool
|
static FcBool
|
||||||
FcNameUnparseString (FcStrBuf *buf,
|
FcNameUnparseString (FcStrBuf *buf,
|
||||||
const FcChar8 *string,
|
const FcChar8 *string,
|
||||||
const FcChar8 *escape)
|
const FcChar8 *escape)
|
||||||
{
|
{
|
||||||
|
@ -790,7 +790,7 @@ FcNameUnparseValue (FcStrBuf *buf,
|
||||||
{
|
{
|
||||||
FcChar8 temp[1024];
|
FcChar8 temp[1024];
|
||||||
FcValue v = FcValueCanonicalize(v0);
|
FcValue v = FcValueCanonicalize(v0);
|
||||||
|
|
||||||
switch (v.type) {
|
switch (v.type) {
|
||||||
case FcTypeVoid:
|
case FcTypeVoid:
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
|
@ -805,7 +805,7 @@ FcNameUnparseValue (FcStrBuf *buf,
|
||||||
case FcTypeBool:
|
case FcTypeBool:
|
||||||
return FcNameUnparseString (buf, v.u.b ? (FcChar8 *) "True" : (FcChar8 *) "False", 0);
|
return FcNameUnparseString (buf, v.u.b ? (FcChar8 *) "True" : (FcChar8 *) "False", 0);
|
||||||
case FcTypeMatrix:
|
case FcTypeMatrix:
|
||||||
sprintf ((char *) temp, "%g %g %g %g",
|
sprintf ((char *) temp, "%g %g %g %g",
|
||||||
v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy);
|
v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy);
|
||||||
return FcNameUnparseString (buf, temp, 0);
|
return FcNameUnparseString (buf, temp, 0);
|
||||||
case FcTypeCharSet:
|
case FcTypeCharSet:
|
||||||
|
@ -873,11 +873,11 @@ FcNameUnparseEscaped (FcPattern *pat, FcBool escape)
|
||||||
for (i = 0; i < l->ntypes; i++)
|
for (i = 0; i < l->ntypes; i++)
|
||||||
{
|
{
|
||||||
o = &l->types[i];
|
o = &l->types[i];
|
||||||
if (!strcmp (o->object, FC_FAMILY) ||
|
if (!strcmp (o->object, FC_FAMILY) ||
|
||||||
!strcmp (o->object, FC_SIZE) ||
|
!strcmp (o->object, FC_SIZE) ||
|
||||||
!strcmp (o->object, FC_FILE))
|
!strcmp (o->object, FC_FILE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
e = FcPatternObjectFindElt (pat, FcObjectFromName (o->object));
|
e = FcPatternObjectFindElt (pat, FcObjectFromName (o->object));
|
||||||
if (e)
|
if (e)
|
||||||
{
|
{
|
||||||
|
@ -887,7 +887,7 @@ FcNameUnparseEscaped (FcPattern *pat, FcBool escape)
|
||||||
goto bail0;
|
goto bail0;
|
||||||
if (!FcNameUnparseString (&buf, (FcChar8 *) "=", 0))
|
if (!FcNameUnparseString (&buf, (FcChar8 *) "=", 0))
|
||||||
goto bail0;
|
goto bail0;
|
||||||
if (!FcNameUnparseValueList (&buf, FcPatternEltValues(e), escape ?
|
if (!FcNameUnparseValueList (&buf, FcPatternEltValues(e), escape ?
|
||||||
(FcChar8 *) FC_ESCAPE_VARIABLE : 0))
|
(FcChar8 *) FC_ESCAPE_VARIABLE : 0))
|
||||||
goto bail0;
|
goto bail0;
|
||||||
}
|
}
|
||||||
|
|
70
src/fcpat.c
70
src/fcpat.c
|
@ -138,11 +138,11 @@ FcValueListDestroy (FcValueListPtr l)
|
||||||
FcMatrixFree ((FcMatrix *)l->value.u.m);
|
FcMatrixFree ((FcMatrix *)l->value.u.m);
|
||||||
break;
|
break;
|
||||||
case FcTypeCharSet:
|
case FcTypeCharSet:
|
||||||
FcCharSetDestroy
|
FcCharSetDestroy
|
||||||
((FcCharSet *) (l->value.u.c));
|
((FcCharSet *) (l->value.u.c));
|
||||||
break;
|
break;
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
FcLangSetDestroy
|
FcLangSetDestroy
|
||||||
((FcLangSet *) (l->value.u.l));
|
((FcLangSet *) (l->value.u.l));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -210,7 +210,7 @@ FcStringHash (const FcChar8 *s)
|
||||||
{
|
{
|
||||||
FcChar8 c;
|
FcChar8 c;
|
||||||
FcChar32 h = 0;
|
FcChar32 h = 0;
|
||||||
|
|
||||||
if (s)
|
if (s)
|
||||||
while ((c = *s++))
|
while ((c = *s++))
|
||||||
h = ((h << 1) | (h >> 31)) ^ c;
|
h = ((h << 1) | (h >> 31)) ^ c;
|
||||||
|
@ -232,9 +232,9 @@ FcValueHash (const FcValue *v)
|
||||||
case FcTypeBool:
|
case FcTypeBool:
|
||||||
return (FcChar32) v->u.b;
|
return (FcChar32) v->u.b;
|
||||||
case FcTypeMatrix:
|
case FcTypeMatrix:
|
||||||
return (FcDoubleHash (v->u.m->xx) ^
|
return (FcDoubleHash (v->u.m->xx) ^
|
||||||
FcDoubleHash (v->u.m->xy) ^
|
FcDoubleHash (v->u.m->xy) ^
|
||||||
FcDoubleHash (v->u.m->yx) ^
|
FcDoubleHash (v->u.m->yx) ^
|
||||||
FcDoubleHash (v->u.m->yy));
|
FcDoubleHash (v->u.m->yy));
|
||||||
case FcTypeCharSet:
|
case FcTypeCharSet:
|
||||||
return (FcChar32) FcValueCharSet(v)->num;
|
return (FcChar32) FcValueCharSet(v)->num;
|
||||||
|
@ -269,7 +269,7 @@ static FcChar32
|
||||||
FcValueListHash (FcValueListPtr l)
|
FcValueListHash (FcValueListPtr l)
|
||||||
{
|
{
|
||||||
FcChar32 hash = 0;
|
FcChar32 hash = 0;
|
||||||
|
|
||||||
for (; l; l = FcValueListNext(l))
|
for (; l; l = FcValueListNext(l))
|
||||||
{
|
{
|
||||||
hash = ((hash << 1) | (hash >> 31)) ^ FcValueHash (&l->value);
|
hash = ((hash << 1) | (hash >> 31)) ^ FcValueHash (&l->value);
|
||||||
|
@ -282,7 +282,7 @@ FcPatternDestroy (FcPattern *p)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
FcPatternElt *elts;
|
FcPatternElt *elts;
|
||||||
|
|
||||||
if (p->ref == FC_REF_CONSTANT)
|
if (p->ref == FC_REF_CONSTANT)
|
||||||
{
|
{
|
||||||
FcCacheObjectDereference (p);
|
FcCacheObjectDereference (p);
|
||||||
|
@ -342,12 +342,12 @@ FcPatternObjectInsertElt (FcPattern *p, FcObject object)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
FcPatternElt *e;
|
FcPatternElt *e;
|
||||||
|
|
||||||
i = FcPatternObjectPosition (p, object);
|
i = FcPatternObjectPosition (p, object);
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
{
|
{
|
||||||
i = -i - 1;
|
i = -i - 1;
|
||||||
|
|
||||||
/* reallocate array */
|
/* reallocate array */
|
||||||
if (p->num + 1 >= p->size)
|
if (p->num + 1 >= p->size)
|
||||||
{
|
{
|
||||||
|
@ -385,14 +385,14 @@ FcPatternObjectInsertElt (FcPattern *p, FcObject object)
|
||||||
e + i,
|
e + i,
|
||||||
sizeof (FcPatternElt) *
|
sizeof (FcPatternElt) *
|
||||||
(p->num - i));
|
(p->num - i));
|
||||||
|
|
||||||
/* bump count */
|
/* bump count */
|
||||||
p->num++;
|
p->num++;
|
||||||
|
|
||||||
e[i].object = object;
|
e[i].object = object;
|
||||||
e[i].values = NULL;
|
e[i].values = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FcPatternElts(p) + i;
|
return FcPatternElts(p) + i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ FcPatternHash (const FcPattern *p)
|
||||||
|
|
||||||
for (i = 0; i < p->num; i++)
|
for (i = 0; i < p->num; i++)
|
||||||
{
|
{
|
||||||
h = (((h << 1) | (h >> 31)) ^
|
h = (((h << 1) | (h >> 31)) ^
|
||||||
pe[i].object ^
|
pe[i].object ^
|
||||||
FcValueListHash (FcPatternEltValues(&pe[i])));
|
FcValueListHash (FcPatternEltValues(&pe[i])));
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ FcPatternEqualSubset (const FcPattern *pai, const FcPattern *pbi, const FcObject
|
||||||
{
|
{
|
||||||
FcPatternElt *ea, *eb;
|
FcPatternElt *ea, *eb;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < os->nobject; i++)
|
for (i = 0; i < os->nobject; i++)
|
||||||
{
|
{
|
||||||
FcObject object = FcObjectFromName (os->objects[i]);
|
FcObject object = FcObjectFromName (os->objects[i]);
|
||||||
|
@ -503,11 +503,11 @@ FcPatternObjectAddWithBinding (FcPattern *p,
|
||||||
new->value = value;
|
new->value = value;
|
||||||
new->binding = binding;
|
new->binding = binding;
|
||||||
new->next = NULL;
|
new->next = NULL;
|
||||||
|
|
||||||
e = FcPatternObjectInsertElt (p, object);
|
e = FcPatternObjectInsertElt (p, object);
|
||||||
if (!e)
|
if (!e)
|
||||||
goto bail2;
|
goto bail2;
|
||||||
|
|
||||||
if (append)
|
if (append)
|
||||||
{
|
{
|
||||||
for (prev = &e->values; *prev; prev = &(*prev)->next)
|
for (prev = &e->values; *prev; prev = &(*prev)->next)
|
||||||
|
@ -519,10 +519,10 @@ FcPatternObjectAddWithBinding (FcPattern *p,
|
||||||
new->next = e->values;
|
new->next = e->values;
|
||||||
e->values = new;
|
e->values = new;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
|
|
||||||
bail2:
|
bail2:
|
||||||
FcValueDestroy (value);
|
FcValueDestroy (value);
|
||||||
bail1:
|
bail1:
|
||||||
FcMemFree (FC_MEM_VALLIST, sizeof (FcValueList));
|
FcMemFree (FC_MEM_VALLIST, sizeof (FcValueList));
|
||||||
|
@ -563,10 +563,10 @@ FcPatternObjectDel (FcPattern *p, FcObject object)
|
||||||
|
|
||||||
/* destroy value */
|
/* destroy value */
|
||||||
FcValueListDestroy (e->values);
|
FcValueListDestroy (e->values);
|
||||||
|
|
||||||
/* shuffle existing ones down */
|
/* shuffle existing ones down */
|
||||||
memmove (e, e+1,
|
memmove (e, e+1,
|
||||||
(FcPatternElts(p) + p->num - (e + 1)) *
|
(FcPatternElts(p) + p->num - (e + 1)) *
|
||||||
sizeof (FcPatternElt));
|
sizeof (FcPatternElt));
|
||||||
p->num--;
|
p->num--;
|
||||||
e = FcPatternElts(p) + p->num;
|
e = FcPatternElts(p) + p->num;
|
||||||
|
@ -580,7 +580,7 @@ FcPatternDel (FcPattern *p, const char *object)
|
||||||
{
|
{
|
||||||
return FcPatternObjectDel (p, FcObjectFromName (object));
|
return FcPatternObjectDel (p, FcObjectFromName (object));
|
||||||
}
|
}
|
||||||
|
|
||||||
FcBool
|
FcBool
|
||||||
FcPatternRemove (FcPattern *p, const char *object, int id)
|
FcPatternRemove (FcPattern *p, const char *object, int id)
|
||||||
{
|
{
|
||||||
|
@ -773,8 +773,8 @@ FcPatternGetInteger (const FcPattern *p, const char *object, int id, int *i)
|
||||||
{
|
{
|
||||||
return FcPatternObjectGetInteger (p, FcObjectFromName (object), id, i);
|
return FcPatternObjectGetInteger (p, FcObjectFromName (object), id, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FcResult
|
FcResult
|
||||||
FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int id, double *d)
|
FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int id, double *d)
|
||||||
{
|
{
|
||||||
|
@ -824,7 +824,7 @@ FcPatternGetString (const FcPattern *p, const char *object, int id, FcChar8 ** s
|
||||||
{
|
{
|
||||||
return FcPatternObjectGetString (p, FcObjectFromName (object), id, s);
|
return FcPatternObjectGetString (p, FcObjectFromName (object), id, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
FcResult
|
FcResult
|
||||||
FcPatternGetMatrix(const FcPattern *p, const char *object, int id, FcMatrix **m)
|
FcPatternGetMatrix(const FcPattern *p, const char *object, int id, FcMatrix **m)
|
||||||
{
|
{
|
||||||
|
@ -924,7 +924,7 @@ FcPatternDuplicate (const FcPattern *orig)
|
||||||
l->binding,
|
l->binding,
|
||||||
FcTrue))
|
FcTrue))
|
||||||
goto bail1;
|
goto bail1;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -949,7 +949,7 @@ FcPattern *
|
||||||
FcPatternVaBuild (FcPattern *p, va_list va)
|
FcPatternVaBuild (FcPattern *p, va_list va)
|
||||||
{
|
{
|
||||||
FcPattern *ret;
|
FcPattern *ret;
|
||||||
|
|
||||||
FcPatternVapBuild (ret, p, va);
|
FcPatternVapBuild (ret, p, va);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -958,7 +958,7 @@ FcPattern *
|
||||||
FcPatternBuild (FcPattern *p, ...)
|
FcPatternBuild (FcPattern *p, ...)
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
|
|
||||||
va_start (va, p);
|
va_start (va, p);
|
||||||
FcPatternVapBuild (p, p, va);
|
FcPatternVapBuild (p, p, va);
|
||||||
va_end (va);
|
va_end (va);
|
||||||
|
@ -974,14 +974,14 @@ FcPatternAppend (FcPattern *p, FcPattern *s)
|
||||||
int i;
|
int i;
|
||||||
FcPatternElt *e;
|
FcPatternElt *e;
|
||||||
FcValueListPtr v;
|
FcValueListPtr v;
|
||||||
|
|
||||||
for (i = 0; i < s->num; i++)
|
for (i = 0; i < s->num; i++)
|
||||||
{
|
{
|
||||||
e = FcPatternElts(s)+i;
|
e = FcPatternElts(s)+i;
|
||||||
for (v = FcPatternEltValues(e); v; v = FcValueListNext(v))
|
for (v = FcPatternEltValues(e); v; v = FcValueListNext(v))
|
||||||
{
|
{
|
||||||
if (!FcPatternObjectAddWithBinding (p, e->object,
|
if (!FcPatternObjectAddWithBinding (p, e->object,
|
||||||
FcValueCanonicalize(&v->value),
|
FcValueCanonicalize(&v->value),
|
||||||
v->binding, FcTrue))
|
v->binding, FcTrue))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
}
|
}
|
||||||
|
@ -1102,7 +1102,7 @@ FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
FcPatternElt *elts = FcPatternElts(pat);
|
FcPatternElt *elts = FcPatternElts(pat);
|
||||||
|
|
||||||
if (!FcSerializeAlloc (serialize, pat, sizeof (FcPattern)))
|
if (!FcSerializeAlloc (serialize, pat, sizeof (FcPattern)))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
if (!FcSerializeAlloc (serialize, elts, pat->num * sizeof (FcPatternElt)))
|
if (!FcSerializeAlloc (serialize, elts, pat->num * sizeof (FcPatternElt)))
|
||||||
|
@ -1128,11 +1128,11 @@ FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat)
|
||||||
*pat_serialized = *pat;
|
*pat_serialized = *pat;
|
||||||
pat_serialized->size = pat->num;
|
pat_serialized->size = pat->num;
|
||||||
pat_serialized->ref = FC_REF_CONSTANT;
|
pat_serialized->ref = FC_REF_CONSTANT;
|
||||||
|
|
||||||
elts_serialized = FcSerializePtr (serialize, elts);
|
elts_serialized = FcSerializePtr (serialize, elts);
|
||||||
if (!elts_serialized)
|
if (!elts_serialized)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
pat_serialized->elts_offset = FcPtrToOffset (pat_serialized,
|
pat_serialized->elts_offset = FcPtrToOffset (pat_serialized,
|
||||||
elts_serialized);
|
elts_serialized);
|
||||||
|
|
||||||
|
@ -1142,7 +1142,7 @@ FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat)
|
||||||
if (!values_serialized)
|
if (!values_serialized)
|
||||||
return NULL;
|
return NULL;
|
||||||
elts_serialized[i].object = elts[i].object;
|
elts_serialized[i].object = elts[i].object;
|
||||||
elts_serialized[i].values = FcPtrToEncodedOffset (&elts_serialized[i],
|
elts_serialized[i].values = FcPtrToEncodedOffset (&elts_serialized[i],
|
||||||
values_serialized,
|
values_serialized,
|
||||||
FcValueList);
|
FcValueList);
|
||||||
}
|
}
|
||||||
|
@ -1199,7 +1199,7 @@ FcValueListSerialize (FcSerialize *serialize, const FcValueList *vl)
|
||||||
vl_serialized = FcSerializePtr (serialize, vl);
|
vl_serialized = FcSerializePtr (serialize, vl);
|
||||||
if (!vl_serialized)
|
if (!vl_serialized)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (prev_serialized)
|
if (prev_serialized)
|
||||||
prev_serialized->next = FcPtrToEncodedOffset (prev_serialized,
|
prev_serialized->next = FcPtrToEncodedOffset (prev_serialized,
|
||||||
vl_serialized,
|
vl_serialized,
|
||||||
|
|
74
src/fcstr.c
74
src/fcstr.c
|
@ -109,7 +109,7 @@ FcStrCaseWalkerLong (FcCaseWalker *w, FcChar8 r)
|
||||||
int mid = (min + max) >> 1;
|
int mid = (min + max) >> 1;
|
||||||
FcChar32 low = fcCaseFold[mid].upper;
|
FcChar32 low = fcCaseFold[mid].upper;
|
||||||
FcChar32 high = low + FcCaseFoldUpperCount (&fcCaseFold[mid]);
|
FcChar32 high = low + FcCaseFoldUpperCount (&fcCaseFold[mid]);
|
||||||
|
|
||||||
if (high <= ucs4)
|
if (high <= ucs4)
|
||||||
min = mid + 1;
|
min = mid + 1;
|
||||||
else if (ucs4 < low)
|
else if (ucs4 < low)
|
||||||
|
@ -158,7 +158,7 @@ FcStrCaseWalkerNext (FcCaseWalker *w)
|
||||||
w->read = 0;
|
w->read = 0;
|
||||||
}
|
}
|
||||||
r = *w->src++;
|
r = *w->src++;
|
||||||
|
|
||||||
if ((r & 0xc0) == 0xc0)
|
if ((r & 0xc0) == 0xc0)
|
||||||
return FcStrCaseWalkerLong (w, r);
|
return FcStrCaseWalkerLong (w, r);
|
||||||
if ('A' <= r && r <= 'Z')
|
if ('A' <= r && r <= 'Z')
|
||||||
|
@ -181,7 +181,7 @@ FcStrCaseWalkerNextIgnoreBlanks (FcCaseWalker *w)
|
||||||
{
|
{
|
||||||
r = *w->src++;
|
r = *w->src++;
|
||||||
} while (r == ' ');
|
} while (r == ' ');
|
||||||
|
|
||||||
if ((r & 0xc0) == 0xc0)
|
if ((r & 0xc0) == 0xc0)
|
||||||
return FcStrCaseWalkerLong (w, r);
|
return FcStrCaseWalkerLong (w, r);
|
||||||
if ('A' <= r && r <= 'Z')
|
if ('A' <= r && r <= 'Z')
|
||||||
|
@ -215,11 +215,11 @@ FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2)
|
||||||
FcChar8 c1, c2;
|
FcChar8 c1, c2;
|
||||||
|
|
||||||
if (s1 == s2) return 0;
|
if (s1 == s2) return 0;
|
||||||
|
|
||||||
FcStrCaseWalkerInit (s1, &w1);
|
FcStrCaseWalkerInit (s1, &w1);
|
||||||
FcStrCaseWalkerInit (s2, &w2);
|
FcStrCaseWalkerInit (s2, &w2);
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
c1 = FcStrCaseWalkerNext (&w1);
|
c1 = FcStrCaseWalkerNext (&w1);
|
||||||
c2 = FcStrCaseWalkerNext (&w2);
|
c2 = FcStrCaseWalkerNext (&w2);
|
||||||
|
@ -236,11 +236,11 @@ FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2)
|
||||||
FcChar8 c1, c2;
|
FcChar8 c1, c2;
|
||||||
|
|
||||||
if (s1 == s2) return 0;
|
if (s1 == s2) return 0;
|
||||||
|
|
||||||
FcStrCaseWalkerInit (s1, &w1);
|
FcStrCaseWalkerInit (s1, &w1);
|
||||||
FcStrCaseWalkerInit (s2, &w2);
|
FcStrCaseWalkerInit (s2, &w2);
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
c1 = FcStrCaseWalkerNextIgnoreBlanks (&w1);
|
c1 = FcStrCaseWalkerNextIgnoreBlanks (&w1);
|
||||||
c2 = FcStrCaseWalkerNextIgnoreBlanks (&w2);
|
c2 = FcStrCaseWalkerNextIgnoreBlanks (&w2);
|
||||||
|
@ -254,10 +254,10 @@ int
|
||||||
FcStrCmp (const FcChar8 *s1, const FcChar8 *s2)
|
FcStrCmp (const FcChar8 *s1, const FcChar8 *s2)
|
||||||
{
|
{
|
||||||
FcChar8 c1, c2;
|
FcChar8 c1, c2;
|
||||||
|
|
||||||
if (s1 == s2)
|
if (s1 == s2)
|
||||||
return 0;
|
return 0;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
c1 = *s1++;
|
c1 = *s1++;
|
||||||
c2 = *s2++;
|
c2 = *s2++;
|
||||||
|
@ -296,8 +296,8 @@ FcStrIsAtIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2)
|
||||||
|
|
||||||
FcStrCaseWalkerInit (s1, &w1);
|
FcStrCaseWalkerInit (s1, &w1);
|
||||||
FcStrCaseWalkerInit (s2, &w2);
|
FcStrCaseWalkerInit (s2, &w2);
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
c1 = FcStrCaseWalkerNextIgnoreBlanks (&w1);
|
c1 = FcStrCaseWalkerNextIgnoreBlanks (&w1);
|
||||||
c2 = FcStrCaseWalkerNextIgnoreBlanks (&w2);
|
c2 = FcStrCaseWalkerNextIgnoreBlanks (&w2);
|
||||||
|
@ -355,8 +355,8 @@ FcStrIsAtIgnoreCase (const FcChar8 *s1, const FcChar8 *s2)
|
||||||
|
|
||||||
FcStrCaseWalkerInit (s1, &w1);
|
FcStrCaseWalkerInit (s1, &w1);
|
||||||
FcStrCaseWalkerInit (s2, &w2);
|
FcStrCaseWalkerInit (s2, &w2);
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
c1 = FcStrCaseWalkerNext (&w1);
|
c1 = FcStrCaseWalkerNext (&w1);
|
||||||
c2 = FcStrCaseWalkerNext (&w2);
|
c2 = FcStrCaseWalkerNext (&w2);
|
||||||
|
@ -395,7 +395,7 @@ FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2)
|
||||||
|
|
||||||
while (s1len >= s2len)
|
while (s1len >= s2len)
|
||||||
{
|
{
|
||||||
if (wordStart &&
|
if (wordStart &&
|
||||||
FcStrIsAtIgnoreCase (s1, s2) &&
|
FcStrIsAtIgnoreCase (s1, s2) &&
|
||||||
(s1len == s2len || FcCharIsPunct (s1[s2len])))
|
(s1len == s2len || FcCharIsPunct (s1[s2len])))
|
||||||
{
|
{
|
||||||
|
@ -422,12 +422,12 @@ FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2)
|
||||||
|
|
||||||
if (s1 == s2)
|
if (s1 == s2)
|
||||||
return s1;
|
return s1;
|
||||||
|
|
||||||
FcStrCaseWalkerInit (s1, &w1);
|
FcStrCaseWalkerInit (s1, &w1);
|
||||||
FcStrCaseWalkerInit (s2, &w2);
|
FcStrCaseWalkerInit (s2, &w2);
|
||||||
|
|
||||||
c2 = FcStrCaseWalkerNext (&w2);
|
c2 = FcStrCaseWalkerNext (&w2);
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
cur = w1.src;
|
cur = w1.src;
|
||||||
|
@ -474,7 +474,7 @@ again:
|
||||||
if (!c2)
|
if (!c2)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
p = s1;
|
p = s1;
|
||||||
c1 = *s1++;
|
c1 = *s1++;
|
||||||
|
@ -517,15 +517,15 @@ FcUtf8ToUcs4 (const FcChar8 *src_orig,
|
||||||
|
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
s = *src++;
|
s = *src++;
|
||||||
len--;
|
len--;
|
||||||
|
|
||||||
if (!(s & 0x80))
|
if (!(s & 0x80))
|
||||||
{
|
{
|
||||||
result = s;
|
result = s;
|
||||||
extra = 0;
|
extra = 0;
|
||||||
}
|
}
|
||||||
else if (!(s & 0x40))
|
else if (!(s & 0x40))
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -561,7 +561,7 @@ FcUtf8ToUcs4 (const FcChar8 *src_orig,
|
||||||
}
|
}
|
||||||
if (extra > len)
|
if (extra > len)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
while (extra--)
|
while (extra--)
|
||||||
{
|
{
|
||||||
result <<= 6;
|
result <<= 6;
|
||||||
|
@ -586,7 +586,7 @@ FcUtf8Len (const FcChar8 *string,
|
||||||
int clen;
|
int clen;
|
||||||
FcChar32 c;
|
FcChar32 c;
|
||||||
FcChar32 max;
|
FcChar32 max;
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
max = 0;
|
max = 0;
|
||||||
while (len)
|
while (len)
|
||||||
|
@ -616,7 +616,7 @@ FcUcs4ToUtf8 (FcChar32 ucs4,
|
||||||
{
|
{
|
||||||
int bits;
|
int bits;
|
||||||
FcChar8 *d = dest;
|
FcChar8 *d = dest;
|
||||||
|
|
||||||
if (ucs4 < 0x80) { *d++= ucs4; bits= -6; }
|
if (ucs4 < 0x80) { *d++= ucs4; bits= -6; }
|
||||||
else if (ucs4 < 0x800) { *d++= ((ucs4 >> 6) & 0x1F) | 0xC0; bits= 0; }
|
else if (ucs4 < 0x800) { *d++= ((ucs4 >> 6) & 0x1F) | 0xC0; bits= 0; }
|
||||||
else if (ucs4 < 0x10000) { *d++= ((ucs4 >> 12) & 0x0F) | 0xE0; bits= 6; }
|
else if (ucs4 < 0x10000) { *d++= ((ucs4 >> 12) & 0x0F) | 0xE0; bits= 6; }
|
||||||
|
@ -647,11 +647,11 @@ FcUtf16ToUcs4 (const FcChar8 *src_orig,
|
||||||
|
|
||||||
if (len < 2)
|
if (len < 2)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
a = GetUtf16 (src, endian); src += 2; len -= 2;
|
a = GetUtf16 (src, endian); src += 2; len -= 2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for surrogate
|
* Check for surrogate
|
||||||
*/
|
*/
|
||||||
if ((a & 0xfc00) == 0xd800)
|
if ((a & 0xfc00) == 0xd800)
|
||||||
{
|
{
|
||||||
|
@ -683,7 +683,7 @@ FcUtf16Len (const FcChar8 *string,
|
||||||
int clen;
|
int clen;
|
||||||
FcChar32 c;
|
FcChar32 c;
|
||||||
FcChar32 max;
|
FcChar32 max;
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
max = 0;
|
max = 0;
|
||||||
while (len)
|
while (len)
|
||||||
|
@ -835,7 +835,7 @@ FcChar8 *
|
||||||
FcStrCopyFilename (const FcChar8 *s)
|
FcStrCopyFilename (const FcChar8 *s)
|
||||||
{
|
{
|
||||||
FcChar8 *new;
|
FcChar8 *new;
|
||||||
|
|
||||||
if (*s == '~')
|
if (*s == '~')
|
||||||
{
|
{
|
||||||
FcChar8 *home = FcConfigHome ();
|
FcChar8 *home = FcConfigHome ();
|
||||||
|
@ -875,7 +875,7 @@ FcStrLastSlash (const FcChar8 *path)
|
||||||
|
|
||||||
return slash;
|
return slash;
|
||||||
}
|
}
|
||||||
|
|
||||||
FcChar8 *
|
FcChar8 *
|
||||||
FcStrDirname (const FcChar8 *file)
|
FcStrDirname (const FcChar8 *file)
|
||||||
{
|
{
|
||||||
|
@ -954,10 +954,10 @@ FcStrCanonAbsoluteFilename (const FcChar8 *s)
|
||||||
}
|
}
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/*
|
/*
|
||||||
* Convert '\\' to '/' , remove double '/'
|
* Convert '\\' to '/' , remove double '/'
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
FcConvertDosPath (char *str)
|
FcConvertDosPath (char *str)
|
||||||
|
@ -1135,7 +1135,7 @@ FcStrSetDel (FcStrSet *set, const FcChar8 *s)
|
||||||
* copy remaining string pointers and trailing
|
* copy remaining string pointers and trailing
|
||||||
* NULL
|
* NULL
|
||||||
*/
|
*/
|
||||||
memmove (&set->strs[i], &set->strs[i+1],
|
memmove (&set->strs[i], &set->strs[i+1],
|
||||||
(set->num - i) * sizeof (FcChar8 *));
|
(set->num - i) * sizeof (FcChar8 *));
|
||||||
set->num--;
|
set->num--;
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
|
@ -1149,7 +1149,7 @@ FcStrSetDestroy (FcStrSet *set)
|
||||||
if (--set->ref == 0)
|
if (--set->ref == 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < set->num; i++)
|
for (i = 0; i < set->num; i++)
|
||||||
FcStrFree (set->strs[i]);
|
FcStrFree (set->strs[i]);
|
||||||
if (set->strs)
|
if (set->strs)
|
||||||
|
|
16
src/ftglue.c
16
src/ftglue.c
|
@ -18,7 +18,7 @@ static void
|
||||||
ftglue_log( const char* format, ... )
|
ftglue_log( const char* format, ... )
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start( ap, format );
|
va_start( ap, format );
|
||||||
vfprintf( stderr, format, ap );
|
vfprintf( stderr, format, ap );
|
||||||
va_end( ap );
|
va_end( ap );
|
||||||
|
@ -170,10 +170,10 @@ ftglue_face_goto_table( FT_Face face,
|
||||||
FT_Error error;
|
FT_Error error;
|
||||||
|
|
||||||
LOG(( "ftglue_face_goto_table( %p, %c%c%c%c, %p )\n",
|
LOG(( "ftglue_face_goto_table( %p, %c%c%c%c, %p )\n",
|
||||||
face,
|
face,
|
||||||
(int)((the_tag >> 24) & 0xFF),
|
(int)((the_tag >> 24) & 0xFF),
|
||||||
(int)((the_tag >> 16) & 0xFF),
|
(int)((the_tag >> 16) & 0xFF),
|
||||||
(int)((the_tag >> 8) & 0xFF),
|
(int)((the_tag >> 8) & 0xFF),
|
||||||
(int)(the_tag & 0xFF),
|
(int)(the_tag & 0xFF),
|
||||||
stream ));
|
stream ));
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ ftglue_face_goto_table( FT_Face face,
|
||||||
|
|
||||||
FT_UNUSED(checksum);
|
FT_UNUSED(checksum);
|
||||||
FT_UNUSED(size);
|
FT_UNUSED(size);
|
||||||
|
|
||||||
if ( tag == the_tag )
|
if ( tag == the_tag )
|
||||||
{
|
{
|
||||||
LOG(( "TrueType table (start: %ld) (size: %ld)\n", start, size ));
|
LOG(( "TrueType table (start: %ld) (size: %ld)\n", start, size ));
|
||||||
|
@ -251,9 +251,9 @@ ftglue_face_goto_table( FT_Face face,
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
LOG(( "TrueType error=%d\n", error ));
|
LOG(( "TrueType error=%d\n", error ));
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef QALLOC
|
#undef QALLOC
|
||||||
#define __ftglue__
|
#define __ftglue__
|
||||||
|
|
Loading…
Reference in New Issue