Commit Graph

257 Commits

Author SHA1 Message Date
Keith Packard 0945cbe730 Change version to 2.3.96 2006-09-03 14:42:48 -07:00
Keith Packard c2c6976d1a Add FcMatchScan to resolve Delicious font matching issues (bug #6769)
The Delicious family includes one named Delicious Heavy, a bold variant
which is unfortunately marked as having normal weight. Because the family
name is 'Delicious', fontconfig accidentally selects this font instead of
the normal weight variant. The fix here rewrites the scanned data by running
the scanned pattern through a new substitution sequence tagged with
<match target=scan>; a sample for the Delicious family is included to
demonstrate how it works (and fix Delicious at the same time).

Also added was a new match predicate -- the 'decorative' predicate which is
automatically detected in fonts by searching style names for key decorative
phrases like SmallCaps, Shadow, Embosed and Antiqua. Suggestions for
additional decorative key words are welcome. This should have little effect
on font matching except when two fonts share the same characteristics except
for this value.
2006-09-02 17:52:12 -07:00
Keith Packard f57783d2e9 Revert ABI changes from version 2.3
Accidental ABI changes and additions were discovered by looking at the
differences in fontconfig.h. All of those have been reverted.
2006-08-31 14:38:18 -07:00
Keith Packard 7ce1967331 Rework cache files to use offsets for all data structures.
Replace all of the bank/id pairs with simple offsets, recode several
data structures to always use offsets inside the library to avoid
conditional paths. Exposed data structures use pointers to hold offsets,
setting the low bit to distinguish between offset and pointer.

Use offset-based data structures for lang charset encodings; eliminates
separate data structure format for that file.

Much testing will be needed; offsets are likely not detected everywhere in
the library yet.
2006-08-30 04:16:22 -07:00
Patrick Lam 7410e40bd9 2006-08-04 Keith Packard (keithp@keithp.com) reviewed by: plam
Make cache directories configurable. Simplify and correct some code which
    deals with per-directory caches.
2006-08-04 16:13:00 +00:00
Patrick Lam c001a192af Bail gracefully if the cache file does not contain enough data. 2006-04-19 16:17:19 +00:00
Patrick Lam 63d2df3f92 Bump version to 2.3.94. 2006-02-24 19:19:09 +00:00
Patrick Lam 97293e07dd Move FcConfigNormalizeFontDir call so that it doesn't result in infinite
recursion (reported by Ronny V. Vindenes).
2006-01-27 05:47:59 +00:00
Patrick Lam 8a0b0ed6d0 Compare device numbers as well as inodes. Always normalize directory names
before comparing them.
Allocate extra space for appended '/' in directory name.
reviewed by: plam
2006-01-14 21:23:03 +00:00
Patrick Lam 3bfae75d44 Bump version to 2.3.93.
Use open instead of fopen (requested by Phil Race for Sun).
src/fccache.c (FcDirCacheWrite);
Fix GCC4 warning and Makefile brokenness for /var/cache/fontconfig dir.
2005-12-21 03:31:19 +00:00
Patrick Lam ea44e21841 Migrate cache files from fonts directories to /var/cache/fontconfig. This
helps make fontconfig FHS-compliant, but requires that all caches get
    rebuilt.
Also, autogen.sh now needs the additional parameter
--localstatedir=/var.
2005-12-09 16:36:45 +00:00
Patrick Lam 1c9fdccab9 Move FC_BANK_DYNAMIC, FC_BANK_FIRST to internal header.
Check for type validity during FcPatternAddWithBinding, don't verify type
    in FcFontMatch, don't call FcCanonicalize here (which always does a
    deep copy).
reviewed by: plam
2005-11-24 21:40:20 +00:00
Patrick Lam f7c4624f56 2005-11-23 Frederic Crozat <fcrozat@mandriva.com>: reviewed by: plam
Minor code warning cleanups.
2005-11-23 16:36:26 +00:00
Patrick Lam e6d3e251ee Bump version to 2.3.92. 2005-11-04 06:17:00 +00:00
Patrick Lam 720298e773 Add FC_EMBEDDED_BITMAP object type to tell Xft/Cairo whether to load
embedded bitmaps or not.
reviewed by: plam
2005-10-26 06:34:29 +00:00
Patrick Lam 2fa3f27e68 Prevent fc-list from escaping strings when printing them. 2005-10-21 19:47:43 +00:00
Patrick Lam 250c1cd422 Add valist sentinel markup for FcObjectSetBuild and FcPatternBuild.
reviewed by: plam
2005-10-20 20:50:21 +00:00
Patrick Lam 55c8fa4f08 Add new API which unlinks directory caches and checks dir caches for
existence of appropriate sections. Fix fc-cache to unlink stale cache
    files and save directory caches that lack relevant sections.
