Commit Graph

231 Commits

Author SHA1 Message Date
Akira TAGOH 1082161ea3 Add FcRangeGetDouble()
https://bugs.freedesktop.org/show_bug.cgi?id=82876
2014-09-25 17:03:27 +09:00
Akira TAGOH f094539687 Note FcConfigSetCurrent() increases the refcount in document 2014-08-13 11:39:29 +09:00
Behdad Esfahbod ffda7c0e81 Linearly interpolate weight values
Rest of Part of https://bugs.freedesktop.org/show_bug.cgi?id=81453

Adds new API:

	FcWeightFromOpenType()
	FcWeightToOpenType()
2014-07-25 18:07:59 -04:00
Behdad Esfahbod bf9df5ada7 Change DemiLight from 65 to 55
Such that Regular is closer to Medium than to DemiLight
2014-07-25 18:07:59 -04:00
Behdad Esfahbod be6506ca04 Add FC_WEIGHT_DEMILIGHT
Part of https://bugs.freedesktop.org/show_bug.cgi?id=81453
Also hooks up FC_WEIGHT_BOOK to fcfreetype.c.
2014-07-25 16:24:26 -04:00
Behdad Esfahbod 75abdaf5c8 Deprecate FC_HASH and don't compute it
It was added without proper measurement and a fuzzy possible
use-case (font servers) in mind, but reality check shows that
this significantly slows down caching.  As such, deprecate it
and do NOT compute hash during caching.

