summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 2.13.942.13.94Akira TAGOH2021-06-284-5/+65
|
* Fix score evaluation for multiple values in propertiesAkira TAGOH2021-06-285-2/+56
| | | | | | | | | | | | | | | | | | | | Sometimes fonts has multiple values in family and sub-family in order to unify other variants into one. they basically make difference in sub-family though, they also still have standalone family and sub-family. in that case, sub-family is likely to be Regular. fontconfig couldn't recognize the difference between :family=Foo:style=Regular and :family=Foo Caption:style=Regular for example because fontconfig didn't give different score on matching result for the position of multiple values in a cache. Thus, when querying a font like :family=Foo:style=Regular may results :family=Foo Caption:style=Regular. (see the test case for more details) To fix this situation, giving different score according to the position of multiple values in a cache as well as the position of multiple values in a query. Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/283
* Revert constructing fullname property from family and style propertiesAkira TAGOH2021-06-286-100/+55
| | | | | | This seems making a regression in Java. we will revisit this issue later. Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/277
* Better wording for comments in configAkira TAGOH2021-06-2515-60/+60
| | | | Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/274
* Fix potential memory leak in _get_real_paths_from_prefixmasterAlbert Astals Cid2021-04-101-2/+7
|
* Add support for XDG_DATA_DIRSAkira TAGOH2021-03-304-36/+166
| | | | | | Add dirs from XDG_DATA_DIRS when <dir prefix="xdg"> appears in fonts.conf Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/271
* ci: Update CA cert related thing for Python on WindowsAkira TAGOH2021-03-261-1/+4
|
* Fix build fail when missing docbook and/or disabling doc-buildAkira TAGOH2021-03-251-0/+3
| | | | Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/272
* Refactoring configure.ac to add <dir> element around font pathsAkira TAGOH2021-03-031-18/+12
|
* Fix missing <dir> element for WINDOWSFONTDIR in mesonAkira TAGOH2021-03-032-7/+15
| | | | | | also refactoring logic around it to reduce the redundant Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/276
* Handle absolute sysconfdir when installing symlinksHeiko Becker2021-03-031-1/+8
| | | | | | | | sysconfdir defaults to /etc when the prefix is set to /usr. But joining MESON_INSTALL_DESTDIR_PREFIX and sysconfdir when the latter is an absoulte path, results in sysconfdir only. Which might lead to an error during install because /etc/fonts/conf.d/ might already exist from an pre-existing fontconfig installation.
* Overwrite symlinks for config filesAkira TAGOH2021-03-021-2/+4
| | | | | | | | | | | In Makefile, we are trying to remove old symlinks first and then create a symlink. do the same thing in meson too. Also, the line of the exception handling for FileExistsError is meaningless as the above line is taking care of it instead and we shouldn't ignore it if os.remove and os.symlink doesn't work somehow. Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/275
* meson: fix subproject build regressionTim-Philipp Müller2021-02-181-4/+1
| | | | | | | | | | | | | | | commit ae9ac2a1 from !165 introduced a regression when fontconfig is built as a subproject. In that case we would fail to correctly construct the path to the root build dir where the meson-info subdirectory resides, instead looking for it in the fontconfig subproject subdir. This would result in FAILED: subprojects/fontconfig/src/fcobjshash.gperf errors in the cutout.py script. Instead use the @BUILD_ROOT@ substitution to get to the build root which will work correctly in either scenario.
* Fix stack use after scope in FcConfigCompareValueBen Wagner2021-02-163-1/+134
| | | | | | | | | | | | | | | | | | | Discovered by AddressSanitizer. When left_o and right_o are promoted the promoted values are placed on the stack in FcValuePromotionBuffer. The FcValuePromotionBuffers must then continue to be in scope while left_o and right_o point into their content. In 9d4e5d0f the FcValuePromotionBuffers were moved into the incorrect scope, leaving left_o and right_o pointing into an object whose lifetime has ended. This is similar to left and right which appear to have a smaller scope but are actually required to be in the larger scope. Correct this by moving the FcValuePromotionBuffers to the proper scope. Leave the left and right FcValues where they are since they are in the correct scope already. This also adds to test-conf the ability to create charset, langset, range, and matrix in patterns. This allows for a simple test which fails under AddressSanitizer before this change and passes after.
* meson: fix cross-compilation issues with gperf header file preprocessingTim-Philipp Müller2021-02-152-3/+18
| | | | | | | | | | Pass c_args to the compiler when preprocessing the gperf header file, they might contain important bits without which compilation/preprocessing might fail (e.g. with clang on Android). cc.cmd_array() does not include the c_args and we can't easily look them up from the meson.build file, so we have to retrieve from the introspection info. This is basically the Meson equivalent to commit 57103773.
* Windows: Fix symlink privilege error detectionXavier Claessens2021-02-151-1/+2
| | | | | The message is in e.args[1] and not e.args[0] at least with python 3.8. Should be more future proof like this in case it change again.
* ie.orth: Corrected; mistaken source replacedCarmina162021-01-301-1/+13
|
* Meson: Do not wrap fccache insallation scriptXavier Claessens2021-01-283-13/+1
| | | | | | | | | When passing fccache executable directly Meson does special tricks such as modifying $PATH on Windows. See: https://github.com/mesonbuild/meson/pull/8259 Fixes: #260
* Meson: Fallback to gperf subproject on all platformsXavier Claessens2021-01-263-7/+8
| | | | | | With Meson 0.56 when find_program() does not find it on the system it automatically checks if a .wrap provides it and configure the subproject.
* Fix stripping whitespace from end of family in FcPatternAddFullnameSzunti2021-01-201-1/+1
|
* meson: error out in script if gperf preprocessing failedTim-Philipp Müller2021-01-151-1/+1
|
* fccfg.c: lock_config: Fix potential memory leakJacko Dirks2021-01-131-0/+1
| | | | We would malloc for every try, never cleaning up.
* ci: add meson android aarch64 buildTim-Philipp Müller2021-01-081-0/+43
| | | | | | | Passing -Wno-pointer-bool-conversion in cross file to suppress compiler warning: src/fcfreetype.c:1373:11: address of array 'os2->achVendID' will always evaluate to 'true'
* fcformat: fix compiler warnings with clang on AndroidTim-Philipp Müller2021-01-081-2/+2
| | | | | | | | | fcformat.c:762:44: warning: expression which evaluates to zero treated as a null pointer constant of type 'FcChar8 *' (aka 'unsigned char *') [-Wnon-literal-null-conversion] if (!FcNameUnparseValue (buf, &l->value, '\0')) ^~~~ fcformat.c:769:38: warning: expression which evaluates to zero treated as a null pointer constant of type 'FcChar8 *' (aka 'unsigned char *') [-Wnon-literal-null-conversion] FcNameUnparseValueList (buf, l, '\0'); ^~~~
* Clean up test-family-matching test.Ben Wagner2021-01-071-15/+22
| | | | | | | | | | Correct the type of TestMatchPattern's 'ret' from TestResult to TestMatchResult to match the actual return type (and values assigned to it). Fix leak of TestMatchPattern's 'xml' and TestFamily's 'pat'. Simplify TestMatchPattern cleanup and ensure cleanup always happens.
* meson: remove unused stdin_wrapper.py scriptTim-Philipp Müller2021-01-073-22/+0
| | | | | Not needed any more. Used to be used with fc-case and fc-lang, but those have since been rewritten in python.
* Test all not_eq for family names.Ben Wagner2020-12-283-0/+28
| | | | | | | | | | | Any early out checks must give the same answer as FcConfigCompareValue. An accelerator was added for family names which treated all ops as if they were FcOpEqual, giving the wrong answer for other non-equivalent ops (for example FcOpContains or FcOpNotEqual). This adds a test which passes before the accelerator was introduced, fails after, and will pass again after !142 lands. This tests the all not_eq case.
* Fix closing tag bracket typo in doc/fontconfig-user.sgmlratijas2020-12-171-1/+1
|
* Check qual and compare for family testsSzunti2020-12-174-1/+248
| | | | | Fixes #267. Hash table lookups assumed qual="any" compare="eq". Add a test too.
* Fix test-conf string to integer conversion.Ben Wagner2020-12-161-11/+14
| | | | | | | | | | | | | | | | | | The test-conf build_pattern attempted to convert known constant strings into integer values. However, it did so by always converting the string value to an integer if possible and then complaining if the key wasn't of the expected type. This lead to error messages on "style": "Regular" since "Regular" was recognized as "weight". Instead, only attempt conversion from string to integer if the key is the name of an object which can take an integer type. This eliminates the spurious non-fatal errors reported when parsing test-90-synthetic.json. This also fixes an issue where the created value was given the type of the object found, but the integer field was assigned. Instead, check that the object type can take an integer and always set the value type to integer.
* Always run-test-conf, but skip if not built.Ben Wagner2020-12-152-1/+7
| | | | | | | | | | The test-conf test requires libjson-c to be available in order to be built. However, there has been no user indication that additional tests could be built if the json-c development files were available. Continue to not build test-conf if json-c is not available, but do run the test harness. The test harness is updated to SKIP the test if the test-conf binary is unavailable.
* Fix wild frees and leak of fs in test-conf.Ben Wagner2020-12-141-5/+4
| | | | | | | | | | | Reported by AddressSanitizer when running test-conf. The `query`, `result`, and `result_fs` were not initialized to NULL so could result in a wild free when first initialized. The `method` was also not initialized to NULL so comparisons could be made against random data if it had not yet been assigned. The outer `fs` was never destroyed, but is also not used, so remove.
* Fix leaks in fcxml.c, fc-match.c, and tests.Ben Wagner2020-12-144-3/+21
| | | | Fix leaks reported by AddressSanitizer when running 'make check'.
* Portable trap conditions in run-test.sh.Ben Wagner2020-12-101-2/+2
| | | | | | | | | | | | | Posix says: The condition can be EXIT, 0 (equivalent to EXIT), or a signal specified using a symbolic name, without the SIG prefix, as listed in the tables of signal names in the <signal.h> header defined in the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 13, Headers; for example, HUP, INT, QUIT, TERM. Implementations may permit names with the SIG prefix or ignore case in signal names as an extension. Remove 'SIG' from trap conditions in run-test.sh for portability.
* Fix locale dependent behaviour in run-test.shSzunti2020-12-081-2/+2
| | | | | 'stat ... | grep Modify' fails on non english locales. stat -c '%y' used in most of the places, but one exception remained.
* Add line between licenses in COPYING.Ben Wagner2020-12-071-0/+6
| | | | More clearly delineate which files are associated with each license.
* Remove abort from FcCompareSize.Ben Wagner2020-12-071-1/+0
| | | | | | | | | There doesn't appear to be a good reason to abort when 'v1' has type FcTypeRange. If there does turn out to be a good reason for this then it should be better documented and the code for handling this case removed. At worst it seems -1 should be returned as it is for other unknown types. It is possible this is left over debug code from the initial implementation.
* Skip leading whitespace in style name.Ben Wagner2020-12-041-2/+1
| | | | | | | Found by Clang-Tidy. The intent seems to have been to skip all leading whitespace in the 'style' string, but instead this loop was an odd looking no-op. Remove the 'break' from the loop so that it will continue until end of string or a non-space character is found.
* Add back fullname property at scan matching phaseAkira TAGOH2020-12-042-1/+22
| | | | | | | | | | There seems to be a lot of config files using fullname property in the world. To keep the backward compatibility, fullname property is back to a cache at the scan matching phase but will be rebuilt once it is done according to family and style property in the pattern no matter what changes one made in fullname property during that. Ref. https://bugzilla.redhat.com/show_bug.cgi?id=1902881
* Bump version to 2.13.932.13.93Akira TAGOH2020-11-284-5/+135
|
* new-version.sh: commit meson.build when bumppingAkira TAGOH2020-11-281-0/+1
|
* Update version in meson.build to sync up with configure.acAkira TAGOH2020-11-281-1/+1
|
* new-version.sh: update version in meson.buildAkira TAGOH2020-11-281-0/+2
|
* Update README that missed changes mistakenlyAkira TAGOH2020-11-283-4/+29
|
* Initialize shell variables to be sureAkira TAGOH2020-11-281-0/+2
|
* Drop duplicated BUILT_SOURCES in doc/Makefile.amAkira TAGOH2020-11-281-2/+0
|
* Increased timeout for meson tests to 600sec to make tests work on DarwinNiklas Guertler2020-11-281-1/+1
|
* Add <dir> XML tags to default values for FC_DEFAULT_FONTS on non-Darwin systemsNiklas Guertler2020-11-281-2/+2
|
* Allow multiple default system font directories in the fallback config, and ↵Niklas Guertler2020-11-284-21/+41
| | | | set them to the default dirs on Darwin.
* Add examples section in fc-match(1)Akira TAGOH2020-11-281-0/+26
| | | | Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/233