Behdad Esfahbod [Mon, 14 Jan 2013 20:39:12 +0000 (14:39 -0600)]
Minor
Behdad Esfahbod [Mon, 14 Jan 2013 20:36:38 +0000 (14:36 -0600)]
Copy all values from pattern to font if the font doesn't have the element
Bug 59376 - FcFontRenderPrepare enhancement
Behdad Esfahbod [Thu, 10 Jan 2013 15:01:52 +0000 (09:01 -0600)]
Ensure we find the uninstalled fontconfig header
Patch from Colin Walters.
Behdad Esfahbod [Thu, 10 Jan 2013 15:00:18 +0000 (09:00 -0600)]
Resepct $NOCONFIGURE
Patch from Colin Walters.
Akira TAGOH [Thu, 10 Jan 2013 08:57:12 +0000 (17:57 +0900)]
Bump version to 2.10.91
Akira TAGOH [Thu, 10 Jan 2013 08:56:51 +0000 (17:56 +0900)]
Update the date in README properly
Behdad Esfahbod [Thu, 10 Jan 2013 07:23:07 +0000 (01:23 -0600)]
Make linker happy
Behdad Esfahbod [Thu, 10 Jan 2013 07:17:02 +0000 (01:17 -0600)]
Add atomic ops for Solaris
Patch from Raimund Steger.
Akira TAGOH [Mon, 10 Sep 2012 07:09:04 +0000 (16:09 +0900)]
Bug 29312 - RFE: feature to indicate which characters are missing to satisfy the language support
Add fc-validate to check the language coverage in a font.
Akira TAGOH [Wed, 9 Jan 2013 02:26:56 +0000 (11:26 +0900)]
Fix a typo in the manpages template
Behdad Esfahbod [Tue, 8 Jan 2013 20:51:00 +0000 (14:51 -0600)]
Add pthread test
Not enabled by default since it requires config and fonts.
Behdad Esfahbod [Tue, 8 Jan 2013 19:01:48 +0000 (13:01 -0600)]
Fix memory corruption!
In FcStrListCreate() we were increasing reference count of set,
however, if set had a const reference (which is the case for list
of languages), and with multiple threads, the const ref (-1) was
getting up to 1 and then a decrease was destroying the set. Ouch.
Here's the valgrind error, which took me quite a few hours of
running to catch:
==4464== Invalid read of size 4
==4464== at 0x4E58FF3: FcStrListNext (fcstr.c:1256)
==4464== by 0x4E3F11D: FcConfigSubstituteWithPat (fccfg.c:1508)
==4464== by 0x4E3F8F4: FcConfigSubstitute (fccfg.c:1729)
==4464== by 0x4009FA: test_match (simple-pthread-test.c:53)
==4464== by 0x400A6E: run_test_in_thread (simple-pthread-test.c:68)
==4464== by 0x507EE99: start_thread (pthread_create.c:308)
==4464== Address 0x6bc0b44 is 4 bytes inside a block of size 24 free'd
==4464== at 0x4C2A82E: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4464== by 0x4E58F84: FcStrSetDestroy (fcstr.c:1236)
==4464== by 0x4E3F0C6: FcConfigSubstituteWithPat (fccfg.c:1507)
==4464== by 0x4E3F8F4: FcConfigSubstitute (fccfg.c:1729)
==4464== by 0x4009FA: test_match (simple-pthread-test.c:53)
==4464== by 0x400A6E: run_test_in_thread (simple-pthread-test.c:68)
==4464== by 0x507EE99: start_thread (pthread_create.c:308)
Thread test is running happily now. Will add the test in a moment.
Akira TAGOH [Tue, 8 Jan 2013 07:20:28 +0000 (16:20 +0900)]
Fix a build fail on mingw
Regarding the change of
596931c8b4a7a35cbff9c33437d3cd44395d9c3f
Akira TAGOH [Tue, 8 Jan 2013 07:18:32 +0000 (16:18 +0900)]
missing header file to declare _mkdir
Akira TAGOH [Thu, 6 Dec 2012 11:01:52 +0000 (20:01 +0900)]
Bug 47705 - Using O_CLOEXEC
Behdad Esfahbod [Tue, 8 Jan 2013 02:10:14 +0000 (20:10 -0600)]
Fix pthreads setup
As reported by Raimund Steger.
Behdad Esfahbod [Mon, 7 Jan 2013 23:59:17 +0000 (17:59 -0600)]
Oops, add the actual file
Behdad Esfahbod [Mon, 7 Jan 2013 22:41:29 +0000 (16:41 -0600)]
Add 10-scale-bitmap-fonts.conf and enable by default
Akira TAGOH [Mon, 7 Jan 2013 08:55:04 +0000 (17:55 +0900)]
Clean up the unused variable
Behdad Esfahbod [Fri, 4 Jan 2013 02:33:34 +0000 (20:33 -0600)]
Remove FcInit() calls from tools
Library is supposed to automatically initialize itself. If it doesn't,
it's a bug.
Behdad Esfahbod [Fri, 4 Jan 2013 02:31:22 +0000 (20:31 -0600)]
Don't use blanks for fc-query
fc-query is supposed to be config-independent.
Akira TAGOH [Fri, 4 Jan 2013 02:29:50 +0000 (11:29 +0900)]
Missing header file for _mkdir declaration
Behdad Esfahbod [Thu, 3 Jan 2013 10:19:12 +0000 (04:19 -0600)]
Minor
Behdad Esfahbod [Thu, 3 Jan 2013 04:37:33 +0000 (22:37 -0600)]
Ugh, add Tools.mk
Behdad Esfahbod [Thu, 3 Jan 2013 02:16:55 +0000 (20:16 -0600)]
Second try to make Sun CPP happy
Behdad Esfahbod [Thu, 3 Jan 2013 02:08:40 +0000 (20:08 -0600)]
Really fix cross-compiling and building of tools this time
Behdad Esfahbod [Thu, 3 Jan 2013 01:04:17 +0000 (19:04 -0600)]
Work around Sun CPP
According to Raimund Steger:
> [...]
> diff --git a/src/Makefile.am b/src/Makefile.am
> index dc082b7..57c34a2 100644
> [...]
> +fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
> + $(AM_V_GEN) $(CPP) -I$(top_srcdir) $< | $(GREP) '^[^#]' | awk ' \
> + /CUT_OUT_BEGIN/ { no_write=1; next; }; \
> + /CUT_OUT_END/ { no_write=0; next; }; \
> + { if (!no_write) print; next; }; \
> + ' - > $@.tmp && \
> + mv -f $@.tmp $@
Sun Studio CPP seems to insert whitespace in a different way than GCC's CPP.
GCC generates in src/fcobjshash.gperf:
[...]
"family", FC_FAMILY_OBJECT
"familylang", FC_FAMILYLANG_OBJECT
[...]
Sun Studio generates:
[...]
"family" , FC_FAMILY_OBJECT
"familylang" , FC_FAMILYLANG_OBJECT
[...]
leading to:
[...]
Making all in src
gmake[2]: Entering directory `/home/rs/src/fontconfig-git/fontconfig/src'
GEN fcobjshash.gperf
GEN fcobjshash.h
Key link: " " = " ", with key set "".
1 input keys have identical hash values,
use option -D.
gmake[2]: *** [fcobjshash.h] Error 1
gmake[2]: Leaving directory `/home/rs/src/fontconfig-git/fontconfig/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/rs/src/fontconfig-git/fontconfig'
gmake: *** [all] Error 2
...maybe we could tuck in an additional sed to remove the whitespace, like:
[...]
fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
$(AM_V_GEN) $(CPP) -I$(top_srcdir) $< | \
$(SED) 's/^\s*//;s/\s*,\s*/,/;' | \
$(GREP) '^[^#]' | \
$(AWK) '/CUT_OUT_BEGIN/,/CUT_OUT_END/ { next; }; { print; };' \
> $@.tmp && \
mv -f $@.tmp $@
[...]
though I'm not sure what kind of guarantee CPP can give us/what easier option I might have missed...
Behdad Esfahbod [Thu, 3 Jan 2013 00:57:47 +0000 (18:57 -0600)]
Fix build around true/false
Behdad Esfahbod [Thu, 3 Jan 2013 00:07:13 +0000 (18:07 -0600)]
Trying to fix distcheck
Doesn't work though :(. Building docs is very fragile...
At least, if docbook is present, distcheck passes now.
Behdad Esfahbod [Wed, 2 Jan 2013 23:52:00 +0000 (17:52 -0600)]
Fix more warnings.
Linux build and mingw32 cross build warning-free now.
Behdad Esfahbod [Wed, 2 Jan 2013 23:49:41 +0000 (17:49 -0600)]
Use CC_FOR_BUILD to generate source files
Previously we were failing if CROSS_COMPILING and the generated headers
were not present. It works just fine now.
One caveat: the fix is not fully correct since config.h is being
included in the files built with CC_FOR_BUILD, but config.h has config
for the host system, not the build system. Should be fine though.
Behdad Esfahbod [Wed, 2 Jan 2013 23:35:56 +0000 (17:35 -0600)]
Fix build and warnings on win32
Behdad Esfahbod [Wed, 2 Jan 2013 08:27:57 +0000 (02:27 -0600)]
Minor
Behdad Esfahbod [Wed, 2 Jan 2013 08:19:04 +0000 (02:19 -0600)]
Fix compiler warnings
Behdad Esfahbod [Wed, 2 Jan 2013 08:06:15 +0000 (02:06 -0600)]
Remove FcSharedStr*
Behdad Esfahbod [Wed, 2 Jan 2013 07:54:38 +0000 (01:54 -0600)]
Fixup fcobjs.c
Ouch!
Behdad Esfahbod [Wed, 2 Jan 2013 07:31:34 +0000 (01:31 -0600)]
Warn about undefined/invalid attributes during config parsing
Behdad Esfahbod [Wed, 2 Jan 2013 07:09:20 +0000 (01:09 -0600)]
Make fcobjs.c thread-safe
With this, the library should be threadsafe as far as my analysis goes!
Behdad Esfahbod [Tue, 16 Oct 2012 00:35:03 +0000 (19:35 -0500)]
Make FcDirCacheDispose() threadsafe
Behdad Esfahbod [Wed, 10 Oct 2012 19:24:31 +0000 (15:24 -0400)]
Make cache hash threadsafe
This concludes my first pass at making fontconfig threadsafe. Now to
testing and actually fixing it!
Behdad Esfahbod [Tue, 9 Oct 2012 00:03:35 +0000 (20:03 -0400)]
Make random-state initialization threadsafe
Behdad Esfahbod [Tue, 9 Oct 2012 00:02:05 +0000 (20:02 -0400)]
Add a big cache lock
Not used yet.
Behdad Esfahbod [Mon, 8 Oct 2012 01:03:58 +0000 (21:03 -0400)]
Make cache refcounting threadsafe
Behdad Esfahbod [Sun, 7 Oct 2012 21:46:12 +0000 (17:46 -0400)]
Minor
Behdad Esfahbod [Sun, 7 Oct 2012 21:42:18 +0000 (17:42 -0400)]
Make FcCacheIsMmapSafe() threadsafe
Behdad Esfahbod [Sun, 7 Oct 2012 21:29:45 +0000 (17:29 -0400)]
Minor
Behdad Esfahbod [Sun, 7 Oct 2012 21:02:50 +0000 (17:02 -0400)]
Make default-FcConfig threadsafe
Behdad Esfahbod [Sun, 7 Oct 2012 20:42:36 +0000 (16:42 -0400)]
Minor
Behdad Esfahbod [Sun, 7 Oct 2012 20:37:03 +0000 (16:37 -0400)]
Refactor; contain default config in fccfg.c
Behdad Esfahbod [Sun, 7 Oct 2012 20:26:53 +0000 (16:26 -0400)]
Make FcDefaultFini() threadsafe
Behdad Esfahbod [Sun, 7 Oct 2012 20:09:35 +0000 (16:09 -0400)]
Make FcInitDebug() idempotent
Behdad Esfahbod [Sun, 7 Oct 2012 19:52:25 +0000 (15:52 -0400)]
Make FcGetDefaultLang and FcGetDefaultLangs thread-safe
Behdad Esfahbod [Sun, 7 Oct 2012 18:41:38 +0000 (14:41 -0400)]
Make refcounts, patterns, charsets, strings, and FcLang thread-safe
Behdad Esfahbod [Sun, 7 Oct 2012 18:24:28 +0000 (14:24 -0400)]
Add thread-safety primitives
Behdad Esfahbod [Sun, 7 Oct 2012 17:49:45 +0000 (13:49 -0400)]
Add build stuff for threadsafety primitives
Copied over from HarfBuzz.
Behdad Esfahbod [Sat, 6 Oct 2012 22:15:58 +0000 (18:15 -0400)]
Fix build stuff
Behdad Esfahbod [Sat, 6 Oct 2012 22:12:19 +0000 (18:12 -0400)]
Remove shared-str pool
We used to have a shared-str pool. Removed to make thread-safety
work easier. My measurements show that the extra overhead is not
significant by any means.
Behdad Esfahbod [Sat, 6 Oct 2012 21:52:39 +0000 (17:52 -0400)]
Switch .gitignore to git.mk
Behdad Esfahbod [Thu, 20 Sep 2012 18:42:31 +0000 (14:42 -0400)]
Use a static perfect hash table for object-name lookup
The hash table is generated by gperf. For runtime element types, we use
a append-only linked list.
A bit clumsy, but I think I got it right.
Behdad Esfahbod [Thu, 20 Sep 2012 18:01:47 +0000 (14:01 -0400)]
Deprecate FcName(Un)RegisterObjectTypes / FcName(Un)RegisterConstants
These never worked as intended. The problem is, if Fontconfig tries to
read config files when these new types / constants are not registered,
it errs. As a result, no defined types / constants are usable from
config files. Which makes these really useless. Xft was the only user
of this API and even there it's not really used. Just kill it.
One inch closer to thread-safety since we can fix the object-type hash
table at compile time.
Behdad Esfahbod [Wed, 2 Jan 2013 02:28:08 +0000 (20:28 -0600)]
Whitespace
Behdad Esfahbod [Wed, 2 Jan 2013 02:27:54 +0000 (20:27 -0600)]
Minor
Behdad Esfahbod [Wed, 2 Jan 2013 02:20:31 +0000 (20:20 -0600)]
Don't crash in FcPatternFormat() with NULL pattern
Behdad Esfahbod [Wed, 2 Jan 2013 02:20:12 +0000 (20:20 -0600)]
Don't crash in FcPatternDestroy with NULL pattern
Behdad Esfahbod [Wed, 2 Jan 2013 02:10:18 +0000 (20:10 -0600)]
Add NULL check
Behdad Esfahbod [Wed, 2 Jan 2013 02:09:08 +0000 (20:09 -0600)]
Refuse to set value to unsupported types during config too
Behdad Esfahbod [Wed, 2 Jan 2013 01:52:14 +0000 (19:52 -0600)]
Make FC_DBG_OBJTYPES debug messages into warnings
And remove FC_DBG_OBJTYPES since it has no use now.
Behdad Esfahbod [Tue, 1 Jan 2013 02:11:12 +0000 (20:11 -0600)]
Warn if <name target="font"> appears in <match target="pattern">
Behdad Esfahbod [Tue, 1 Jan 2013 02:00:17 +0000 (20:00 -0600)]
Adjust docs for recent changes
Behdad Esfahbod [Tue, 1 Jan 2013 01:55:37 +0000 (19:55 -0600)]
Initialize matrix during name parsing
Before:
$ fc-match sans:matrix=2 -v | grep matrix
matrix: [2 6.95183e-310; 0 0](s)
After:
$ fc-match sans:matrix=2 -v | grep matrix
matrix: [2 0; 0 1](s)
Behdad Esfahbod [Mon, 31 Dec 2012 23:21:07 +0000 (17:21 -0600)]
Make tests run on Windows
Behdad Esfahbod [Mon, 31 Dec 2012 23:20:29 +0000 (17:20 -0600)]
Enable fcarch assert checks even when FC_ARCHITECTURE is explicitly given
After all, if the asserts fail, the resulting library simply can't be
working correctly.
Behdad Esfahbod [Mon, 31 Dec 2012 23:20:12 +0000 (17:20 -0600)]
Remove unneeded stuff
Behdad Esfahbod [Mon, 31 Dec 2012 23:00:19 +0000 (17:00 -0600)]
Unbreak build when FC_ARCHITECTURE is defined
Behdad Esfahbod [Mon, 31 Dec 2012 01:08:42 +0000 (19:08 -0600)]
Don't warn if an unknown element is used in an expression
The type will be resolved at runtime...
For example, we can do this now without getting a warning:
<match target="font">
<test name="scalable" compare="eq">
<bool>false</bool>
</test>
<edit name="pixelsizefixupfactor" mode="assign">
<divide>
<name target="pattern">pixelsize</name>
<name target="font" >pixelsize</name>
</divide>
</edit>
<edit name="matrix" mode="assign">
<times>
<name>matrix</name>
<matrix>
<name>pixelsizefixupfactor</name> <double>0</double>
<double>0</double> <name>pixelsizefixupfactor</name>
</matrix>
</times>
</edit>
<edit name="size" mode="assign">
<divide>
<name>size</name>
<name>pixelsizefixupfactor</name>
</divide>
</edit>
</match>
Previously the last edit was generating:
Fontconfig warning: "/home/behdad/.local/etc/fonts/conf.d/00-scale-bitmap-fonts.conf", line 29: saw unknown, expected number
Behdad Esfahbod [Sun, 30 Dec 2012 04:58:38 +0000 (23:58 -0500)]
Allow target="font/pattern/default" in <name> elements
Based on idea from Raimund Steger.
For example, one can do something like this:
<match target="font">
<test name="scalable" compare="eq">
<bool>false</bool>
</test>
<edit name="pixelsizefixupfactor" mode="assign">
<divide>
<name target="pattern">pixelsize</name>
<name target="font" >pixelsize</name>
</divide>
</edit>
<edit name="matrix" mode="assign">
<times>
<name>matrix</name>
<matrix>
<name>pixelsizefixupfactor</name> <double>0</double>
<double>0</double> <name>pixelsizefixupfactor</name>
</matrix>
</times>
</edit>
</match>
Part of work to make bitmap font scaling possible. See thread
discussion:
http://lists.freedesktop.org/archives/fontconfig/2012-December/004498.html
Behdad Esfahbod [Sun, 30 Dec 2012 04:12:07 +0000 (23:12 -0500)]
Remove memory accounting and reporting
That belongs in tools like cairo/util/malloc-stat.so
Behdad Esfahbod [Sun, 30 Dec 2012 03:57:53 +0000 (22:57 -0500)]
Behdad Esfahbod [Sun, 30 Dec 2012 03:56:14 +0000 (22:56 -0500)]
Fix more warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:55:36 +0000 (22:55 -0500)]
Fix warning
Behdad Esfahbod [Sun, 30 Dec 2012 03:47:49 +0000 (22:47 -0500)]
Fix sign-compare warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:33:33 +0000 (22:33 -0500)]
Fix more warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:32:56 +0000 (22:32 -0500)]
Fix unused-parameter warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:11:09 +0000 (22:11 -0500)]
Fix compiler warnings
Behdad Esfahbod [Sun, 30 Dec 2012 02:39:06 +0000 (21:39 -0500)]
Parse matrices of expressions
Previously a <matrix> element could only accept four <double> literals.
It now accepts full expressions, which can in turn poke into the
pattern, do math, etc.
Behdad Esfahbod [Sun, 30 Dec 2012 01:14:07 +0000 (20:14 -0500)]
Fix typo
Ouch, this has been wrong since 2004... I guess no one uses <patelt>
stuff.
Akira TAGOH [Tue, 11 Dec 2012 09:53:57 +0000 (18:53 +0900)]
Check the system font to be initialized
config->fonts is an array and checking if config->fonts is a null
will not be useful.
Akira TAGOH [Tue, 11 Dec 2012 03:38:42 +0000 (12:38 +0900)]
Fix a memory leak
Akira TAGOH [Tue, 11 Dec 2012 03:35:02 +0000 (12:35 +0900)]
Fix a typo that accessing to the out of array
Akira TAGOH [Tue, 11 Dec 2012 03:30:05 +0000 (12:30 +0900)]
clean up
ret won't be -1 if HAVE_STRUCT_DIRENT_D_TYPE isn't defined.
Akira TAGOH [Tue, 11 Dec 2012 02:37:23 +0000 (11:37 +0900)]
Remove the dead code
Akira TAGOH [Mon, 10 Dec 2012 01:54:47 +0000 (10:54 +0900)]
Remove the duplicate null-check
Akira TAGOH [Fri, 7 Dec 2012 10:09:36 +0000 (19:09 +0900)]
Fix the wrong estimation for the memory usage information in fontconfig
Akira TAGOH [Thu, 6 Dec 2012 10:49:05 +0000 (19:49 +0900)]
Fix a typo
Akira TAGOH [Wed, 5 Dec 2012 09:13:25 +0000 (18:13 +0900)]
Do not show the deprecation warning if it is a symlink
Akira TAGOH [Fri, 30 Nov 2012 11:10:30 +0000 (20:10 +0900)]
Fix build issues on clean tree
Jon TURNEY [Wed, 28 Nov 2012 16:10:28 +0000 (16:10 +0000)]
Fix build when srcdir != builddir
When ./configure'd in a directory other than the srcdir, we need to look
in ${top_builddir)/src for the generated header fcstdint.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Akira TAGOH [Tue, 27 Nov 2012 09:25:11 +0000 (18:25 +0900)]
Fix a potability issue about stdint.h
Akira TAGOH [Mon, 26 Nov 2012 08:21:14 +0000 (17:21 +0900)]
Bump version to 2.10.2
Akira TAGOH [Tue, 20 Nov 2012 11:09:10 +0000 (20:09 +0900)]
Bug 57286 - Remove UnBatang and Baekmuk Batang from monospace in 65-nonlatin.conf
Those two fonts are serif fonts. shouldn't be added to monospace.