Makes caching two to three times faster (ignoring the 2 second
delay in fc-cache).
2014-06-12 17:02:10 -04:00
Akira TAGOH fcba9ef01c Fix missing docs 2014-03-26 16:02:12 +09:00
Akira TAGOH f8ccf379eb Update doc to include the version info of `since when'
Version section was getting confused to the API's availability,
 even though it was the version the doc was genereated.
So moving it into the footer and added @SINCE@ field in the data.
2014-03-07 19:42:21 +09:00
Akira TAGOH 787619b2c7 Add a doc for FcDirCacheRescan 2014-02-06 17:15:26 +09:00
Akira TAGOH 9a4310176b Add missing doc for FcStrListFirst and fix a typo 2013-10-09 12:19:35 +09:00
W. Trevor King 2b0fca14ad doc/fccharset.fncs: Describe the map format in more detail
The previous documentation for FcCharSetFirstPage and
FcCharSetNextPage was technically accurate, but a bit terse.  I've
added an example using the returned page (root code point) and map to
give folks something concrete to work with.  I've also documented
FC_CHARSET_DONE, which wasn't mentioned at all before.
2013-09-24 11:19:28 +09:00
Akira TAGOH 7e44a0b5a8 Bug 68955 - Deprecate / remove FC_RASTERIZER 2013-09-10 17:45:11 +09:00
Akira TAGOH 77419a4dfd documented FC_HASH and FC_POSTSCRIPT_NAME 2013-04-10 11:14:39 +09:00
Akira TAGOH e96d776088 Bug 59456 - Adding a --sysroot like option to fc-cache
Add an ability to set the system root to generate the caches.
In order to do this, new APIs, FcConfigGetSysRoot() and
FcConfigSetSysRoot() is available.
2013-03-05 18:38:50 +09:00
Quentin Glidic 96220a5ed9 Use LOG_COMPILER and AM_TESTS_ENVIRONMENT
TESTS_ENVIRONMENT is deprecated and should be reserved to the user to
override the test environment

<ext>_LOG_COMPILER is meant to contain the program that runs the test
with <ext> extension
LOG_COMPILER is for extensionless tests
AM_TESTS_ENVIRONMENT is meant to set the environment for the tests

  https://bugs.freedesktop.org/show_bug.cgi?id=60192

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-02-06 19:53:36 +09:00
Akira TAGOH 20191810d1 Bug 23757 - Add mode="delete" to <edit>
Add two edit mode, "delete" and "delete_all".
what values are being deleted depends on <test> as documented.
if the target object is same to what is tested, matching value there
will be deleted. otherwise all of values in the object will be deleted.
so this would means both edit mode will not take any expressions.

e.g.

Given that the testing is always true here, the following rules:

  <match>
    <test name="foo" compare="eq">
      <string>bar</string>
    </test>
    <edit name="foo" mode="delete"/>
  </match>

will removes "bar" string from "foo" object. and:

  <match>
    <test name="foo" compare="eq">
      <string>foo</string>
    </test>
    <edit name="bar" mode="delete"/>
  </match>

will removes all of values in "bar" object.
2013-02-01 12:56:14 +09:00
Behdad Esfahbod ec5ca08c80 Bug 59379 - FC_PRGNAME
Can be used for per-application configuration.
2013-01-15 20:46:45 -06:00
Akira TAGOH 3f84695104 Bug 50497 - RFE: Add OpenType feature tags support
Add FC_FONT_FEATURES to store the feature tags to be enabled.
2013-01-15 19:40:26 -06:00
Akira TAGOH 8e8a99ae8a Bug 29312 - RFE: feature to indicate which characters are missing to satisfy the language support
Add fc-validate to check the language coverage in a font.
2013-01-09 12:21:33 +09:00
Akira TAGOH 16fd965171 Fix a typo in the manpages template 2013-01-09 11:26:56 +09:00
Behdad Esfahbod 538f1579e8 Trying to fix distcheck
Doesn't work though :(.  Building docs is very fragile...

At least, if docbook is present, distcheck passes now.
2013-01-02 18:23:55 -06:00
Behdad Esfahbod 558b3c65f9 Use CC_FOR_BUILD to generate source files
Previously we were failing if CROSS_COMPILING and the generated headers
were not present.  It works just fine now.

One caveat: the fix is not fully correct since config.h is being
included in the files built with CC_FOR_BUILD, but config.h has config
for the host system, not the build system.  Should be fine though.
2013-01-02 17:49:41 -06:00
Behdad Esfahbod ed41b23765 Switch .gitignore to git.mk 2013-01-02 00:36:12 -06:00
Behdad Esfahbod 7c0f79c5fe Deprecate FcName(Un)RegisterObjectTypes / FcName(Un)RegisterConstants
These never worked as intended.  The problem is, if Fontconfig tries to
read config files when these new types / constants are not registered,
it errs.  As a result, no defined types / constants are usable from
config files.  Which makes these really useless.  Xft was the only user
of this API and even there it's not really used.  Just kill it.

One inch closer to thread-safety since we can fix the object-type hash
table at compile time.
2013-01-01 22:55:08 -06:00
Behdad Esfahbod 424cfa1684 Adjust docs for recent changes 2012-12-31 20:00:17 -06:00
Akira TAGOH 2442d61157 Fix build issues on clean tree 2012-11-30 20:10:30 +09:00
Akira TAGOH 769306665c Bug 18726 - RFE: help write locale-specific tests
Add an example matching rule for the language specific
2012-06-22 14:30:56 +09:00
Akira TAGOH 2ec0440fb5 Fix a typo and build fail. 2012-06-12 11:02:26 +09:00
Akira TAGOH b447fc5d52 Bug 50835 - Deprecate FC_GLOBAL_ADVANCE
FC_GLOBAL_ADVANCE is deprecated. this flag is simply ignored on
freetype 2.4.5 or later.
2012-06-11 23:28:55 +09:00
Akira TAGOH fdb1155035 doc: Fix distcheck error again... 2012-06-11 18:39:37 +09:00
Akira TAGOH bbc8fb5ba7 Bug 32853 - Export API to get the default language
Add a new API FcGetDefaultLangs() to export the string sets of the default
languages.
2012-06-08 15:18:30 +09:00
Akira TAGOH 2837c63876 Bug 33644 - Fontconfig doesn't match correctly in <test>
Warn if the multiple values is set to <test>, including the case of
in <alias> because the behavior isn't intuitive since so many users
is asking for a help to get things working for their expectation.

Use multiple <match>s or <alias>es for OR operator and
multiple <test>s for AND operator.
2012-05-25 13:11:25 +09:00
Akira TAGOH 794fb0bd6a Correct the example
Enclose the string with <string> in <test>
2012-05-21 13:37:54 +09:00
Akira TAGOH 8c255fb185 Bug 20411 - fontconfig doesn't match FreeDesktop directories specs
Allows reading configuration files, fonts and cache files from
the directories where the XDG Base Directory Specification defines.

the old directories are still in the configuration files for
the backward compatibility.
2012-05-18 11:12:50 +09:00
Akira TAGOH bc4517d8e5 Bug 19128 - Handling whitespace in aliases
Add a new attribute `ignore-blanks' to <test>.
When this is set to "true", any blanks in the string will be ignored
on comparison.  This takes effects for compare="eq" or "not_eq" only.

