Commit Graph

2415 Commits

Author SHA1 Message Date
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 f555f50a20 Add 35-lang-normalize.conf
This avoids a situation where the score of lang becomes lower or equal to others
and then figures out the best font according to other properties and the order
of family names.

This typically happens only when our orthography files are the subset of lang
in patterns. i.e. fc-match :lang=en-us to match on en.orth.
In this case, the score is lower than the exact match (en to en) and the partial
match (en to en-us). thus, the result of 'fc-match :lang=en-us' isn't necessarily
same to 'fc-match :lang=en'.

So 35-lang-normalize.conf contains languages only which is available as orth
without countries and tries to update properties to match on orth exactly like:

  <match>
    <test name="lang" compare="contains">
      <string>en</string>
    </test>
    <edit name="lang" mode="assign" binding="same">
      <string>en</string>
    </edit>
  </match>

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/155
2019-07-26 07:42:36 +00:00
Akira TAGOH e2f9f28aed Fix a memory leak in FcFreeTypeQuery*()
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/170
2019-07-26 04:59:54 +00:00
Akira TAGOH 1a0391c099 Fix memory leaks 2019-07-23 10:54:36 +00:00
Akira TAGOH 957625bafa Fix the fail on fc-cache
Fallback code to UUID-based cache name was broken.

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/169
2019-07-23 10:53:16 +00:00
Akira TAGOH dce6ed92f2 Add docs for missing properties 2019-07-23 07:00:43 +00:00
Akira TAGOH e261e31731 Clean up temporary directory for tests 2019-07-23 04:18:59 +00:00
Akira TAGOH 36f46ba720 FcConfigParseAndLoad*() should returns false on config errors
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/168

Reported by Lawrence D'Oliveiro
2019-07-22 05:35:21 +00:00
Akira TAGOH 2960391699 Add English name first into a cache
In some cases, non-English languages might appears first in current order.
and when having English name with non-English language ID like Google Noto CJK TC,
English name with English language ID will be dropped due to duplicate.

This fixes that issue.
2019-07-09 06:40:29 +00:00
Akira TAGOH a57f22bf6d Fix a typo 2019-07-09 05:54:32 +00:00
Akira TAGOH cb3e6ff4d7 Improve the performance a bit 2019-07-08 13:26:49 +00:00
Akira TAGOH 322131f433 Fix a crash when running with FC_DEBUG=256
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/167
2019-07-02 04:59:52 +00:00
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