Commit Graph

28 Commits

Author SHA1 Message Date
Patrick Lam b023dbd384 Eliminate unused vars reported by Intel's compiler.
reviewed by: plam
2006-02-21 15:40:18 +00:00
Patrick Lam adac22f290 Manually perform inlining & partial redundancy elimination to reduce calls
to FcValueListPtrU.
Only invoke strlen() when really necessary.
reviewed by: plam
reviewed by: plam
2005-11-22 04:46:55 +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 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 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 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 46b51147d1 Change files from ISO-Latin-1 to UTF-8 2004-12-07 01:14:46 +00:00
James Su d4d1e8bc60 Fix "contains" op for strings and langsets. 2003-05-28 01:34:38 +00:00
Keith Packard 11fec41c0e Grub through style to find weight/slant/width values when other techniques
fail
2003-05-02 01:11:53 +00:00
Tor Lillqvist daeed6e048 Changes for Windows:
On Windows with gcc (a.k.a. mingw) build as a DLL.
We don't want to hardcode the fonts.conf file location in the DLL, so we
    look up the DLL location at run-time in a DllMain() function. The
    fonts.conf location is deduced from that.
The colon can't be used as path separator on Windows, semicolon is used
    instead. File path components can be separated with either slash or
    backslash. Absolute paths can also begin with a drive letter.
Add internal function FcStrLastSlash that strrchr's the last slash, or
    backslash on Windows.
There is no link() on Windows. For atomicity checks, mkdir a lock directory
    instead.
In addition to HOME, also look for USERPROFILE.
Recognize the special font directory token WINDOWSFONTDIR, to use the
    system's font directory.
Remove the fontconfig-def.cpp that was obsolete. Add fontconfig.def(.in),
    without internal functions.
Add a fontconfig-zip(.in) script, used to build a binary distribution.
2003-03-22 21:25:34 +00:00
Keith Packard d93fb00e8d optimize string compares even more 2003-03-05 06:09:36 +00:00
Keith Packard 4bd4418ab5 Change RCS tag 2003-03-05 05:51:27 +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 b2b6903259 Make FcStrCmpIgnoreCase a bit faster 2003-02-12 18:20:04 +00:00
Keith Packard dda27aa9ee Avoid crash when $HOME is not set 2003-02-06 19:30:32 +00:00
David Dawes 45fb31aa91 632. Finish off the UTF-16 APIs in Xft, and fix the UTF-16 conversion code
in fontconfig (#A.1411, Keith Packard, Jungshik Shin).
2002-12-14 01:59:38 +00:00
Keith Packard 9dac3c5945 More complete memory tracking. Install always overwrites header files 2002-08-31 22:17:32 +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 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 82f4243f22 Switch to RFC 3066 based lang names 2002-07-06 23:47:44 +00:00
Keith Packard bc9469baad Optimize after profiling. Fix FcStrCmp to return correct sign 2002-05-29 22:07:33 +00:00
Keith Packard 179c39959c Fix autoconf build process for fontconfig 2002-05-21 17:06:22 +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