Also changed the behavior of the comparison on <alias> too.
2012-05-14 12:06:12 +09:00
Akira TAGOH 7d65f9f514 Bug 39278 - make usage of mmap optional
Stop using mmap() if the cache file is stored on NFS.
also added FONTCONFIG_USE_MMAP environment variable to enforce the use of
or not the use of mmap(2) regardless of what the filesystem the cache files
are stored on.
2012-04-25 16:38:01 +09:00
Akira TAGOH 7587d1c99d Bug 27765 - FcMatch() returns style in wrong language
Add "namelang" object to obtain the localized name in the font regardless
of the lang object. it's applied to "familylang", "stylelang" and
"fullnamelang" alltogether. this would helps if one wants to enforce
selecting them in the specific language if any.  the default value for
the namelang object is determined from current locale.
2012-04-24 12:44:56 +09:00
Akira TAGOH 06d6b7c312 Create CACHEDIR.TAG when fc-cache is run or only when the cache directory is created at the runtime.
Also add FcCacheCreateTagFile() API to do create CACHEDIR.TAG on the cache
directory.
2012-04-23 11:26:32 +09:00
Akira TAGOH dd2a3d3520 Bug 25151 - Move cleanCacheDirectory() from fc-cache.c into
the library

Add FcDirCacheScan() API to clean up the cache files in the directory.
2012-04-18 12:55:23 +09:00
Akira TAGOH 94c2cc58a0 doc: Fix a typo of the environment variable name. 2012-04-16 20:25:52 +09:00
Akira TAGOH d3e3f4a46d doc: Add contains and not_contains operators and elements 2012-03-30 18:09:14 +09:00
Akira TAGOH e1ffb3dcd4 Get rid of the prerequisites from the sufix rules
Thanks to Adam Sampson for pointing this out.
2012-03-16 23:18:23 +09:00
Akira TAGOH 93460f93e9 Fix a build issue due to the use of non-portable variables
$< isn't supported in BSD make say. $(RM) is pre-defined in GNU make
though, not in BSD make say. so changed to check on configure if it's
pre-defined by make, otherwise set the appropriate command to $(RM).

This would be a workaround until it has the certain pre-defined value.
2012-03-16 16:34:37 +09:00
Akira TAGOH a5b609196f Revert "Fix a build fail on some environment."
This reverts commit 0fdfddf2ac.

Conflicts:

	doc/Makefile.am
2012-03-16 11:55:30 +09:00
Akira TAGOH 765b7b32d8 [doc] Update for cachedir.
<cache> element is now obsoletes and no longer used. get rid of it
from the doc and add <cachedir> instead.
2012-03-12 19:02:27 +09:00
Akira TAGOH e8bdc6df2e [doc] Update the path for cache files and the version. 2012-03-12 17:58:00 +09:00
Akira TAGOH 3b142c2aae Get rid of $< from Makefile.am 2012-03-11 02:12:10 +09:00
Akira TAGOH 0fdfddf2ac Fix a build fail on some environment. 2012-03-10 23:30:30 +09:00
Akira TAGOH a47899a853 Fix a build issue 2012-03-10 19:03:05 +09:00
Akira TAGOH 353f7cc691 Fix distcheck error 2012-03-09 17:33:03 +09:00
Behdad Esfahbod 3951fbaa39 Fix parallel build 2011-10-05 15:12:48 -04:00
Behdad Esfahbod e61eba94ef Switch fc-cat to use FcPatternFormat()
Added the a builtin "fccat" to FcPatternFormat().
2011-06-20 11:55:25 -04:00
Behdad Esfahbod b5617e636c More doc typo fixes 2011-03-14 18:23:56 -03:00
Behdad Esfahbod 6c7915c105 Mark constant strings as constant
Fixes a few compiler warnings in fcxml.c and makes it clear that they
should not be freed.
2011-03-14 18:21:32 -03:00
Brad Hards 7baa20c759 Documentation fixes 2011-03-11 19:43:42 -03:00
Behdad Esfahbod e63f90ce74 Doc nit 2010-12-28 02:58:16 -06:00
Behdad Esfahbod 549c9962a4 Allow editing charset and lang in target="scan"
Merge commit 'fa269cf812ee304534b0e4c44662202496008db0'