2005-10-05 00:34:52 +00:00
Patrick Lam bc5784ff00 Bump version number to 2.3.91. 2005-10-01 19:18:51 +00:00
Patrick Lam f28f090d25 Add new command-line utility, fc-cat, to convert fonts.cache-2 files into
fonts.cache-1 files (e.g. for grepping and validation of the mmap
    codepath), as per James Cloos' request.
Remove done 'TODO' comment.
Updates for development release 2.3.90.
2005-09-23 05:59:19 +00:00
Patrick Lam 13cdf60753 Revert ill-advised addition of FC_RENDER. Add strategy for handling objects
that aren't hardcoded into fontconfig, but generated by fontconfig
    clients: keep another array of user-defined objects (indexed after the
    built-in objects).
Fix compilation warning (uninitialized variable).
Add comment.
2005-09-15 20:36:44 +00:00
Patrick Lam 0fa237d1e0 Add a global binding for the 'render' pattern element used by Xft; the lack
of said binding prevented programs from using FcPatterns through Xft.
2005-09-11 05:17:28 +00:00
Patrick Lam 8245771d5a Merge with HEAD and finish the GCC 4 cleanups (no more warnings!) 2005-09-11 02:16:09 +00:00
Patrick Lam 2304e38f9b :
Save subdirectory names in cache files to save time. This completely
    restores the original fontconfig API, BTW. Note that directories
    without fonts don't get a cache file; but then how many files would it
    have in that directory...
2005-09-01 06:14:46 +00:00
Patrick Lam 4262e0b385 Overhaul the serialization system to create one mmapable file per directory
and distribute bytes for each directory from a single malloc for that
    directory. Store pointers as differences between the data pointed to
    and the pointer's address (s_off = s - v). Don't serialize data
    structures that never actually get serialized. Separate strings used
    for keys from strings used for values (in FcPatternElt and FcValue,
    respectively). Bump FC_CACHE_VERSION to 2.
2005-08-24 06:21:30 +00:00
Patrick Lam 0fa680f076 Convert ObjectPtr from a fat structure to a simple index into an id table;
ids can be positive (for static strings) or negative (for dynamic
    strings). Static strings belong to a single buffer, while dynamic
    strings are independently allocated.
2005-07-07 12:09:10 +00:00
Patrick Lam cd2ec1a940 Add functionality to allow fontconfig data structure serialization.
This patch allows the fundamental fontconfig data structures to be
    serialized. I've converted everything from FcPattern down to be able to
    use *Ptr objects, which can be either static or dynamic (using a union
    which either contains a pointer or an index) and replaced storage of
    pointers in the heap with the appropriate *Ptr object. I then changed
    all writes of pointers to the heap with a *CreateDynamic call, which
    creates a dynamic Ptr object pointing to the same object as before.
    This way, the fundamental fontconfig semantics should be unchanged; I
    did not have to change external signatures this way, although I did
    change some internal signatures. When given a *Ptr object, just run *U
    to get back to a normal pointer; it gives the right answer regardless
    of whether we're using static or dynamic storage.
