Commit Graph

30 Commits

Author SHA1 Message Date
Akira TAGOH 9a0fcb948f Add the ruleset description support
Trying to address what these configuration files really do.
This change allows to see the short description that mention
the purpose of the content in the config file and obtain
them through API.

This change also encourage one who want to make some UI for
the user-specific configuration management. it is the main
purpose of this change for me though.

Aside from that, I've also made programs translatable. so
we see more dependencies on the build time for gettext,
and itstool to generate PO from xml.
2017-11-07 15:24:54 +09:00
Behdad Esfahbod 2a41738fd7 [fc-match/fc-list/fc-query/fc-scan] Add --brief that is like --verbose without charset 2017-09-20 13:13:35 -07:00
Akira TAGOH 604c2a683f exit with the error code when FcNameParse() failed 2013-10-03 19:59:30 +09:00
Behdad Esfahbod 17eda89ed2 Remove FcInit() calls from tools
Library is supposed to automatically initialize itself.  If it doesn't,
it's a bug.
2013-01-03 20:34:41 -06:00
Akira TAGOH 1b692d8ab9 Fix the wrong estimation for the memory usage information in fontconfig 2012-06-01 19:06:17 +09:00
Mike Frysinger 01c833379e fc-{list,match}: constify format string
We don't free this string anywhere, so mark it const to avoid gcc warnings
and possible bugs in the future (if people did try freeing it).

fc-list.c: In function 'main':
fc-list.c:161:16: warning: pointer targets in assignment
	differ in signedness [-Wpointer-sign]

fc-match.c: In function 'main':
fc-match.c:201:13: warning: pointer targets in assignment
	differ in signedness [-Wpointer-sign]
fc-match.c:203:13: warning: pointer targets in assignment
	differ in signedness [-Wpointer-sign]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Behdad Esfahbod e0be405a1d Bug 26718 - "fc-match sans file" doesn't work
- Do not throw away FC_FILE in FcNameUnparse
- Update the builtin "fclist" format to remove FC_FILE properly instead
- Switch fc-list to use FcPatternFormat()

Note that I had previously broken fc-list and it was not showing the
file name anymore.  No one noticed that it seems!  Now fixed.
2011-06-20 11:22:17 -04:00
Behdad Esfahbod 5aaf466d38 Cleanup copyright notices to replace "Keith Packard" with "the author(s)" 2010-11-10 16:45:42 -05:00
Behdad Esfahbod 3074a73b41 Replace 'KEITH PACKARD' with 'THE AUTHOR(S)' in license text in all files 2009-03-13 17:59:28 -04:00
Behdad Esfahbod 8c31a2434d [fcformat] Add element filtering and deletion
The filtering, '%{+elt1,elt2,elt3{subexpr}}' will evaluate subexpr
with a pattern only having the listed elements from the surrounding
pattern.

The deletion, '%{-elt1,elt2,elt3{subexpr}}' will evaluate subexpr
with a the surrounding pattern sans the listed elements.
2009-02-15 13:40:26 -08:00
Behdad Esfahbod 41af588f54 [fc-match] Accept list of elements like fc-list (bug #13017)
Also make --verbose not ignore list of elements and only print those.
Update docs.
2009-02-13 16:54:07 -08:00
Behdad Esfahbod 0c93b91db0 Implement FcPatternFormat and use it in cmdline tools (bug #17107)
Still need to add more features, but the API is there, and used
by cmdline tools with -f or --format.
2009-02-13 16:54:04 -08:00
Behdad Esfahbod f26062b277 Implement fc-list --quiet ala grep (bug #17141)
Exits 1 if no fonts matched, 0 otherwise.
2009-02-13 16:54:02 -08:00
Behdad Esfahbod 1439c8f21a Handle -h and --help according to GNU Coding Standards (#17104)
Added -h instead of -?.  And upon -h and --help, write usave to stdout
instead of stdin, and return 0 instead of 1.

-? still works like before as that's what getopt returns upon unknown
arguments.
2009-02-13 16:53:59 -08:00
Behdad Esfahbod 2987409853 Implement fc-list --verbose (#13015)
A private FcObjectGetSet() is implemented that provides an
FcObjectSet of all registered elements.  FcFontSetList() is
then modified to use the object set from FcObjectGetSet() if
provided object-set is NULL.

Alternatively FcObjectGetSet() can be made public.  In that
case fc-list can use that as a base if --verbose is included,
and also add any elements provided by the user (though that has
no effect, as all elements from the cache are already registered).
Currently fc-list ignores user-provided elements if --verbose
is specified.
2009-02-13 16:53:56 -08:00
Behdad Esfahbod 317b849215 Replace RCS Id tags with the file name 2009-02-13 16:53:55 -08:00
Keith Packard f57783d2e9 Revert ABI changes from version 2.3
Accidental ABI changes and additions were discovered by looking at the
differences in fontconfig.h. All of those have been reverted.
2006-08-31 14:38:18 -07:00
Patrick Lam b023dbd384 Eliminate unused vars reported by Intel's compiler.
reviewed by: plam
2006-02-21 15:40:18 +00:00
Patrick Lam 2fa3f27e68 Prevent fc-list from escaping strings when printing them. 2005-10-21 19:47:43 +00:00
Keith Packard 46b51147d1 Change files from ISO-Latin-1 to UTF-8 2004-12-07 01:14:46 +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 18906a876a Bug 103 -- FcObjectSetBuild must be terminated by (char *) 0 as varargs are
untyped
2003-08-12 02:06:20 +00:00
Keith Packard 86b1243193 (Bug 87) Automake 1.4 doesn't do man_MAN1 correctly (Bug 88) Fix usage info
on non-long option systems (Tim Mooney)
2003-05-31 14:58:41 +00:00
Keith Packard 4bd4418ab5 Change RCS tag 2003-03-05 05:51:27 +00:00
Keith Packard 084407063d Object list to FcObjectSetBuild wasnt terminated with 0 2002-07-03 23:15:32 +00:00
Keith Packard e6099fe979 Make fc-list more useful 2002-06-30 23:45:40 +00:00
Keith Packard 80c053b725 Add better error reporting when loading config file 2002-02-28 16:51:48 +00:00
Marc Aurele La France c4bd0638c5 Warning fixes 2002-02-26 05:10:30 +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