Commit Graph

181 Commits

Author SHA1 Message Date
Keith Packard 5cf8c5364f I changed FcFontSetSort to respect the generic aliases better in the face
of language matching.
What I did was to ammend the strict sort order used by FcFontSort so that
    it 'satisfies' the language specified in the pattern by locating the
    best matching font supporting each pattern language and then ignores
    language in the remaining fonts for purposes of matching.
So, when asking for 'sans:lang=en', you'll get an English font first, and
    then the remaining fonts sorted with respect to the 'sans' alias alone
    -- pushing Kochi fonts ahead of other English-supporting Han fonts.
reviewed by: Owen Taylor <otaylor@redhat.com>
2004-12-14 00:12:25 +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 c5a0b541df Just remove the FC_FONTDATE -- it has locale issues and annoys redhat
multi-arch installs. Now that all X fonts are included without
    prejudice, the chances of the date being at all interesting are rather
    limited. Bug #415.
Add copyright and license
2004-12-05 05:49:20 +00:00
Keith Packard 2d9c79c049 Change default set of fonts to include all of /usr/X11R6/lib/X11/fonts (or
wherever the X fonts are located).
Document new <include>directory-name</include> semantics
add <include ignore_missing="yes">conf.d</include>
Add selectfont to ignore bitmap fonts, add comment for selectfont which
    accepts bitmap fonts.
Allow <include> configuration elements to reference directories. Parse and
    load all files of the form [0-9]* in sorted order.
2004-12-05 05:03:52 +00:00
Keith Packard e4125ef950 Check for non-empty face->family_name and face->style_name before using
those for the font. Empty names match everything. Bug #171.
2004-12-05 04:11:11 +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
Keith Packard 28f93bc412 Provided by: Lubos Lunak <l.lunak@suse.cz>
However FcConfigUptoDate() doesn't seem to work. See the attached patch.
    First there's an obvious misplaced parenthesis making it return always
    false, and second, even this call fails to detect font changes (e.g.
    adding a new font to /usr/X11R6/lib/X11/fonts/truetype). The patch
    should fix that as well. The problem seems to be triggered by my
    fonts.conf specifying only /usr/X11R6/lib/X11/fonts , and therefore
    config->configDirs doesn't include subdirs, unlike config->fontDirs.
2004-06-30 18:41:52 +00:00
Keith Packard ec0c740e39 Add FcResultOutOfMemory to provide an accurate error when FcFontSetMatch
fails in this way
Make #warning about lacking various FreeType features indicate which
    version those features appeared so users know how to fix the problem
    (Thanks to Anton Tropashko)
2004-05-29 19:32:41 +00:00
Keith Packard 55a69bd0ae Replace MIN/MAX/ABS macros which happen to have come from FreeType with
fontconfig-specific ones (FC_*)
2004-05-06 02:28:37 +00:00
Keith Packard 6ae6acf317 Add instructions for doing a release
clean up .spec file; perhaps this will be useful to somebody...
Update to 2.2.93
Make 'scanopen' static so GCC doesn't whine about lacking prototype
Add WARN_CFLAGS to pass -W flags for GCC systems
Change various char types around to match across function calls. Fixed bug
    in using available_sizes[i].height which is in pixels, not 64ths of a
    pixel.
2004-04-14 18:08:41 +00:00
Keith Packard 89e28590f3 Force FC_FOUNDRY and FC_WIDTH to always be set so that matches looking for
explicit values prefer exact matches
2004-03-06 23:44:11 +00:00
Keith Packard 02638f1ace Supplied by: mfabian@suse.de (Mike FABIAN)
Bug #260 fc-cache generates wrong spacing values for bitmap fonts Was using
    (strcmp (a,b)) instead of (!strcmp(a,b)).
2004-03-02 16:48:51 +00:00
Keith Packard 208a720f00 Ok, so I messed up the test for y_ppem. Let's see if I got it right this
time.
2004-02-11 18:53:05 +00:00
Keith Packard 4f38fa8106 Pre-2.1.5 versions of FreeType didn't include y_ppem in the FT_Bitmap_Size
record. Add a configure.in test for this and change the code
    accordingly (using height instead).
2004-02-10 18:38:58 +00:00
Keith Packard b68b96464f Add Low Saxon orthography (Kenneth Rohde Christiansen <kenneth@gnu.org>)
Oops. Left 'newest.set' unset, which would miscompute the newest file
Add FcGetPixelSize to extract correct pixel size from bdf/pcf font
    properties (which report the wrong value in current FreeType)