I've also implemented a Fc*Serialize call. Calling FcFontSetSerialize
    converts the dynamic FcFontSets contained in the config object to
    static FcFontSets and also converts its dependencies (e.g. everything
    you'd need to write to disk) to static objects. Note that you have to
    call Fc*PrepareSerialize first; this call will count the number of
    objects that actually needs to be allocated, so that we can avoid
    realloc. The Fc*Serialize calls then check the static pointers for
    nullness, and allocate the buffers if necessary. I've tested the
    execution of fc-list and fc-match after Fc*Serialize and they appear to
    work the same way.
2005-06-28 03:41:02 +00:00
Keith Packard 1cb309adcb Update for version 2.3.2 2005-04-23 04:32:23 +00:00
Keith Packard d49dde9f90 Update for 2.3.1 2005-03-08 23:39:02 +00:00
Keith Packard 4afc00ca02 Update for 2.3.0 2005-03-01 20:48:36 +00:00
Keith Packard 0c009d2b6d Generate and install PDF versions of the manuals
Fix formatting
Add missing exported functions, fix data types
Add missing pattern elements.
Add missing pattern elements. Document conf.d usage, clarify available
    orthography list. Fix some config file attributes. Complete list of
    constants.
Mark FC_SOURCE deprecated.
Don't set FC_SOURCE any longer.
2005-03-01 20:36:48 +00:00
Keith Packard afca783626 Update for version 2.2.99 2005-01-29 00:42:37 +00:00
Keith Packard d53461812d Update for version 2.2.98 2004-12-29 19:44:51 +00:00
Keith Packard 479f551f6d Document ASCII limitations of Fc character conversion macros
Fix off-by-one error in utf-8 case walking code. Add FcStrDowncase (useful
    for testing case conversion functions)
2004-12-29 19:37:14 +00:00
Keith Packard 46a10637cd Configuration changes to request synthetic emboldening of fonts. The actual
emboldening code will live in Xft.
reviewed by: Keith Packard <keithp@keithp.com>
2004-12-10 16:48:08 +00:00
Keith Packard 46b51147d1 Change files from ISO-Latin-1 to UTF-8 2004-12-07 01:14:46 +00:00
Keith Packard 308dc9c3ea Updates for version 2.2.97 2004-12-05 06:38:54 +00:00
Keith Packard 537e3d23fa Create FC_FONTFORMAT from FT_Get_X11_Font_Format function where available.
This provides font file format information (BDF, Type 1, PCF, TrueType)
    for each font. Closes #109.
2004-12-05 00:26:06 +00:00
Keith Packard dbf68dd5fe Fix typo.
Add detection for font capabilities (bug #105)
reviewed by: Keith Packard <keithp@keithp.com>
2004-12-04 22:06:52 +00:00
Keith Packard 4f27c1c0a3 Move existing fonts.conf to fonts.conf.bak
Add detection of iconv
Document new selectfont elements
Switch to UTF-8 in comment
Add fullname, and family/style/fullname language entries
Respect selectfont/*/glob
Add support for selectfont
Add multi-lingual family/style/fullname support
Expose FcListPatternMatchAny (which selectfont/*/pattern uses)
Add new FcPatternRemove/FcPatternAppend. FcObjectStaticName stores computed
    pattern element names which are required to be static.
2004-12-04 19:41:10 +00:00
Keith Packard b5f36ca0b5 Update for 2.2.96 2004-06-30 20:06:41 +00:00
Keith Packard 3d1ea0e5d4 Remove comma at end of FcResult enum definition. 2004-06-03 14:16:38 +00:00
Keith Packard d81271eb21 Update for 2.2.95 2004-05-29 19:36:32 +00:00
Keith Packard ec0c740e39 Add FcResultOutOfMemory to provide an accurate error when FcFontSetMatch
fails in this way
Make #warning about lacking various FreeType features indicate which
    version those features appeared so users know how to fix the problem
    (Thanks to Anton Tropashko)
2004-05-29 19:32:41 +00:00
Keith Packard 626a70167d Update to 2.2.94 (2.2.93 shipped with broken libtool bits) 2004-04-24 01:09:36 +00:00
Keith Packard 6ae6acf317 Add instructions for doing a release
clean up .spec file; perhaps this will be useful to somebody...
Update to 2.2.93
Make 'scanopen' static so GCC doesn't whine about lacking prototype
Add WARN_CFLAGS to pass -W flags for GCC systems
Change various char types around to match across function calls. Fixed bug
    in using available_sizes[i].height which is in pixels, not 64ths of a
    pixel.
2004-04-14 18:08:41 +00:00
Keith Packard 408dd9c07a Switch to FreeType 2.1.7 style includes. Bug #150.
reviewed by: Keith Packard <keithp@keithp.com>
2003-11-18 07:53:04 +00:00
Keith Packard 27143fc9a2 Update to version 2.2.92 2003-10-27 10:47:53 +00:00
Keith Packard 3541556bd3 Tag version 2.2.91 2003-10-26 16:52:28 +00:00
Owen Taylor f077d662c0 Add a FC_HINT_STYLE key for patterns, with possible values
HINT_NONE/HINT_SLIGHT/HINT_MEDIUM/HINT_FULL. (Bug #117)
2003-09-23 20:12:20 +00:00
Noah Levitt a05d257fb3 Add new spacing value FC_DUAL (dual-width, as some CJK fonts). (bug #111)
When checking for monospace and dual-width fonts, allow roughly a 3%
    variance in the advances.
2003-09-06 19:40:41 +00:00
Carl Worth 34cd0514a2 Added new FcFini function for cleaning up all memory. Fixed a few memory
leaks. fc-list now calls FcFini, (and is now leak-free according to
    valgrind)
2003-08-15 19:45:20 +00:00
Keith Packard 116e13b443 Wrap fcfreetype.h with _FCFUNCPROTOBEGIN/_FCFUNCPROTOEND 2003-07-20 17:14:47 +00:00
Keith Packard 4ae7f71c89 Update to version 2.2.90 2003-06-09 19:21:06 +00:00
James Su d4d1e8bc60 Fix "contains" op for strings and langsets. 2003-05-28 01:34:38 +00:00
Keith Packard ad293de004 Add FC_WEIGHT_BOOK as weight 75 2003-05-02 01:09:57 +00:00
Keith Packard 781f10486d Update to version 2.2.0 2003-04-21 16:12:22 +00:00
Keith Packard e2925d7dc2 bump version to 2.1.94 2003-04-16 21:50:51 +00:00
Keith Packard 3f7653c2ba Fix unary operator parsing. Add floor, ceil, trunc and round unary
operators
2003-04-15 23:38:06 +00:00
Keith Packard 0a557ec372 update version number to 2.1.93 2003-04-11 23:00:51 +00:00
Keith Packard 848d32bd3f Set spacing to mono if every encoded glyph is the same width 2003-03-28 17:08:35 +00:00
Keith Packard 81fa16c336 add font widths and extend weight from OS/2 table 2003-03-12 22:16:43 +00:00
Keith Packard 6348213702 Bump version to 2.1.92 2003-03-07 21:04:52 +00:00
Keith Packard 4c2967f626 Change RCS tag, add FcLangSetContains 2003-03-05 05:48:15 +00:00
Keith Packard bb7743ae7e Update version to 2.1.91 2003-03-03 05:47:14 +00:00
Keith Packard ff3f1f98ed Switch back to -version-info for fontconfig as its at minor 0. Add
--system-only to fc-cache. Fix FC_VERSION to match product version
    rather than .so version
2003-03-02 19:12:23 +00:00
Keith Packard f2aacf1ed9 Add remaining .cvsignore files 2003-02-24 17:52:44 +00:00
Keith Packard 20fa60c9ae Switch to automake 2003-02-24 17:18:50 +00:00
Keith Packard c647f6f1e4 Build fclang.h before building library This required compiling the charset
funcs into fc-lang, which was done by refactoring code in fccharset.c
    and fcfreetype.c a bit
Updated ethiopic orthographies
Remove imake support
Install empty local.conf file if none is present
2003-02-06 17:46:06 +00:00
Egbert Eich dbc56f0b3f 574. Make RENDER optional for Xvfb. When RENDER is enabled add depth 32
pixmap format to list of supported pixmaps (Egbert Eich).
573. Fix va_args glitches for xterm/libfontconfig: 0 == (void*)0 isn't true
    for all platforms (Egbert Eich).
572. Fix lbxproxy to also build on platforms that don't have snprintf()
    (Egbert Eich).
571. Fix va_args glitches in mkfontscale: arg stack isn't preserved after
    calling va_arg on all platforms (Egbert Eich).
570. Fixed x11perf aa benchmarks to support non-default visuals/colormaps
    (Egbert Eich).
2002-12-04 10:28:03 +00:00
Keith Packard bff801144b Add a bunch more consts to Xft and fontconfig apis 2002-10-11 17:53:03 +00:00
Keith Packard 1852d49035 Add FC_RGBA_UNKNOWN 2002-10-02 07:11:30 +00:00
Keith Packard a342e87dc3 Add fontversion field 2002-09-26 00:17:28 +00:00
Keith Packard 9dac3c5945 More complete memory tracking. Install always overwrites header files 2002-08-31 22:17:32 +00:00
Keith Packard f21f40f347 Append version number to cache file names 2002-08-26 19:57:40 +00:00
Keith Packard 0f9a306e71 Add const to a bunch of string APIs 2002-08-24 20:08:53 +00:00
Keith Packard d8d7395877 Reimplement FC_LANG as FcTypeLang, freeze patterns, other cleanup 2002-08-22 07:36:45 +00:00
Keith Packard fa244f3d88 Various config changes plus a couple of optimizations from Owen 2002-08-19 19:32:05 +00:00
Keith Packard 938bc63358 Fix weird first/not-first lameness in font matches, replacing with target
qualifiers on test elements. Update library manual page.
2002-08-11 18:11:04 +00:00
Keith Packard aefb2c41c8 Fix autoconf build BSD install and sysconfdir problems 2002-08-01 15:57:26 +00:00
Marc Aurele La France c2e9d0240b Warning fix 2002-08-01 01:35:02 +00:00
Keith Packard 327a7fd491 Rewrite global cache handling code in fontconfig to eliminate per-file
syscalls
2002-07-28 10:50:59 +00:00
Keith Packard 69937bd941 Add some Utf16 support, extract font family and style names from name table
for sfnt fonts
2002-07-13 05:43:25 +00:00
Keith Packard 2ce5254236 Remove old FC_LANG constants now that fontconfig uses RFC 3066 based names 2002-07-11 02:47:50 +00:00
Keith Packard 82f4243f22 Switch to RFC 3066 based lang names 2002-07-06 23:47:44 +00:00
Keith Packard bdcdaceda4 Add FC_LANG_UNKNOWN (needed by auto lang-detecting fcfreetype.c) 2002-06-30 23:45:17 +00:00
Keith Packard 6f6563edb5 Add ref counting to font config patterns so that FcFontSort return values
are persistant
2002-06-19 20:08:22 +00:00
Keith Packard d0f07b8d58 Add FcPatternHash, clean up a few valgrind issues 2002-06-08 17:32:05 +00:00
Keith Packard e9be9cd10a Add FcPatternEqualSubset for Pango, clean up some internal FcPattern
interfaces
2002-06-03 08:31:15 +00:00
Keith Packard 2a41214a25 Add aspect ratio support to Xft and fontconfig 2002-06-02 20:52:06 +00:00
Keith Packard be0948508c Add support for user-provided freetype faces to Xft 2002-05-31 23:21:25 +00:00
Keith Packard 20ac65ab00 Change FcCharSet datastructure, add FcFontSort API 2002-05-31 04:42:42 +00:00
Keith Packard 1412a69926 Apply some obvious fixes to FcFontSetSort from Owen. Speed up FcCharSet
primitives and FcFontSetSort
2002-05-29 08:21:33 +00:00
Keith Packard ed2547b858 Clean up autoconf install to obey DESTDIR 2002-05-24 06:25:52 +00:00
Keith Packard 3673201215 Change charset enumeration functions to more sensible API 2002-05-24 05:20:02 +00:00
Keith Packard 48db40f692 A few random fontconfig build fixes 2002-05-23 23:00:46 +00:00
Keith Packard 442678fbc4 Missed a Makefile.in for fontconfig includes 2002-05-22 22:59:41 +00:00
Keith Packard 0ab36ca8f9 Replace silly avl sort with qsort, add FcPatternEqual 2002-05-22 04:37:07 +00:00
Keith Packard 179c39959c Fix autoconf build process for fontconfig 2002-05-21 17:06:22 +00:00
Keith Packard 216fac98e0 Add match routine that returns list of fonts 2002-03-03 18:39:05 +00:00
Keith Packard 134f6011f3 Add new FcAtomic datatype for config file locking 2002-03-01 22:06:30 +00:00
Keith Packard 9c8e07f195 Port Xft1 to fontconfig 2002-03-01 01:00:54 +00:00
Keith Packard 80c053b725 Add better error reporting when loading config file 2002-02-28 16:51:48 +00:00
Keith Packard a398554a6d Remove fcxml.h include file as it cant work anymore anyhow 2002-02-20 01:01:21 +00:00
Keith Packard aae6f7d487 Eliminate const in FcPatternGetString; too hard. Add FcCharSetCoverage to
enumarate Unicode coverage efficiently
2002-02-19 07:50:44 +00:00
Keith Packard ccb3e93b27 fontconfig library: build fixes and compiler warning fixes 2002-02-15 06:01:28 +00:00
Keith Packard 24330d27f8 Initial revision 2002-02-14 23:34:13 +00:00