Commit Graph

1325 Commits

Author SHA1 Message Date
Akira TAGOH 5e4ea1104c Do not update stream->pos when seeking is failed. 2012-02-22 16:50:13 +09:00
Akira TAGOH 71b14d645f Bug 46169 - Pointer error in FcConfigGlobMatch
Fix possibly accessing the invalid memory and a crash in the worst case
when the glob string is longer than the string.
2012-02-22 16:30:05 +09:00
Mike Frysinger 3abf981542 makealias: handle missing funcs better
When adding new functions, if the actual definition doesn't match the
header (say due to a typo), the regeneration of the internal headers
get confused and output bad cpp logic.  This causes gcc to barf due
to mismatched #ifdef/#endif.  Which is a pain to figure out due to
the sheer voulme of generated code.

So tweak the makealias script to detect this case and error out.
While we're here, improve the cpp output a bit to indent, include
comments, and merge similar ifdef blocks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Mike Frysinger d9c4462778 FcObjectValidType: tweak -1 checking
Newer gcc doesn't like when you switch on an enum and use a value
that isn't declared:

fcname.c: In function 'FcObjectValidType':
fcname.c:299:2: warning: case value '4294967295'
	not in enumerated type 'FcType' [-Wswitch]

So tweak the logic to avoid this warning.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Mike Frysinger 97c9506e4d fix build warnings when using --with-arch
Latest configure code will setup FC_ARCHITECTURE directly rather than
going through ARCHITECTURE, so update fcarch.h accordingly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Mike Frysinger 01c833379e fc-{list,match}: constify format string
We don't free this string anywhere, so mark it const to avoid gcc warnings
and possible bugs in the future (if people did try freeing it).

fc-list.c: In function 'main':
fc-list.c:161:16: warning: pointer targets in assignment
	differ in signedness [-Wpointer-sign]

fc-match.c: In function 'main':
fc-match.c:201:13: warning: pointer targets in assignment
	differ in signedness [-Wpointer-sign]
fc-match.c:203:13: warning: pointer targets in assignment
	differ in signedness [-Wpointer-sign]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Mike Frysinger 123d344f45 FcName{,Get}Constant: constify string input
These funcs don't modify the incoming string, so add const markings.
This is the "right thing", shouldn't change the ABI, and fixes some
gcc warnings:

fccfg.c: In function 'FcConfigEvaluate':
fccfg.c:916:2: warning: passing argument 1 of 'IA__FcNameConstant'
	discards 'const' qualifier from pointer target type [enabled by default]
fcalias.h:253:34: note: expected 'FcChar8 *' but
	argument is of type 'const FcChar8 *'

fcxml.c: In function 'FcTypecheckExpr':
fcxml.c:604:2: warning: passing argument 1 of 'IA__FcNameGetConstant'
	discards 'const' qualifier from pointer target type [enabled by default]
fcalias.h:251:37: note: expected 'FcChar8 *' but
	argument is of type 'const FcChar8 *'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Mike Frysinger da763aa77d fc-cat: fix pointer warning
Add a cast to avoid a gcc warning:

fc-cat.c: In function 'cache_print_set':
fc-cat.c:230:2: warning: pointer targets in passing argument 2
	of 'FcPatternFormat' differ in signedness [-Wpointer-sign]
../fontconfig/fontconfig.h:860:1: note:
	expected 'const FcChar8 *' but argument is of type 'char *'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Mike Frysinger 647569d029 FcStat: change to FcChar8 for first arg
This shouldn't affect the ABI, makes FcStat more like the rest of the
fontconfig API, and fixes warnings where we pass FcChar8* pointers in
to this func from other places.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Mike Frysinger e3a66c2937 delete unused variables
Newer gcc is better at detecting set-but-unused variables.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:15:58 -05:00
Mike Frysinger 6f020161e8 FcStrPlus: optimize a little
We've already calculated the lengths of these strings, so re-use those
values to avoid having to rescan the strings multiple times.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-21 14:09:51 -05:00
Akira TAGOH 2b010e46e6 Bug 44826 - <alias> must contain only a single <family>
Fix invalid syntax around alias elements in 30-metric-aliases.conf
40-nonlatin.conf and 45-latin.conf.