Don't attempt to check for empty glyphs in non-scalable fonts; they have no
    outlines...
2004-02-07 07:13:48 +00:00
Tor Lillqvist f4c52909ab fontconfig, at least as used by GIMP and/or PangoFT2 on Windows, crashes
when trying to save the cache if config->cache is NULL, which happens
    if FcConfigHome() is NULL. Guard against that by using the temp folder
    in that case.
2004-02-01 19:32:36 +00:00
Keith Packard 408dd9c07a Switch to FreeType 2.1.7 style includes. Bug #150.
reviewed by: Keith Packard <keithp@keithp.com>
2003-11-18 07:53:04 +00:00
Roozbeh Pournader 344a0e3361 Fixed a bug "FcStrtod" in handling some cases with two-byte decimal
separators.
2003-11-10 17:34:36 +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
Manish Singh 3ef32bcdc4 FcConfigAppFontClear: Support passing NULL to use default config. 2003-09-01 05:11:17 +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 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 26da2bb42f Was miscomputing end of string position for FcStrtod in locales with
multibyte separators
2003-07-09 17:04:17 +00:00
Keith Packard 656c69d6a8 Add autoconf checks for FT_Has_PS_Glyph_Names 2003-06-26 08:19:11 +00:00
Keith Packard ee1debfdd9 Allow config->cache to be null (as it is when $HOME is not set) 2003-06-26 00:39:04 +00:00
Keith Packard 79621aa5c7 Lean on autoconf to find useful FreeType functions (bug 95) 2003-06-25 23:21:03 +00:00
Tor Lillqvist 92af858f2a Trivial braino. 2003-06-15 22:45:12 +00:00
Tor Lillqvist c3941ba9c0 Fix cut&paste error. 2003-06-15 22:35:52 +00:00
Tor Lillqvist e5206dbcb3 Check also for DLL_EXPORT as indication of being built as a DLL on Win32. 2003-06-13 23:04:35 +00:00
Tor Lillqvist ee1d81259e Add share/doc directory. Add Fc*.3 man pages.
Set FC_DEFAULT_FONTS on Win32 to the WINDOWSFONTDIR token.
Move the LIBRARY and VERSION lines to the end, not to confuse libtool,
    which expects the EXPORTS line to be the first. Add FcConfigEnableHome.
2003-06-13 22:43:28 +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
James Su d4d1e8bc60 Fix "contains" op for strings and langsets. 2003-05-28 01:34:38 +00:00
Keith Packard 53183e66e5 Fix build error with BDF prop local. Free langset after query 2003-05-17 02:17:19 +00:00
Keith Packard f777f1b35d oops. Left the psfontinfo.weight matching code commented out while testing
other stuff...
2003-05-16 16:37:16 +00:00
Juliusz Chroboczek ecb7c180d0 Extract spacing from XLFD atom 2003-05-14 20:23:24 +00:00
Keith Packard 0b7a0da20b Use FcIsWidth to share code
Set FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH when scanning fonts to avoid
    misclassifying some Han fonts as monospaced.
2003-05-12 20:48:59 +00:00
Juliusz Chroboczek 65d1441df8 Reinstate SETWIDTH_NAME parsing for legacy fonts, disappeared in 1.30. 2003-05-12 09:11:10 +00:00
Juliusz Chroboczek 0f362ad520 Generate FC_SIZE and FC_DPI for legacy bitmap fonts 2003-05-12 09:04:24 +00:00
Keith Packard d47c9d6efe Add filename-based accept/reject to ammend available fonts.
change FT_ENCODING_ADOBE_CUSTOM to ft_encoding_adobe_custom for older
    FreeType releases.
2003-05-07 16:13:24 +00:00
Keith Packard 8ef6a58cb0 Add more .cvsignore entries 2003-05-04 22:58:29 +00:00
Keith Packard 7769c3213d Handle Adobe glyph names for fonts which include ADOBE_CUSTOM encodings 2003-05-04 22:53:49 +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
Keith Packard 1f71c4d878 Add book constant for book weight 2003-05-02 01:11:09 +00:00
Keith Packard 3760a63825 Add demi and book postscript weight names. Allow spaces in postscript and X
matching
2003-05-01 14:31:04 +00:00
Keith Packard 1af9b7b4d9 Typo in bitstream foundry name 2003-04-30 15:17:42 +00:00
Keith Packard 70ee88099e Debug output for unknown ps weight names. ignore italic_angle for PS fonts
as FreeType already checks that
2003-04-24 17:31:03 +00:00