Commit Graph

20 Commits

Author SHA1 Message Date
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
Ross Burton ae7d0f3593 Put all FcPattern objects though FcObjectStaticName and do pointer trather
than string compares
2005-03-31 19:16:49 +00:00
Keith Packard 192296d852 Adopt some RedHat suggestions for standard font configuration.
Add new helper program 'fc-case' to construct case folding tables from
    standard Unicode CaseFolding.txt file
Re-implement case insensitive functions with Unicode aware versions
    (including full case folding mappings)
2004-12-29 09:15:17 +00:00
Keith Packard 1c52c0f060 Reviewed by: Keith Packard <keithp@keithp.com>
memoize strings and share a single copy for all uses. Note that this could
    be improved further by using statically allocated blocks and gluing
    multiple strings together, but I'm basically lazy. In my environment
    with 800 font files, I get a savings of about 90KB.
2004-12-07 01:36:26 +00:00
Keith Packard 46b51147d1 Change files from ISO-Latin-1 to UTF-8 2004-12-07 01:14:46 +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 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 793e946c2f AddFcLangSetContains for font listing, add first-letter table for language
lookups, change RCS tag
2003-03-05 05:52:31 +00:00
Marc Aurele La France d1bec8c66d Pacify gcc 3.2 2002-09-18 17:11:46 +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 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 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 5b1bfa5d82 Fix incorrect size in memmove call in FcObjectSetAdd that crashed
FcFontSetList calls
2002-06-18 16:47:12 +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 88c747e206 Eliminate some compiler warnings, avoid seg fault when matching missing
values
2002-06-02 21:07:57 +00:00
Keith Packard 179c39959c Fix autoconf build process for fontconfig 2002-05-21 17:06:22 +00:00
Keith Packard 80c053b725 Add better error reporting when loading config file 2002-02-28 16:51:48 +00:00
Keith Packard 24330d27f8 Initial revision 2002-02-14 23:34:13 +00:00