Patch from lolilolicon
2012-02-21 16:23:22 +09:00
Akira TAGOH 54dd481512 Get rid of the unexpected family name
UmePlus P Gothic isn't a serif font.
2012-02-21 15:43:59 +09:00
MINAMI Hirokazu 1c13fee11a Bug 43406 - typo of Japanese font name in conf.d/65-nonlatin.conf
Fix a typo.

Signed-off-by: Akira TAGOH <akira@tagoh.org>
2012-02-21 15:43:59 +09:00
Pravin Satpute a53553b4b6 Bug 43321 - Required corrections in urdu.orth file
Drop U+0629 and U+0647, and add U+06c3 to ur.orth

Signed-off-by: Akira TAGOH <akira@tagoh.org>
2012-02-21 15:40:46 +09:00
Jinkyu Yi 8c58dc2768 Bug 42423 - make default Korean font from Un to Nanum
Update 40-nonlatin.conf and 65-nonlatin.conf for Nanum korean fonts.

Signed-off-by: Akira TAGOH <akira@tagoh.org>
2012-02-21 15:32:42 +09:00
Akira TAGOH a18ca17b62 Bug 40452 - Running 'fc-match --all' core dumps when no fonts are installed
This would changes the behavior of FcFontSort().
it won't returns NULL afterward.
2012-02-21 15:29:56 +09:00
Akira TAGOH cbb6ee1662 Bug 35517 - Remove Apple Roman cmap support
Get rid of the apple roman encoding related code
2012-02-21 15:16:14 +09:00
Akira TAGOH d3c4382216 Add a missing file 2012-02-21 15:11:30 +09:00
Akira TAGOH 5582043a49 Bug 32965 - Asturian (ast-ES) language matching missing ḷḷḥ
Add U+1E24, U+1E25, U+1E36 and U+1e37 for Asturian
2012-02-21 15:08:47 +09:00
Akira TAGOH dab0afd810 Remove the unnecessary comment in ks.orth 2012-02-21 14:45:52 +09:00
Pravin Satpute dedc16733a Bug 27195 - need updates to ks.orth file
Add U+0620, U+0657, U+065f, U+0672, U+0673 and U+06c4 for Kashmiri

See http://www.unicode.org/charts/PDF/U0600.pdf

Signed-off-by: Akira TAGOH <akira@tagoh.org>
2012-02-21 14:45:52 +09:00
Akira TAGOH a1ecd679db Bug 24744 - No n'ko orthography
Add nqo.orth for N'Ko
2011-11-14 17:44:24 +09:00
Behdad Esfahbod 19651262e9 Add FcPublic to FcLangSetUnion and FcLangSetSubtract
Patch from ssp
2011-10-06 14:59:04 -04:00
Behdad Esfahbod 3951fbaa39 Fix parallel build 2011-10-05 15:12:48 -04:00
Behdad Esfahbod 082caefb6d Bug 41171 - Invalid use of memset 2011-09-24 13:52:05 -04:00
Behdad Esfahbod bf3bfa72d9 Fix stupid bug in FcFontSort()
I broke FcFontSort() language handling at the end of 2008 with this
commit: c7641f28

G-d knows how many of the lang-matching bugs in bugzilla will be
fixed by this changed...

I'm really sorry, everyone!
2011-06-22 13:06:19 -04:00
Behdad Esfahbod e61eba94ef Switch fc-cat to use FcPatternFormat()
Added the a builtin "fccat" to FcPatternFormat().
2011-06-20 11:55:25 -04:00
Behdad Esfahbod a15ac5d384 Switch fc-match to use FcPatternFormat()
Fix small bug in FcPatternFormat that was letting element-default to
consume the convertor sequence.
2011-06-20 11:32:46 -04:00
Behdad Esfahbod e0be405a1d Bug 26718 - "fc-match sans file" doesn't work
- Do not throw away FC_FILE in FcNameUnparse
- Update the builtin "fclist" format to remove FC_FILE properly instead
- Switch fc-list to use FcPatternFormat()

