Commit Graph

855 Commits

Author SHA1 Message Date
Keith Packard 1d93c1752f Typo error in function name: Inverval -> interval 2007-11-03 21:56:36 -07:00
Keith Packard b868a14473 Track line numbers in sgml edit tool input.
Errors in the documentation can be hard to find unless the tool outputs the
line number where the problem exists.
2007-11-03 21:55:39 -07:00
Keith Packard 088b582a26 Clean up exported names in fontconfig.h.
Fix typo errors (Inverval indeed).
Remove FcPattern *p from FcValue (unused)
Remove spurious FcPublic from formals.
2007-11-03 21:54:49 -07:00
Keith Packard e37d10fa74 Make file_stat argument to FcDirCacheLoadFile optional.
Allow file_stat to be NULL by using a local stat structure in that case.
2007-11-03 14:16:29 -07:00
Keith Packard 2ddce88cde Document skipping of fonts from FcFileScan/FcDirScan.
FcFileScan and FcDirScan will skip fonts under direction of the
configuration and default fontconfig policy.
2007-11-03 13:44:59 -07:00
Keith Packard 5d82c4c85d Correct documentation for FcConfigUptoDate (bug 12948).
FcConfigUptoDate only checks whether files have been modified since the
configuration was created. Any changes to the configuration through the API
since then are not considered.
2007-11-03 13:26:16 -07:00
Keith Packard b607922909 Remove fcprivate.h, move the remaining macros to fcint.h.
fcprivate.h was supposed to extend the fontconfig API for the various
fontconfig utilities. Instead, just have those utilities use the internal
fcint.h header file (which they already do), removing fcprivate.h from the
installation and hence from the defacto public API.
2007-11-03 13:09:01 -07:00
Keith Packard 910db318ae Correct documentation for FcAtomicLock (Bug 12947).
FcAtomicLock can only be called once from any process.
2007-11-03 13:05:25 -07:00
Behdad Esfahbod d0e2a0f3a3 Port fonts-persian.conf to new alias syntax with binding="same"
Signed-off-by: Keith Packard <keithp@koto.keithp.com>
2007-10-26 09:56:33 -07:00
Keith Packard 681bb379de Respect "binding" attribute in <alias> entries.
This makes creating "same" aliases for renamed font families far easier.
2007-10-25 22:30:49 -07:00
Behdad Esfahbod 0602c605af Make fc-match --sort call FcFontRenderPrepare.
This makes the --sort and regular output the same for each font.
2007-10-25 21:35:45 -07:00
Keith Packard ad27687f72 Also check configDirs mtimes in FcConfigUptoDate
Checking only config files and font directories can miss changes which
affect only a configuration directory. Check those to catch any changes.
2007-10-25 21:23:36 -07:00
Keith Packard 89d6119c02 A few fixups for make distcheck 2007-10-25 15:19:14 -07:00
Keith Packard e66c65fd41 Set version numbers to 2.4.91 (2.5 RC1) 2007-10-25 15:07:54 -07:00
Keith Packard 7a1a7c0c15 Build fix for Solaris 10 with GCC.
Solaris 10 with GCC doesn't appear capable of supporting the symbol
visibility stuff, so disable it.
2007-10-25 14:36:24 -07:00
Behdad Esfahbod fc990b2e86 Update CaseFolding.txt to Unicode 5.1.0 2007-10-25 14:20:06 -07:00
Keith Packard 4ee9ca6786 Match 'ultra' on word boundaries to detect ultra bold fonts. (bug 2511)
Added FcStrContainsWord to detect strings on word boundaries.
2007-10-25 14:00:15 -07:00
Keith Packard 349182784f fontconfig needs configure option to use gnu iconv (bug 4083).
Existing Solaris workaround was broken; mis-matching values caused the test
for libiconv to always fail.
2007-10-25 01:51:38 -07:00
Keith Packard 7f46cdbb87 Ensure weight/slant values present even when style is supplied (bug 9313).
If the provided style value doesn't match any available font, fall back to
using the weight and slant values by ensuring that those are in the pattern.
2007-10-25 01:35:32 -07:00
Keith Packard 43d0454597 Distribute man source files for command line programs (bug 9678).
For systems on whch DOCBOOK is unavailable, distribute command line program
manual pages in .man format.
2007-10-25 01:26:09 -07:00
Dwayne Bailey cf3e888b71 Add/fix *.orth files for South African languages
This adds the missing orth files for Ndebele (South) (nr), Northern Sotho
(nso), Swati (ss) and Southern Sotho (st).  It also fixes the Tswana (tn)
orth file.
2007-10-25 01:16:06 -07:00
Keith Packard 28a4ea7f71 Fix parallel build in fontconfig/docs (bug 10481). 2007-10-25 01:09:11 -07:00
Keith Packard 79641a3b0c Handle UltraBlack weight.
UltraBlack is weight 950 on the CSS scale; handle this by name and value
encoding it as fontconfig weight 215.
2007-10-25 01:03:40 -07:00
Keith Packard d02f6a70f1 Oops. Left debugging printf in previous commit. 2007-10-25 01:02:58 -07:00
Keith Packard 61139cf638 Spelling errors in documentation. (bug 10879).
Thanks to David <ssdk@ispras.ru> for spotting these.
2007-10-25 00:49:19 -07:00
Keith Packard feecc86cea There is no U+1257 (bug 10899).
The Eritrean Tigrinya orthography mistakenly included this unicode value.
2007-10-25 00:46:41 -07:00
Keith Packard 4657944d0c FcInit should return FcFalse when FcInitLoadConfigAndFonts fails. (bug 10976)
Thanks to David <ssdk@ispras.ru> for spotting this error.
2007-10-25 00:41:28 -07:00
Tilman Sauerbeck 28baf72736 Store FcVendorFoundries in read-only memory.
Create fixed size strings for vendor and foundry.
2007-10-25 00:38:44 -07:00
Tilman Sauerbeck 481f6c2307 Store FcNoticeFoundries in read-only memory.
Use a single character array and a separate table of integer indices.
2007-10-25 00:36:37 -07:00
Keith Packard a72ef35ce6 Replace makealias pattern with something supported by POSIX grep (bug 11083)
The suggested replacement in the bug was not supported by GNU grep, so I
created something that should be supported everywhere (famous last words).
2007-10-25 00:22:04 -07:00
Keith Packard 369b6b5bfb Add BRAILLE PATTERN BLANK to list of blank glyphs.
Braille pattern blank is often imaged as a blank glyph.
2007-10-24 21:59:33 -07:00
Keith Packard 007cae508c Move <cachedir> elements to the end of fonts.conf.
This allows users to select alternate directories for cache files, ahead of
the 'standard' directories.
2007-10-24 21:52:56 -07:00
Keith Packard d50cfeb805 Leave generated headers out of distribution (bug 12734).
If the generated header files are included in the distribution, a build
outside of the source directory will use them. For machine-specific files,
this generates the wrong result (fcarch.h). Leaving them out of the
distribution forces them to be built.
2007-10-24 21:47:40 -07:00
Keith Packard 1bd0b5ba73 Eliminate relocations from FcCodePageRange structure (bug 10982).
FcCodePageRange was using char pointers; replace them with char arrays.
2007-10-18 09:48:31 -07:00
Keith Packard 96925b99c0 Eliminate relocations for glyph name table.
Glyph names (now used only for dingbats) were using many relocations,
causing startup latency plus per-process memory usage. Replace pointers with
table indices, shrinking table size and elimninating relocations.
2007-10-18 09:43:22 -07:00
Keith Packard bc5e8adb4d Must not insert cache into hash table before completely validating.
The cache was inserted into the hash table before the timestamps in the
cache were verified; if that verification failed, an extra pointer to the
now freed cache would be left in the hash table. FcFini would fail an
assertion as a result.
2007-10-18 09:41:00 -07:00
Keith Packard e85789a997 Place language name in constant array instead of pointer.
Constant char array of 8 bytes is the same size as a pointer plus a short
string, so this actually saves memory and eliminates a pile of relocations.
2007-10-18 08:58:14 -07:00
Keith Packard 26437d4924 FcConfigParseAndLoad doc was missing the last param.
Typo lost the last param to this function.
2007-10-18 08:56:42 -07:00
Mike FABIAN 07e646cc84 Avoid crashes if config files contain junk.
If ~/.fonts.conf contains:

  <edit mode="assign_replace" name="spacing">
     <int>mono</int>
       </edit>

