Commit Graph

2353 Commits

Author SHA1 Message Date
Akira TAGOH 83840fd1fa Fix obtaining real path from pre-defined names for Win32
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/166
2019-06-26 15:28:41 +09: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
Egmont Koblinger f2d4291d12 Fix the linear interpolation during weight mapping
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/164
2019-06-19 11:55:06 +02:00
Akira TAGOH c0dc76268b Fix a typo on masking face id
Most of functionality should be moved to FcFreeTypeQueryAll()
for varfonts now though, if doing the same to FcFreeTypeQuery()
returns Null pattern because of inappropriate masking.

This might be not that big deal for varfonts support. but

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/162

Reported by Kevin Scott
2019-06-18 05:58:17 +00:00
Akira TAGOH a919700fbd Bump version to 2.13.91 2019-06-10 20:37:03 +09:00
Akira TAGOH 66b0af41b8 Fix endianness on generating MD5 cache name 2019-06-10 10:57:05 +00:00
Akira TAGOH f729bc63d8 Fix a typo in the description of FcWeightFromOpenTypeDouble 2019-06-06 10:50:31 +00:00
Akira TAGOH f40b203b3e Correct the comment for FC_LANG in fontconfig.h 2019-06-03 07:08:44 +00:00
Akira TAGOH c336b84718 fc-validate: returns an error code when missing some glyphs
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/154
2019-05-09 07:38:48 +00:00
Akira TAGOH a305e988b7 Update CaseFolding.txt to Unicode 12.1 2019-05-08 05:18:43 +00:00
Jon Turney fd2e155665
Only use test wrapper-script if host is MinGW
Currently it fails if the executable extension is .exe, but wine isn't
available (e.g. on Cygwin)

Possibly the check to use this wrapper should be even more restrictive
e.g. checking if cross-building and/or if wine is available.
2019-04-15 20:42:48 +01:00
Akira TAGOH d28681af2a Distribute archive in xz instead of bz2
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/151
2019-04-15 09:03:57 +00:00
Akira TAGOH faa11fb642 Update the test case that is looking for uuid based on host 2019-04-04 12:14:20 +00:00
Akira TAGOH 76e899700b No need to remap for uuid based 2019-04-04 11:57:13 +00:00
Akira TAGOH 7f61838435 Fallback uuid-based name to read a cache if no MD5-based cache available 2019-04-04 10:59:47 +00:00
Akira TAGOH 13d2a47d79 Fix unexpected cache name by double-slash in path 2019-04-04 06:47:34 +00:00
Akira TAGOH faec0b51db Don't show salt in debugging message if salt is null 2019-04-04 05:04:17 +00:00
Akira TAGOH 91114d18c3 Allow overriding salt with new one coming later 2019-04-03 12:02:09 +00:00
Akira TAGOH 791762d8b7 fc-cache: Show font directories to generate cache with -v 2019-04-03 12:02:09 +00:00
Akira TAGOH d1acc73f23 Oops, Terminate string 2019-04-03 12:02:09 +00:00
Akira TAGOH fc9f706ecb Add some debugging output 2019-04-03 12:02:09 +00:00
Akira TAGOH cb1df8cb28 Don't warn if path can't be converted with prefix 2019-04-03 12:02:09 +00:00
Akira TAGOH 34791c32f1 Don't share fonts and cache dir for testing
There seems a race condition on CI. so create an unique directory to avoid colision.
2019-04-03 12:02:09 +00:00
Akira TAGOH 0950f248e0 Add more data to artifacts for debugging purpose 2019-04-03 12:02:09 +00:00
Akira TAGOH ad3f335ccf Fix make check fail on MinGW again 2019-04-03 12:02:09 +00:00
Akira TAGOH 8e2c85fe81 Use alternative function for realpath on Win32 2019-04-03 12:02:09 +00:00
Akira TAGOH b1bcc0cbb2 Fix build issues on MinGW 2019-04-03 12:02:09 +00:00
Akira TAGOH 9177cf2c38 Add back if !OS_WIN32 line 2019-04-03 12:02:09 +00:00
Akira TAGOH a39f30738d trivial testcase update 2019-04-03 12:02:09 +00:00
Akira TAGOH 4ff52ffb52 Update doc for salt 2019-04-03 12:02:09 +00:00
Akira TAGOH 2e8ce63514 Add salt attribute to dir and remap-dir elements
'salt' attribute affects a cache filename to generate different name from directory name.
This is useful when sharing caches with host on sandbox and/or give a filename differently:

    <dir salt="randomdata">/usr/share/fonts</dir>
    <remap-dir as-path="/usr/share/fonts" salt="salt for /usr/share/fonts on host">/run/host/fonts</remap-dir>

Applications can read caches as-is for fonts on /run/host/fonts where is mounted from host.
and write a cache for their own fonts on /usr/share/fonts with different name.
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 5e46f15451 Fix a typo 2019-04-03 12:02:09 +00:00
Akira TAGOH acc017e672 Drop unnecessary line to include uuid.h 2019-04-03 12:02:09 +00:00
Akira TAGOH 635921e64d Update deps to run CI 2019-04-03 12:02:09 +00:00
Akira TAGOH 916cf6caa3 Update testcase 2019-04-03 12:02:09 +00:00
Akira TAGOH 2e09c62ba1 Trim the last slash
This fixes MD5 wrongly generated.
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 9d3fb5b385 Fix make check fail on run-test-conf.sh 2019-04-03 12:02:09 +00:00
Akira TAGOH 500e77a01d Drop a line to include uuid.h 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
Keith Packard 4cde12bfda Remove UUID-related tests
Remove test-hash
Remove UUID tests from run-test.sh

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-04-03 12:02:09 +00:00
Keith Packard a8c4fc5e1f Add delays to test-bz106632, check UptoDate separately
On a file system with one-second time stamps, extra delays are needed
between cache modification operations to ensure that fontconfig isn't
fooled.

And, when the timestamps are checked correctly, we need to make sure
that FcConfigUptoDate returns false whenever we change a font
directory, so separate that out from the call to reinitialize the core
config.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-04-03 12:02:09 +00:00
Keith Packard 2a81aa51f0 Remove '-u' option from run-test-conf.sh
This causes a failure when evaluating $OSTYPE on systems which do not
set that variable (everything but Msys/MinGW)

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-04-03 12:02:09 +00:00
Keith Packard 67e9c12c5a Fetch FONTCONFIG_SYSROOT in FcConfigCreate
This saves the value of FONTCONFIG_SYSROOT in the config instead of
having to call getenv every time we need this value.

This also uses 'realpath' to construct a canonical path to sysroot,
eliminating symlinks and relative path names.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-04-03 12:02:09 +00:00
Akira TAGOH 97fa77d27f Reset errno to do error handling properly
This fixes the weird behavior when running with SOURCE_DATE_EPOCH=0:

Fontconfig: SOURCE_DATE_EPOCH: strtoull: No such file or directory: 0
2019-04-03 11:49:42 +00:00
Akira TAGOH 809f040bc3 Don't test bind-mount thing for MinGW 2019-03-23 07:19:08 +00:00
Akira TAGOH 4cb490b0b9 Install wine for CI on MinGW 2019-03-23 07:05:23 +00:00
Akira TAGOH 73b300dc7c Correct configure option to cross-compile 2019-03-23 06:57:19 +00:00