Commit Graph

255 Commits

Author SHA1 Message Date
Akira TAGOH fb726e86bd Fix a typo in scalable property
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/365
2023-06-12 19:33:41 +09:00
Akira TAGOH 842f09c4f0 Fix a typo for FcCharSetDelChar doc
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/364
2023-06-08 20:21:47 +09:00
Akira TAGOH ff037052bc Fix a typo 2023-05-30 19:00:02 +09:00
Akira TAGOH e4987ef114 Remove the problematic language from code and doc 2023-05-29 22:13:23 +09:00
Akira TAGOH f0612537cb Add namedinstance property
This change allows applications to detect if a font
is a variable font and a named-instance.
If they are, namedinstance property is set to true,
otherwise false.

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/362
2023-05-25 20:12:31 +09:00
Akira TAGOH 1751596768 Add missing property descriptions
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/360
2023-05-17 14:18:52 +09:00
Akira TAGOH 963ec653a3 Change the order of the properties to the order of fontconfig cache format 2023-05-17 14:11:22 +09:00
Jean Abou Samra 222d058525
Some doc clarifications 2023-04-17 18:28:27 +02:00
Akira TAGOH 43baa9a884 Adujst indentation between programlisting in fontconfig-user.sgml
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/344
2023-01-27 14:25:11 +09:00
Akira TAGOH b54b98bb21 Add some missing constant names for weight.
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/348
2023-01-25 23:04:35 +09:00
Ondrej Balaz da1e3f35e6 Expand ~ in glob
Allow ~ home directory expansion in acceptfont and rejectfont globs.

Fixes: #347
2023-01-25 06:14:54 +09:00
Akira TAGOH 27a21ccef0 Convert tabs to spaces
This fixes broken layout on pdf.

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/343
2022-12-13 16:05:41 +09:00
Alan Coopersmith d863f67789 Bump the cache version to 8 in doc/fontconfig-user.sgml
Makes docs match code changes from commit 5d84745e72

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-12 04:13:05 +00:00
Akira TAGOH 9a6b1d6b6d Add more description for fc-conflist.1 and FcConfigFileInfoIterInit.3
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/299
2021-12-21 19:51:12 +09:00
Akira TAGOH 60ce9b695e Fix build fail when missing docbook and/or disabling doc-build
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/272
2021-03-25 21:26:12 +09:00
ratijas d243bb3f88 Fix closing tag bracket typo in doc/fontconfig-user.sgml 2020-12-17 06:03:40 +00:00
Akira TAGOH b80cd57fda Drop duplicated BUILT_SOURCES in doc/Makefile.am 2020-11-28 10:45:10 +09:00
Akira TAGOH ef28c78350 Integrate python scripts to autotools build
Recently some python scripts has been added to the build toolchain for meson build support. but we don't want to maintain multiple files for one purpose. since autotools build support will be guradually discontinued, integrating those scripts into autotools would be better.
2020-08-26 13:33:07 +00:00
Tim-Philipp Müller a5fd5dc471 meson: print configuration summary()
Fixes #249
2020-07-31 15:17:09 +01:00
Tim-Philipp Müller 57a224f51d Add Meson build system
See https://mesonbuild.com
2020-07-31 07:26:11 +00:00
Alan Coopersmith 9bc88933b2 Fix some typos/spelling errors
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-21 18:42:40 -07:00
Akira TAGOH 97d709e888 Fix a typo in doc/confdir.sgml.in
Since changes introduced by e181ab4d
2020-07-02 13:55:04 +09:00
Tim-Philipp Müller 344925fc53 doc: fix FcPatternFilter documentation
The second argument should be ARG2 not ARG1.
2020-07-01 10:49:20 +01:00
Akira TAGOH 68d021b634 Add FC_ORDER property into cache
"fontversion" used to be modified to sort out fonts as a technique.
But that lost the original purpose to do the version control between
releases.