fontconfig crashes:

    mfabian@magellan:~$ fc-match sans
        Fontconfig error: "~/.fonts.conf", line 46: "mono": not a valid
	integer
	    セグメンテーション違反です (core dumped)
	        mfabian@magellan:~$

Of course the above is nonsense, “mono” is no valid integer indeed.

But I think nevertheless fontconfig should not crash in that case.

The problem was caused by partially truncated expression trees caused by
parse errors -- typechecking these walked the tree without verifying the
integrity of the structure. Of course, the whole tree will be discarded
shortly after being loaded as it contained an error.
2007-10-18 05:44:28 -07:00
Hideki Yamane fa9a7448d8 Handle Japanese fonts better. (debian bug #435971)
Add some commonly available Japanese fonts to the standard aliases.
2007-10-18 05:17:36 -07:00
Keith Packard 2a3e3c442d Have fc-cache remove invalid cache files from cache directories.
Old cache file versions, or corrupted cache files should be removed when
cleaning cache directories with fc-cache. This only affects filenames which
match the fontconfig cache file format, so other files will be left alone.
2007-10-18 05:07:29 -07:00
Keith Packard 238489030a Don't use X_OK bit when checking for writable directories (bug 12438)
Some mingw versions have broken X_OK checking; instead of trying to work
around this in a system-depedent manner, simply don't bother checking for
X_OK along with W_OK as such cases are expected to be mistakes, and not
sensible access control.
2007-10-18 05:04:39 -07:00
Keith Packard 2b0d3d8af5 Verbose message about cleaning directories was imprecise
Non-existent directories are now described as 'non-existent' instead of
'unwritable'.
2007-10-18 05:01:41 -07:00
Keith Packard 50124d1e48 Improve verbose messages from fc-cache.
fc-cache would say 'skipping: %d fonts, %d dirs' or 'caching: %d fonts, %d
dirs', which could easily mislead the user. Add 'existing cache is valid' or
'new cache contents' to these messages to explain what it is doing.
2007-10-18 04:58:31 -07:00
Keith Packard e12f718f65 Remove unneeded call to access(2) in fc-cache.
This call was followed by a call to stat(2) which provided the necessary
information. This call to access(2) was necessary when cache files were
stored in the font directory as that would check for write permission
correctly.
2007-10-18 04:54:51 -07:00
Keith Packard f7da903d37 Make FC_FULLNAME include all fullname entries, elide nothing. [bug 12827]
The old policy of eliding fullname entries which matched FC_FAMILY or
FC_FAMILY + FC_STYLE meant that applications could not know what the
font foundry set as the fullname of the font. Hiding information is not
helpful.
2007-10-18 04:31:33 -07:00
Keith Packard 144ca87831 Comment about mmaping cache files was misleading. 2007-10-18 04:29:13 -07:00
Keith Packard db6f19f13b Store font directory mtime in cache file.
Instead of relying on mtime ordering between a directory and its associated
cache file, write the directory mtime into the cache file itself. This makes
cache file checks more reliable across file systems.

This change is made in a way that old programs can use new cache files, but
new programs will need new cache files.
2007-10-18 04:13:51 -07:00
Keith Packard 00268a50e8 Fix ChangeLog generation to avoid circular make dependency 2007-10-18 03:52:29 -07:00
Keith Packard 3ae9258f9e Free temporary string in FcDirCacheUnlink (Bug #11758)
In FcDirCacheUnlink(), the line

  cache_hashed = FcStrPlus (cache_dir, cache_base);

allocates memory in cache_hashed that is never free()'d before the function
exits.

Reported by Ben Combee.
2007-08-05 12:31:03 -07:00