Fixes:
Bug 31969 - Can't modify charset in target="scan"
Bug 23758 - Can't modify lang in target="scan"
2010-12-28 02:51:10 -06:00
Behdad Esfahbod 2a6b235ff6 Make most generated-files cross-compiling-safe
By simply including a copy in the tarball.

Remains fc-arch which is trickier.
2010-12-27 13:20:47 -06:00
Akira TAGOH fa269cf812 add some documents 2010-12-09 11:57:24 +09:00
Akira TAGOH 51e352a1bd add some document for range and charset. 2010-12-09 11:32:26 +09: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 52960d05eb Add new public API: FcCharSetDelChar() 2010-09-21 13:14:41 -04:00
Behdad Esfahbod 2e375b6894 More doc typo fixes 2010-02-14 20:27:22 -05:00
Behdad Esfahbod 77be30cb9f Fix doc typo 2010-02-14 20:20:00 -05:00
Behdad Esfahbod 36ae1d9563 Clarify default confdir and cachedir better.
Also remove --with-docdir.  It can be set by setting docdir variable.
2009-11-09 13:17:17 -05:00
Behdad Esfahbod 273e22c71f Hardcode /etc/fonts instead of @CONFDIR@ in docs (#22911)
We distribute the docs, so it makes little sense to distribute with
@CONFDIR@ replaced.  Until we find a better solution, I've hardcoded
/etc/fonts now.
2009-07-27 15:07:12 -04:00
Behdad Esfahbod 21384990ff [doc] Add ~/fonts.conf.d to user docs 2009-07-27 14:50:44 -04:00
Behdad Esfahbod caeea376da Document FcPatternFormat() format 2009-03-13 19:06:43 -04: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 d62b85af21 [fclang] Implement FcLangSetGetLangs() (#18846) 2009-02-15 14:13:34 -08: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 c493c3b770 [fcformat] Add support for width modifiers
One can do '%30{family}' for example.  Or '%-30{family}' for the
left-aligned version.
2009-02-15 13:40:25 -08:00
Karl Tomlinson 575ee6cddd Change FcCharSetMerge API
To only work on writable charsets.  Also, return a bool indicating whether
the merge changed the charset.

Also changes the implementation of FcCharSetMerge and FcCharSetIsSubset
2009-02-15 13:40:18 -08:00
Behdad Esfahbod 98d765a53b Cleanup all manpage.* files
Recent doc2man generates files called manpage.log.  This was breaking build.
2009-02-13 16:55:08 -08:00
Behdad Esfahbod 6bffe1a95b Add fc-scan too that runs FcFileScan/FcDirScan
This is quite similar to fc-query, but calling FcFileScan/FcDirScan instead
of FcFreeTypeQuery.
2009-02-13 16:54:06 -08:00
Behdad Esfahbod 25a09eb9bf Don't use FcCharSetCopy in FcCharSetMerge
The Copy function is actually a ref, not real copy.
2009-02-13 16:54:06 -08:00
Behdad Esfahbod d230cf144f Make FcCharSetMerge() public
That's needed for apps to be abled to do pruning themselves without
the performance penalty of recreating new charsets all the time.
2009-02-13 16:54:05 -08:00
Behdad Esfahbod 3b725d0a31 [doc] Note that fontset returned by FcConfigGetFonts should not be modified 2009-02-13 16:54:05 -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
Alexey Khoroshilov 6ca36812b4 Use human-readable file names in the docs (bug #16278) 2009-02-13 16:54:02 -08:00
Behdad Esfahbod 1c7f4de80c Fix two more doc typos 2009-02-13 16:54:00 -08:00
Behdad Esfahbod 8072f4b130 Document how to free return value of FcNameUnparse() 2009-02-13 16:54:00 -08:00
Behdad Esfahbod 241fbde1ab Add FcConfigReference() (#17124) 2009-02-13 16:53:59 -08:00
Behdad Esfahbod 03dcaaa08f Document when config can be NULL (#17105)
Note that this also fixes a bug with FcFontList() where previously
it was NOT checking whether the config is up-to-date.  May want to
keep the old behavior and document that ScanInterval is essentially
unused internally (FcFontSetList uses it, but we can remove that
too).
2009-02-13 16:53:59 -08:00
Behdad Esfahbod 74e16ceeea Fix docs re 'orig' argument of FcPatternBuild and family
Now call it 'p' or 'pattern', since it's modified in place.
There is no copying.
2009-02-13 16:53:57 -08:00
Behdad Esfahbod bb65f58f63 [doc] Fix signature of FcConfigHome()
We should write a test to automatically cross-check signatures
from public headers to docs.
2009-02-13 16:53:57 -08:00
Behdad Esfahbod e690fbb20e Get rid of $Id$ tags 2009-02-13 16:53:57 -08:00
Behdad Esfahbod 3042050954 [doc] Document that a zero rescanInterval disables automatic checks (#17103) 2009-02-13 16:53:57 -08:00
Behdad Esfahbod 41fc0fe68d Add FcPatternFilter() (#13016) 2009-02-13 16:53:56 -08:00
Behdad Esfahbod e6f14d3c51 [doc] Add const decorator for FcPatternDuplicate() 2009-02-13 16:53:56 -08:00
Behdad Esfahbod 77c0d8bce8 Add fc-query (#13019) 2009-02-13 16:53:56 -08:00
Behdad Esfahbod 2e08e0f243 [doc] Fix signatures of FcPatternGetFTFace and FcPatternGetLangSet (#16272) 2009-02-13 16:53:55 -08:00
Behdad Esfahbod b21bea3731 [doc] Fix inaccuracy in FcFontRenderPrepare docs (#16985) 2009-02-13 16:53:54 -08:00
Benjamin Close f7364e6273 Remove build manpage logfile if it exists 2009-02-12 10:23:40 +10:30
Alexey Khoroshilov 0faca4ff82 Fix FcStrDirname documentation. (bug 16068)
Description of FcStrDirname is absent in the official documentation of
fontconfig-2.5.92. At the same time the source documentation contains
description of the function.

The problem is a consequence of a misprint in the format of the source
documentation file 'fcstring.fncs'. The finish mark of description of the
previous function is absent.
2008-05-24 15:44:18 -07:00
Sylvain Pasche 53aec11107 Fontconfig options for freetype sub-pixel filter configuration
David Turner has modified FreeType to be able to render sub-pixel decimated
glyphs using different methods of filtering. Fontconfig needs new
configurables to support selecting these new filtering options. A patch
follows that would correspond to one available for Cairo in bug 10301.
2008-05-03 19:33:45 -07:00
Keith Packard 1315db01b6 Revert "Remove fcprivate.h, move the remaining macros to fcint.h."
This reverts commit b607922909.

Conflicts:

	src/Makefile.am

Xft still uses the macros that are in fcprivate.h. Document those macros and
include fcprivate.h in the published header files.
2007-11-13 15:48:30 -08:00
Keith Packard eaf4470a46 Document that FcConfigGetFonts returns the internal fontset (bug 13197)
FcConfigGetFonts returns the internal font set used by the library which
must not be freed by the application or 'bad things' will happen.
2007-11-13 15:16:58 -08:00
Keith Packard 3fb38716ae Document that Match calls FcFontRenderPrepare (bug 13162).
The behaviour of FcFontMatch and FcFontSetMatch is hard to understand without
knowing that they call FcFontRenderPrepare.
2007-11-13 15:11:35 -08:00
Keith Packard fab44f3cb6 Document several function return values (Bug 13145).
Several functions had no indication of what the return value would be,
mostly these were allocation failure returns.
2007-11-13 14:58:39 -08:00