This change adds the dedicated property into the cache.

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/226
2020-05-25 18:22:55 +09:00
Nicolas Mailhot 9c46ef4aac Use an URN for DTD ID
XML tools interpret “fonts.dtd” as a relative path.

Unfortunately, that can not work now that the configuration is spread over
multiple system-dependant directories, without a common relative path to this
file. And, an absolute path can not be defined in a system-independant way.
System independance is a requirement to share config files between systems.

Therefore, replace the broken relative path by a formal URN, that will work the
same way on all systems, without network access.

This makes the DTD registerable with commands like:
$ xmlcatalog --noout --add system \
                           "urn:fontconfig:fonts.dtd" \
                           "file:///usr/share/xml/fontconfig/fonts.dtd" \
                           /etc/xml/catalog

That enables easy config file checking:
$ xmllint --loaddtd ${config_file} >/dev/null
2020-03-28 15:01:35 +01:00
Akira TAGOH b5bcf61fe7 Use FcConfigReference/Destroy appropriately instead of FcConfigGetCurrent
This may improves to be MT-safe.

Reported at https://bugs.chromium.org/p/chromium/issues/detail?id=1004254
2019-11-01 14:44:47 +09:00
Akira TAGOH cd51cb241a Take effect sysroot functionality to the default config file
When loading the default config file with FONTCONFIG_SYSROOT,
it fails if no /etc/fonts/fonts.conf is available, even if it is
there where is based on sysroot.

To address this, FcConfig is required to determine the sysroot.
therefore, this change makes FcConfigFilename() deprecated,
use FcConfigGetFilename() instead.

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/181
2019-10-21 20:46:09 +09:00
Szunti 7172f08d42 Add missing return type for FcFontSet* functions 2019-08-21 11:45:23 +02:00
Akira TAGOH 80047ed8e8 Add FC_FONT_HAS_HINT property to see if font has hinting or not.
This may helps to enable autohint only when font doesn't have any hinting
2019-07-29 10:19:26 +00:00
Akira TAGOH dce6ed92f2 Add docs for missing properties 2019-07-23 07:00:43 +00:00
Akira TAGOH 189685365a Don't clean up pre-built docs if no docbook installed.
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/165
2019-06-21 09:56:03 +00:00
Akira TAGOH f729bc63d8 Fix a typo in the description of FcWeightFromOpenTypeDouble 2019-06-06 10:50:31 +00:00
Akira TAGOH 4ff52ffb52 Update doc for salt 2019-04-03 12:02:09 +00:00
Akira TAGOH def1d00036 Add reset-dirs element
This element removes all of fonts directories where added by
dir elements. it is useful to override fonts dirs from system
to their own dirs only.
2019-04-03 12:02:09 +00:00
Akira TAGOH a563a1802e Add new element remap-dir instead of extending dir element 2019-04-03 12:02:09 +00:00
Akira TAGOH 04f75fce0b Add FcDirCacheCreateUUID doc back to pass make check 2019-04-03 12:02:09 +00:00
Keith Packard c4324f54ee Replace UUID file mechanism with per-directory 'map' attribute [v2]
The UUID files would be placed in each font directory to provide the
unique cache name, independent of path, for that directory. The UUID
files are undesireable for a couple of reasons:

 1) They must be placed in the font directories to be useful. This
    requires modifying the font directories themselves, introducing
    potential visible timestamp changes when running multiple
    applications, and makes the cache processing inconsistent between
    applications with permission to write to the font directories and
    applications without such permission.

 2) The UUID contents were generated randomly, which makes the font
    cache not reproducible across multiple runs.

One proposed fix for 2) is to make the UUID dependent on the font
directory path, but once we do that, we can simply use the font
directory path itself as the key as the original MD5-based font cache
naming mechanism did.

The goal of the UUID file mechanism was to fix startup time of
flatpaks; as the font path names inside the flatpak did not match the
font path names in the base system, the font cache would need to be
reconstructed the first time the flatpak was launched.

