This cache is used to speed up application startup when using
the fontconfig library.</para>
+ <para>Note that <command>&dhpackage;</command> must be executed
+ once per architecture to generate font information customized
+ for that architecture. On a subsequent run,
+ <command>&dhpackage;</command> will augment the cache
+ information files with the information for the new
+ architecture. </para>
+
</refsect1>
<refsect1>
<title>OPTIONS</title>
current_dir_block = FcDirCacheProduce (set, &metadata);
- if (!metadata.count)
+ if (!metadata.count && !dirs->size)
{
unlink ((char *)cache_file);
free (cache_file);
return FcTrue;
}
- if (!current_dir_block)
+ if (metadata.count && !current_dir_block)
goto bail;
if (FcDebug () & FC_DBG_CACHE)
FcCacheWriteString (fd, "");
write (fd, &metadata, sizeof(FcCache));
- lseek (fd, FcCacheNextOffset (lseek(fd, 0, SEEK_END)), SEEK_SET);
- write (fd, current_dir_block, metadata.count);
- free (current_dir_block);
+ if (metadata.count)
+ {
+ lseek (fd, FcCacheNextOffset (lseek(fd, 0, SEEK_END)), SEEK_SET);
+ write (fd, current_dir_block, metadata.count);
+ free (current_dir_block);
+ }
/* this actually serves to pad out the cache file, if needed */
if (ftruncate (fd, current_arch_start + truncate_to) == -1)
int pattern_count; /* number of FcPatterns */
int patternelt_count; /* number of FcPatternElts */
int valuelist_count; /* number of FcValueLists */
- int str_count; /* number of FcStrs */
- int langset_count;
- int charset_count;
- int charset_numbers_count;
+ int str_count; /* size of strings appearing as FcValues */
+ int langset_count; /* number of FcLangSets */
+ int charset_count; /* number of FcCharSets */
+ int charset_numbers_count;
int charset_leaf_count;
int charset_leaf_idx_count;
} FcCache;