Commit Graph

19 Commits

Author SHA1 Message Date
Patrick Lam 82f35f8bb4 Fix bug 2878 (excessive relocations at startup for charsets, reported by
Ross Burton): fc-lang/fc-lang now creates the static form of the
    langset, not the dynamic form, so that the charsets should now be in
    .rodata.
2005-11-04 19:31:26 +00:00
Patrick Lam 21696e5bf0 Add consts to variables so as to move arrays into .rodata.
reviewed by: plam
2005-10-14 21:02:31 +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 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
Keith Packard 74a623e02e Implement new semantics for Contains and LISTING:
LISTING requires that the font Contain all of the pattern values, where
    Contain is redefined for strings to mean precise matching (so that
    Courier 10 Pitch doesn't list Courier fonts)
"Contains" for lang means both langs have the same language and either the
    same country or one is missing the country
2003-07-20 16:06:18 +00:00
Keith Packard 947afeb566 Optimization in FcLangSetIndex was broken, occasionally returning a pointer
to the wrong location on miss
2003-06-09 17:31:03 +00:00
Colin Walters 12d49d3cf4 Remove some unused variables, and initialize some other ones so gcc doesn't
warn us.
2003-04-17 17:43:04 +00:00
Keith Packard cc9dd09816 switch // comment 2003-03-22 01:55:00 +00:00
Keith Packard 793e946c2f AddFcLangSetContains for font listing, add first-letter table for language
lookups, change RCS tag
2003-03-05 05:52:31 +00:00
David Dawes 234397b429 633. Perform country-independent matching for Chinese languages in
fontconfig (#A.1406, Keith Packard).
2002-12-14 02:03:59 +00:00
Keith Packard 2458a6d8d8 FcLangSetHasLang was not actually checking the language set itself 2002-08-26 23:34:31 +00:00
Keith Packard 47d4f9501f Add contains/not_contains, fix LangSet equal operator to use FcLangEqual 2002-08-22 18:53:22 +00:00
Keith Packard d8d7395877 Reimplement FC_LANG as FcTypeLang, freeze patterns, other cleanup 2002-08-22 07:36:45 +00:00
Keith Packard c80d2ac486 Clean up some coverage files; a few accidentally included PUA values and
punctuation. Add debugging stuff to dump out missing codepoints during
    cache building when missing only a few
2002-07-12 21:06:03 +00:00
Keith Packard e50b9ae711 Update iso639-2 language coverage info, fix Georgian orthography to
eliminate Mingrelian and Svan glyphs, use coverage for inclusion and
    OS/2 for Han exclusion, restructure fclang.c to use fclang.h from
    fc-lang dir
2002-07-08 07:31:53 +00:00
Keith Packard d6dabf3686 Add walloon, update fclang.c to include recent language additions 2002-07-07 19:30:53 +00:00
Keith Packard 3de8881ec9 Add fclang.c to CVS; easier than attempting to build it on the fly 2002-07-07 00:00:43 +00:00