Commit Graph

78 Commits

Author SHA1 Message Date
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 212c9f437e #ifdef out old cache stuff, replace with first version of new mmapping
cache. Add *Read and *Write procedures which mmap in and write out the
    fontconfig data structures to disk. Currently, create cache in /tmp,
    with different sections for each architecture (as returned by uname's
    .machine field. Run the fc-cache binary to create a new cache file;
    fontconfig then uses this cache file on subsequent runs, saving lots of
    memory. Also fixes a few bugs and leaks.
2005-07-25 04:10:09 +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 46b51147d1 Change files from ISO-Latin-1 to UTF-8 2004-12-07 01:14:46 +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 f45d39b1fd FcFontList broken when presented a charset - was comparing inclusion in the
wrong direction
2003-04-24 15:29:33 +00:00
Keith Packard 1b16ef20c9 FcCharSetIsSubset errored on fonts with subsets in early blocks and extra
blocks not present in the second argument
2003-03-18 08:03:42 +00:00
Keith Packard 4bd4418ab5 Change RCS tag 2003-03-05 05:51:27 +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
Keith Packard 9dac3c5945 More complete memory tracking. Install always overwrites header files 2002-08-31 22:17:32 +00:00
Keith Packard d8d7395877 Reimplement FC_LANG as FcTypeLang, freeze patterns, other cleanup 2002-08-22 07:36:45 +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 2fcac34973 Trim ideographic punctuation and Suzhou numerals from zh-tw orthography.
Had accidentally swapped codePageRange bits for traditional and
    simplified chinese. Add persian (fa) and HKSCS (zh-hk). Fix possible
    bug in charset walking
2002-07-09 02:28:29 +00:00
Keith Packard 82f4243f22 Switch to RFC 3066 based lang names 2002-07-06 23:47:44 +00:00
Keith Packard 4c0036053a Add strong/weak pattern value binding, add known charsets for automatic
lang computation
2002-06-29 20:31:02 +00:00
Keith Packard 5c7fb8274c Construct empty constant charsets correctly (using null pointers) 2002-06-26 22:56:51 +00:00
Keith Packard 4645eedfcc Fix automatic file time checking, transcoding table searches. Actually add
config files used to config structure so they can be time checked as
    well
2002-06-21 06:14:45 +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 bc9469baad Optimize after profiling. Fix FcStrCmp to return correct sign 2002-05-29 22:07:33 +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 3673201215 Change charset enumeration functions to more sensible API 2002-05-24 05:20:02 +00:00
Keith Packard d9db7b9e94 Fix FT_Get_Next_Char API to match official 2.0.9 released version 2002-03-27 04:33:55 +00:00
Keith Packard 17e16fa110 Eliminate compiler warnings 2002-03-03 18:31:20 +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 c2e7c611cb Switch fontconfig from libxml2 to expat 2002-02-18 22:29:28 +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