summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Adjust color emoji config some moreBehdad Esfahbod2017-08-032-21/+35
| | | | | | Seems to work now. Either asking for family emoji, or :lang=und-zsye returns the preferred color emoji font available, or just any color emoji font if none of the preferred ones was found.
* Remove unneeded codepointsBehdad Esfahbod2017-08-021-219/+1
|
* Add more code points to und-zsye.orthAkira TAGOH2017-08-021-0/+123
|
* MinorBehdad Esfahbod2017-08-022-26/+38
|
* [fc-lang] Allow using ".." instead of "-" in rangesBehdad Esfahbod2017-08-022-1/+6
| | | | Allows copying emoji-data.txt and other Unicode data files intact.
* Add und-zsye.orth to support emoji in langAkira TAGOH2017-08-024-2/+284
|
* Add EmojiOne Mozilla fontBehdad Esfahbod2017-08-022-4/+9
|
* Add Twitter Color EmojiBehdad Esfahbod2017-08-022-0/+5
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=94551#c33
* [fc-query] Support listing named instancesBehdad Esfahbod2017-08-012-10/+38
|
* Add generic family matching for "emoji" and "math"Behdad Esfahbod2017-07-313-0/+108
| | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=94551
* Pass --pic to gperfBehdad Esfahbod2017-07-311-1/+1
|
* Fix gcc warnings with enabling libxml2Akira TAGOH2017-07-111-2/+2
|
* Bug 101726 - Sans config pulls in Microsoft Serifed fontAkira TAGOH2017-07-111-3/+2
| | | | | | | | Update 65-nonlatin.conf to have better choice of the sans-serif fonts for Chinese Patch from Joseph Wang https://bugs.freedesktop.org/show_bug.cgi?id=101726
* Add FcConfigParseAndLoadFromMemory() to load a configuration from memory.Akira TAGOH2017-07-073-75/+152
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=78452
* Add FcPatternGetWithBinding() to obtain the binding type of the value in ↵Akira TAGOH2017-07-074-9/+47
| | | | | | FcPattern. https://bugs.freedesktop.org/show_bug.cgi?id=19375
* Bump version to 2.12.42.12.4Akira TAGOH2017-07-053-4/+33
|
* Fix distcheck errorAkira TAGOH2017-07-051-1/+6
|
* Update libtool revisionAkira TAGOH2017-07-051-1/+1
|
* Treat C.UTF-8 and C.utf8 locales as built in the C library.Josselin Mouette2017-06-271-0/+2
| | | | | https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717423 https://bugs.freedesktop.org/show_bug.cgi?id=101605
* fix cross compilationHelmut Grohne2017-06-271-1/+4
| | | | | | | | | Even though fontconfig's build system tries to build edit-sgml with the build arch compiler, it gets the runes wrong and actually builds it with the host arch compiler. This patch makes it use the right compiler. Bug-Debian: https://bugs.debian.org/779461 https://bugs.freedesktop.org/show_bug.cgi?id=101554
* FcCharSetFreezeOrig(), FcCharSetFindFrozen(): use all buckets of ↵Florent Rougon2017-06-121-2/+2
| | | | | | | | | | | | | | | | | freezer->orig_hash_table As written at: https://lists.freedesktop.org/archives/fontconfig/2017-June/005929.html I think FcCharSetFreezeOrig() and FcCharSetFindFrozen() should use the % operator instead of & when computing the bucket index for freezer->orig_hash_table, otherwise at most 8 buckets among the 67 available (FC_CHAR_SET_HASH_SIZE) are used. Another way would be to change FC_CHAR_SET_HASH_SIZE to be of the form 2**n -1 (i.e., a power of two minus one). In such a case, the & and % operators would be equivalent.
* Add a testcase for Bug#131804Akira TAGOH2017-06-122-0/+140
|
* FcLangSetCompare(): fix bug when two charsets come from different "buckets"Florent Rougon2017-06-121-2/+12
| | | | | | | | | | | | | | | | | | | | | In fcLangCountrySets, it may happen that two charsets for the same language but different territories are found in different FcChar32 "buckets" (different "columns" on the same line). This is currently the case for the following pairs: mn-cn and mn-mn pap-an and pap-aw The FcLangSetCompare() code so far used to return FcLangDifferentLang instead of FcLangDifferentTerritory when comparing: an FcLangSet containing only mn-cn with one containing only mn-mn or an FcLangSet containing only pap-an with one containing only pap-aw This commit fixes this problem.
* Fix erroneous test on language id in FcLangSetPromote()Florent Rougon2017-06-091-1/+1
| | | | | | FcLangSetIndex() indicates "not found" with a non-negative return value. Return value 0 doesn't imply "not found", it rather means "language found at index 0 in fcLangCharSets".
* Fix an off-by-one error in FcLangSetIndex()Florent Rougon2017-06-091-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a bug that can be reproduced like this: - remove all languages starting with 'a' in fc-lang/Makefile.am (in ORTH's definition); - rebuild fontconfig with this change (-> new fc-lang/fclang.h); - create an FcLangSet 'ls1' that contains at least the first language from fcLangCharSets (i.e., the first *remaining* in lexicographic order); let's assume it is "ba" for the sake of this description; - create an FcLangSet 'ls2' that only contains the language "aa" (any language starting with 'a' should work as well); - check the return value of FcLangSetContains(ls1, ls2); The expected return value is FcFalse, however it is FcTrue if you use the code before this commit. What happens is that FcLangSetIndex() returns 0, because this is the index of the first slot after the not-found language "aa" in fcLangCharSets (since we removed all languages starting with 'a'). However, this index happens to be non-negative, therefore FcLangSetContainsLang() mistakenly infers that the language "aa" was found in fcLangCharSets, and thus calls FcLangSetBitGet(ls1, 0), which returns FcTrue since we've put the first remaining language "ba" in the 'ls1' language set. The "return -low;" statement previously in FcLangSetIndex() was inconsistent with the final return statement. "return -(low+1);" fixes this inconsistency as well as the incorrect behavior described above.
* fc-lang: gracefully handle the case where the last language initial is < 'z'Florent Rougon2017-06-091-0/+3
| | | | | | | | | | | | | | | | | | FcLangSetIndex() contains code like this: low = fcLangCharSetRanges[firstChar - 'a'].begin; high = fcLangCharSetRanges[firstChar - 'a'].end; /* no matches */ if (low > high) The assumption behind this test didn't hold before this commit, unless there is at least one language name that starts with 'z' (which is thankfully the case in our world :-). If the last language name in lexicographic order starts for instance with 'x', this change ensures that fcLangCharSetRanges['y' - 'a'].begin and fcLangCharSetRanges['z' - 'a'].begin are equal to NUM_LANG_CHAR_SET, in order to make the above assumption correct in all cases.
* FcCharSetHash(): use the 'numbers' values to compute the hashFlorent Rougon2017-06-071-1/+1
| | | | | | | | | | Before this commit, FcCharSetHash() repeatedly used the address of the 'numbers' array of an FcCharSet to compute the FcCharSet hash, instead of the value of each array element. This is not good for even spreading of the FcCharSet objects among the various buckets of the hash table (and should thus reduce performance). This bug appears to have been mistakenly introduced in commit cd2ec1a940888ebcbd323a8000d2fcced41ddf9e (June 2005).
* Fix the build failure when srcdir != builddir and have gperf 3.1 or later ↵Akira TAGOH2017-06-051-3/+7
| | | | installed
* Force regenerate fcobjshash.h when updating MakefileAkira TAGOH2017-06-031-4/+3
| | | | To avoid a situation of mismatching the declaration of hash function
* Bug 99360 - Fix cache file update on MinGWMasamichi Hosoda2017-06-011-0/+8
| | | | | | | | | On Windows, opened or locked files cannot be removed. Since fontconfig locked an old cache file while updating the file, fontconfig failed to replace the file with updated file on Windows. This patch makes fontconfig does not lock the old cache file while updating it on Windows.
* Fix testing PCF_CONFIG_OPTION_LONG_FAMILY_NAMES (CFLAGS need to be right)Jan Alexander Steffens (heftig)2017-06-011-7/+9
|
* Bump version to 2.12.32.12.3Akira TAGOH2017-05-313-3/+8
|
* Fix make check fail with freetype-2.7.1 and 2.8 with ↵Akira TAGOH2017-05-312-5/+18
| | | | PCF_CONFIG_OPTION_LONG_FAMILY_NAMES enabled.
* Bump version to 2.12.22.12.2Akira TAGOH2017-05-313-4/+26
|
* Update libtool revisionAkira TAGOH2017-05-311-1/+1
|
* Bug 101202 - fontconfig FTBFS if docbook-utils is installedAkira TAGOH2017-05-311-1/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=101202
* Add the description of FC_LANG envvar to the docAkira TAGOH2017-03-241-0/+4
|
* Update a bit for the changes in FreeType 2.7.1Akira TAGOH2017-03-215-2/+48
| | | | | | | | | | | | Our test case relies on the outcome of the family property from freetype though, it was changed in 2.7.1: - PCF family names are made more `colourful'; they now include the foundry and information whether they contain wide characters. For example, you no longer get `Fixed' but rather `Sony Fixed' or `Misc Fixed Wide'. https://bugs.freedesktop.org/show_bug.cgi?id=47704
* Fix the build issue on GNU/HurdAkira TAGOH2017-03-013-8/+44
| | | | | | | | | PATH_MAX isn't defined on GNU/Hurd. according to the porting guidelines (https://www.gnu.org/software/hurd/hurd/porting/guidelines.html) allocate a memory dynamically instead of relying on the length of a string with PATH_MAX. https://bugs.freedesktop.org/show_bug.cgi?id=97512
* Fix the build issue with gperf 3.1Akira TAGOH2017-02-232-2/+22
| | | | | | | To support the one of changes in gperf 3.1: * The 'len' parameter of the hash function and of the lookup function is now of type 'size_t' instead of 'unsigned int'. This makes it safe to call these functions with strings of length > 4 GB, on 64-bit machines.
* Avoid conflicts with integer width macros from TS 18661-1:2014Khem Raj2016-12-202-2/+3
| | | | | | | | | glibc 2.25+ has now defined these macros in <limits.h> https://sourceware.org/git/?p=glibc.git;a=commit;h=5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a Create an alias for FC_CHAR_WIDTH for ABI compatibility Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Fix FcCacheOffsetsValid()Akira TAGOH2016-11-141-5/+12
| | | | | | | | | | Validation fails when the FcValueList contains more than font->num. this logic was wrong because font->num contains a number of the elements in FcPatternElt but FcValue in FcValueList. This corrects 7a4a5bd7. Patch from Tobias Stoeckmann
* Update aliases for URW June 2016Masamichi Hosoda2016-09-234-13/+67
| | | | | http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=c8342b4a7b6cdcc4cb1261bf2b008f6df257b5c6 http://git.ghostscript.com/?p=urw-core35-fonts.git;a=commit;h=79bcdfb34fbce12b592cce389fa7a19da6b5b018
* Fix PostScript font alias nameMasamichi Hosoda2016-09-161-6/+6
| | | | | `Helvetica Condensed' is not PostScript base 35 fonts. `Helvetica Narrow' is PostScript base 35 fonts.
* Don't call perror() if no changes happens in errnoAkira TAGOH2016-09-071-2/+7
|
* Correct cache version info in doc/fontconfig-user.sgmlAlan Coopersmith2016-08-151-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Bump version to 2.12.12.12.1Akira TAGOH2016-08-053-4/+17
|
* Update libtool revisionAkira TAGOH2016-08-051-1/+1
|
* Properly validate offsets in cache files.Tobias Stoeckmann2016-08-051-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cache files are insufficiently validated. Even though the magic number at the beginning of the file as well as time stamps are checked, it is not verified if contained offsets are in legal ranges or are even pointers. The lack of validation allows an attacker to trigger arbitrary free() calls, which in turn allows double free attacks and therefore arbitrary code execution. Due to the conversion from offsets into pointers through macros, this even allows to circumvent ASLR protections. This attack vector allows privilege escalation when used with setuid binaries like fbterm. A user can create ~/.fonts or any other system-defined user-private font directory, run fc-cache and adjust cache files in ~/.cache/fontconfig. The execution of setuid binaries will scan these files and therefore are prone to attacks. If it's not about code execution, an endless loop can be created by letting linked lists become circular linked lists. This patch verifies that: - The file is not larger than the maximum addressable space, which basically only affects 32 bit systems. This allows out of boundary access into unallocated memory. - Offsets are always positive or zero - Offsets do not point outside file boundaries - No pointers are allowed in cache files, every "pointer or offset" field must be an offset or NULL - Iterating linked lists must not take longer than the amount of elements specified. A violation of this rule can break a possible endless loop. If one or more of these points are violated, the cache is recreated. This is current behaviour. Even though this patch fixes many issues, the use of mmap() shall be forbidden in setuid binaries. It is impossible to guarantee with these checks that a malicious user does not change cache files after verification. This should be handled in a different patch. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* Bug 96676 - Check range of FcWeightFromOpenType argumentAkira TAGOH2016-07-083-0/+37
| | | | Fix a crash issue when FcWeightFromOpenType() gets a number more than it expects.