Note that I had previously broken fc-list and it was not showing the
file name anymore.  No one noticed that it seems!  Now fixed.
2011-06-20 11:22:17 -04:00
Behdad Esfahbod 0fcf866d44 Bug 36577 - Updating cache with no-bitmaps disables bitmap fonts...
Do not remove blacklisted fonts during cache generation.  We already
apply the blacklist when reading the caches.  The idea always has been
that the config should not affect caches built, although that design
was tarnished with the introduction of target="scan" configurations.
2011-06-20 11:07:56 -04:00
Behdad Esfahbod 0392abf791 [.gitignore] Update 2011-04-12 22:15:37 -04:00
Behdad Esfahbod 1c475d5c8c Bug 35587 - Add padding to make valgrind and glibc not hate each other 2011-03-28 16:33:12 -04:00
Behdad Esfahbod f0ee5761e1 Fix warning 2011-03-14 18:58:13 -03:00
Behdad Esfahbod c21fb9ac27 Always define FcStat as a function
Such that first arg is const char *.  We also need to make more changes
in that function as part of some other bug.
2011-03-14 18:49:21 -03:00
Behdad Esfahbod b5617e636c More doc typo fixes 2011-03-14 18:23:56 -03:00
Behdad Esfahbod 6c7915c105 Mark constant strings as constant
Fixes a few compiler warnings in fcxml.c and makes it clear that they
should not be freed.
2011-03-14 18:21:32 -03:00
Behdad Esfahbod c76ed777dd Bug 30566 - fcformat.c:interpret_enumerate() passes uninitialized idx to FcPatternGetLangSet() 2011-03-14 18:04:59 -03:00
Behdad Esfahbod ccc239b386 Bug 20113 - Uighur (ug) orthography incomplete 2011-03-14 17:28:53 -03:00
Brad Hards 7baa20c759 Documentation fixes 2011-03-11 19:43:42 -03:00
Behdad Esfahbod 9bfe7bad1c Remove --enable-maintainer-mode from autogen.sh 2011-03-11 19:40:38 -03:00
Behdad Esfahbod e1bb01bfdc Update CaseFolding.txt to Unicode 6.0 2011-01-21 16:34:52 -05:00
Behdad Esfahbod e10a42178c Remove AM_MAINTAINER_MODE
That macro is simply broken.

This was also brought up in:
Bug 32679 - fontconfig-2.8.0 does not cross compile
2011-01-03 22:18:38 -05:00
Behdad Esfahbod 0c7b867617 Fix assertion failure on le32d4
Reported by Jon TURNEY.
2011-01-02 13:25:29 -07:00
Behdad Esfahbod e63f90ce74 Doc nit 2010-12-28 02:58:16 -06:00
Behdad Esfahbod 43bf659eed Skip <range> elements with begin > end 2010-12-28 02:55:31 -06:00
Behdad Esfahbod 8c625aa01f Add <range> support for <blank> into the DTD 2010-12-28 02:52:06 -06:00
Behdad Esfahbod 549c9962a4 Allow editing charset and lang in target="scan"
Merge commit 'fa269cf812ee304534b0e4c44662202496008db0'

Fixes:
Bug 31969 - Can't modify charset in target="scan"
Bug 23758 - Can't modify lang in target="scan"
2010-12-28 02:51:10 -06:00
Behdad Esfahbod 30fd4fac9c Bump version 2010-12-28 01:28:39 -06:00
Behdad Esfahbod d1a0fca316 Make fc-arch stuff cross-compiling-safe
Fixes:
Bug 32679 - fontconfig-2.8.0 does not cross compile
Bug 25462 - Cross-compilation doesn't work
2010-12-28 01:22:34 -06:00