Commit Graph

82 Commits

Author SHA1 Message Date
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 7f37423d8c Replace FcObjectStaticName by FcStrStaticName. Implement serialization of
'object' table (strings pointed to by FcPatternElt->object and used as
    keys) and loading of object table from cache file if more strings are
    present in cache file than in current version of fontconfig. Hash the
    object table in memory.
2005-08-27 02:34:24 +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 414f720281 Create prototype /etc/fonts/conf.d directory with a few sample
configuration files. Deprecate use of local.conf for local
    customizations in favor of this directory based scheme which is more
    easily integrated into installation systems.
Tag FC_EMBOLDEN as a boolean variable
2005-02-28 18:56:15 +00:00
Keith Packard ca60d2b5c5 Polite typechecking for test and edit expressions. Helps catch errors in
the font configuration.
2005-01-28 23:55:14 +00:00
Keith Packard 46b51147d1 Change files from ISO-Latin-1 to UTF-8 2004-12-07 01:14:46 +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
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
Keith Packard 1f71c4d878 Add book constant for book weight 2003-05-02 01:11:09 +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 94421e4097 use FcToLower instead of tolower 2003-03-05 05:53:10 +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 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 4c0036053a Add strong/weak pattern value binding, add known charsets for automatic
lang computation
2002-06-29 20:31:02 +00:00
Keith Packard c552f59ba2 Permit empty charsets in fonts.cache files 2002-06-26 22:14:08 +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 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 2a41214a25 Add aspect ratio support to Xft and fontconfig 2002-06-02 20:52:06 +00:00
Keith Packard bc9469baad Optimize after profiling. Fix FcStrCmp to return correct sign 2002-05-29 22:07:33 +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