The new mechanism for doing this is to allow each '<dir>' element in
the configuration include a 'map' attribute. When looking for a cache
file for a particular directory, if the directory name starts with the
contents of the <dir> element, that portion of the name will be
replaced with the value of the 'map' attribute.

Outside of the flatpak, nothing need change -- fontconfig will build
cache files using real directory names.

Inside the flatpak, the custom fonts.conf file will now include
mappings such as this:

	<dir map="/usr/share/fonts">/run/host/fonts</dir>

When scanning the directory /run/host/fonts/ttf, fontconfig will
use the name /usr/share/fonts/ttf as the source for building the cache
file name.

The existing FC_FILE replacement code used for the UUID-based
implementation continues to correctly adapt font path names seen by
applications.

v2:
	Leave FcDirCacheCreateUUID stub around to avoid removing
	public API function.

	Document 'map' attribute of <dir> element in
	fontconfig-user.sgml

	Suggested-by: Akira TAGOH <akira@tagoh.org>

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-04-03 12:02:09 +00:00
Akira TAGOH 3eca37c1e5 Fix misleading summary in docs for FcStrStrIgnoreCase
Reported by Jonathan Kew

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/146
2019-03-15 18:53:08 +09:00
Ben Wagner 40e27f5d98 Better document sysroot.
All non trivial users of FontConfig must use FcConfigGetSysRoot to
resolve file properties in patterns. In order to support sysroot the
filename in the file property must be relative to the sysroot, but the
value of the file property in a pattern is directly exposed, making it
impossible for FontConfig to resolve the filename itself transparently.
2019-02-19 00:40:32 +00:00
Akira TAGOH 2bd559f75d Add doc for description element and update fonts.dtd
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/133
2018-11-15 20:55:36 +09:00
Akira TAGOH 942db25fbc Update docs for 1aa8b700 2018-10-04 08:07:07 +00:00
Akira TAGOH 8208f99fa1 Fix the build issue with --enable-static
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/109
2018-09-03 07:24:42 +00:00
Akira TAGOH f5dd8512bd Remove .uuid when no font files exists on a directory
https://bugs.freedesktop.org/show_bug.cgi?id=106632
2018-06-11 17:03:46 +09:00
Chris Lamb f098adac54 Ensure cache checksums are deterministic
Whilst working on the Reproducible Builds[0] effort, we noticed that
fontconfig generates unreproducible cache files.

This is due to fc-cache uses the modification timestamps of each
directory in the "checksum" and "checksum_nano" members of the _FcCache
struct. This is so that it can identify which cache files are valid
and/or require regeneration.

This patch changes the behaviour of the checksum calculations to prefer
the value of the SOURCE_DATE_EPOCH[1] environment variable over the
directory's own mtime. This variable can then be exported by build
systems to ensure reproducible output.

If SOURCE_DATE_EPOCH is not set or is newer than the mtime of the
directory, the existing behaviour is unchanged.

This work was sponsored by Tails[2].

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/
 [2] https://tails.boum.org/
2018-05-16 16:06:46 +09:00
Akira TAGOH 307639cff1 Bug 43367 - RFE: iterator to peek objects in FcPattern
Add various APIs to obtain things in FcPattern through the iterator

https://bugs.freedesktop.org/show_bug.cgi?id=43367
2018-05-11 20:48:30 +09:00
Tom Anderson 730deada8c Add FONTCONFIG_SYSROOT environment variable 2018-05-05 17:57:21 +09:00
Akira TAGOH c78afa9066 Fix typo in doc
https://bugs.freedesktop.org/show_bug.cgi?id=106128
2018-04-19 11:45:45 +09:00
Behdad Esfahbod 706535e107 Add FcWeightTo/FromOpenTypeDouble()
No idea why I didn't add these as double to begin with.
2018-01-03 15:59:56 +00:00
Akira TAGOH 0378790ca3 Add missing doc of FcDirCacheCreateUUID 2017-12-18 20:04:13 +09:00
Akira TAGOH c4b2787ba4 cleanup 2017-11-20 17:37:23 +05:30