Behdad Esfahbod
dc11dd581f
Add 10-scale-bitmap-fonts.conf and enable by default
2013-01-07 16:41:50 -06:00
Akira TAGOH
ea3a353066
Clean up the unused variable
2013-01-07 17:55:04 +09:00
Behdad Esfahbod
17eda89ed2
Remove FcInit() calls from tools
...
Library is supposed to automatically initialize itself. If it doesn't,
it's a bug.
2013-01-03 20:34:41 -06:00
Behdad Esfahbod
102a4344dd
Don't use blanks for fc-query
...
fc-query is supposed to be config-independent.
2013-01-03 20:34:41 -06:00
Akira TAGOH
b6b678e71e
Missing header file for _mkdir declaration
2013-01-04 11:29:50 +09:00
Behdad Esfahbod
8e143b4ec4
Minor
2013-01-03 04:19:12 -06:00
Behdad Esfahbod
16ddb9ff31
Ugh, add Tools.mk
2013-01-02 22:37:33 -06:00
Behdad Esfahbod
86e3255118
Second try to make Sun CPP happy
2013-01-02 20:16:55 -06:00
Behdad Esfahbod
bc62c40597
Really fix cross-compiling and building of tools this time
2013-01-02 20:09:05 -06:00
Behdad Esfahbod
32c1d32cbd
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...
2013-01-02 19:04:17 -06:00
Behdad Esfahbod
b1510145e7
Fix build around true/false
2013-01-02 18:57:47 -06:00
Behdad Esfahbod
538f1579e8
Trying to fix distcheck
...
Doesn't work though :(. Building docs is very fragile...
At least, if docbook is present, distcheck passes now.
2013-01-02 18:23:55 -06:00
Behdad Esfahbod
46ab96b8fa
Fix more warnings.
...
Linux build and mingw32 cross build warning-free now.
2013-01-02 18:00:09 -06:00
Behdad Esfahbod
558b3c65f9
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.
2013-01-02 17:49:41 -06:00
Behdad Esfahbod
ec8a40d238
Fix build and warnings on win32
2013-01-02 17:35:56 -06:00
Behdad Esfahbod
5c0a4f2726
Minor
2013-01-02 02:27:57 -06:00
Behdad Esfahbod
766bed901f
Fix compiler warnings
2013-01-02 02:19:04 -06:00
Behdad Esfahbod
93fb1d4bab
Remove FcSharedStr*
2013-01-02 02:18:02 -06:00
Behdad Esfahbod
6b14378107
Fixup fcobjs.c
...
Ouch!
2013-01-02 01:54:38 -06:00
Behdad Esfahbod
6047ce7b9f
Warn about undefined/invalid attributes during config parsing
2013-01-02 01:31:34 -06:00
Behdad Esfahbod
b604f10c0c
Make fcobjs.c thread-safe
...
With this, the library should be threadsafe as far as my analysis goes!
2013-01-02 01:09:43 -06:00
Behdad Esfahbod
2ae07bbcd2
Make FcDirCacheDispose() threadsafe
2013-01-02 01:04:58 -06:00
Behdad Esfahbod
68b8ae9af8
Make cache hash threadsafe
...
This concludes my first pass at making fontconfig threadsafe. Now to
testing and actually fixing it!
2013-01-02 01:04:47 -06:00
Behdad Esfahbod
adb03b730d
Make random-state initialization threadsafe
2013-01-02 01:04:03 -06:00
Behdad Esfahbod
91dd7d28ff
Add a big cache lock
...
Not used yet.
2013-01-02 01:03:49 -06:00
Behdad Esfahbod
8d2bbb193a
Make cache refcounting threadsafe
2013-01-02 01:03:22 -06:00
Behdad Esfahbod
31ee38e541
Minor
2013-01-02 01:03:18 -06:00
Behdad Esfahbod
b8f238e49d
Make FcCacheIsMmapSafe() threadsafe
2013-01-02 01:03:06 -06:00
Behdad Esfahbod
b27a22aae9
Minor
2013-01-02 01:01:52 -06:00
Behdad Esfahbod
0552f26016
Make default-FcConfig threadsafe
2013-01-02 01:01:29 -06:00
Behdad Esfahbod
e53f5da54f
Minor
2013-01-02 00:58:52 -06:00
Behdad Esfahbod
7ae24b4554
Refactor; contain default config in fccfg.c
2013-01-02 00:58:31 -06:00
Behdad Esfahbod
32b0d88923
Make FcDefaultFini() threadsafe
2013-01-02 00:57:26 -06:00
Behdad Esfahbod
7019896c99
Make FcInitDebug() idempotent
2013-01-02 00:53:16 -06:00
Behdad Esfahbod
b97ab0c949
Make FcGetDefaultLang and FcGetDefaultLangs thread-safe
2013-01-02 00:52:14 -06:00
Behdad Esfahbod
64af9e1917
Make refcounts, patterns, charsets, strings, and FcLang thread-safe
2013-01-02 00:51:00 -06:00
Behdad Esfahbod
814871b2aa
Add thread-safety primitives
2013-01-02 00:38:36 -06:00
Behdad Esfahbod
f6d8306e56
Add build stuff for threadsafety primitives
...
Copied over from HarfBuzz.
2013-01-02 00:38:30 -06:00
Behdad Esfahbod
b53744383d
Fix build stuff
2013-01-02 00:38:18 -06:00
Behdad Esfahbod
db6d86a6c1
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.
2013-01-02 00:37:00 -06:00
Behdad Esfahbod
ed41b23765
Switch .gitignore to git.mk
2013-01-02 00:36:12 -06:00
Behdad Esfahbod
d58c31e6dc
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.
2013-01-02 00:35:39 -06:00
Behdad Esfahbod
7c0f79c5fe
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.
2013-01-01 22:55:08 -06:00
Behdad Esfahbod
1e2c0d7052
Whitespace
2013-01-01 20:28:08 -06:00
Behdad Esfahbod
a498f2f717
Minor
2013-01-01 20:27:54 -06:00
Behdad Esfahbod
8198127b25
Don't crash in FcPatternFormat() with NULL pattern
2013-01-01 20:20:31 -06:00
Behdad Esfahbod
c9581b47c4
Don't crash in FcPatternDestroy with NULL pattern
2013-01-01 20:20:12 -06:00
Behdad Esfahbod
e7d3e21632
Add NULL check
2013-01-01 20:19:57 -06:00
Behdad Esfahbod
5bb5da4c4a
Refuse to set value to unsupported types during config too
2013-01-01 20:19:57 -06:00
Behdad Esfahbod
3878a12541
Make FC_DBG_OBJTYPES debug messages into warnings
...
And remove FC_DBG_OBJTYPES since it has no use now.
2013-01-01 20:19:53 -06:00