Commit Graph

8 Commits

Author SHA1 Message Date
Akira TAGOH 4d43f84188 Do not set different score to non-string values
Non-string values in a cache is supposed to choose one from them.
Due to the change of da1c9f7a, there was a regression on scoring for
matching functions.  So reverting the behavior for evaluating non-string
values to the previous one.

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/286
2021-07-08 14:47:36 +09:00
Akira TAGOH da1c9f7a6c Fix score evaluation for multiple values in properties
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
2021-06-28 08:51:58 +00:00
Ben Wagner b1e1a87512 Test all not_eq for family names.
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.
2020-12-28 11:01:38 -05:00
Ben Wagner b35c72dbc7 Always run-test-conf, but skip if not built.
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.
2020-12-15 19:44:48 -05:00
Akira TAGOH a39f30738d trivial testcase update 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
Akira TAGOH 71c9c7892a Add a test case for FcFontList 2018-11-27 09:39:15 +00:00
Akira TAGOH af964f7897 Add a test case for 90-synthetic.conf 2018-05-11 22:15:39 +09:00