Ting-Wei Lan
e3a15d0c6d
Update _POSIX_C_SOURCE to the latest version
...
Defining _POSIX_C_SOURCE to an old version on FreeBSD can cause C99 to
be disabled in libc.
2018-01-12 09:19:41 +01:00
Behdad Esfahbod
40ec3bbb55
Consolidate debug stuff into hb-debug.hh
...
Part of fixing https://github.com/behdad/harfbuzz/pull/605
2017-11-03 17:18:17 -04:00
Behdad Esfahbod
dbdbfe3d7b
Use nullptr instead of NULL
2017-10-15 12:11:08 +02:00
Behdad Esfahbod
e1b6d92302
Remove cast of functions to (hb_destroy_func_t)
...
Fixes https://github.com/behdad/harfbuzz/issues/474
2017-10-11 15:51:31 +02:00
Behdad Esfahbod
568a0c60e8
Remove pointless overflow check in pointer math
...
Fixes https://github.com/behdad/harfbuzz/issues/227
2016-02-18 19:31:51 +07:00
Behdad Esfahbod
b8811429b6
Fix Since tags
...
Fixes https://github.com/behdad/harfbuzz/issues/103
2015-09-03 15:53:22 +04:30
Behdad Esfahbod
2cd5323531
[bindings] Use hb_glib_blob_create() in sample
...
hb_blob_create() is considered C-only API.
2015-01-06 19:16:38 -08:00
Behdad Esfahbod
b91904a40d
[bindings] Replace deprecated allow-none with optional and nullable
2015-01-06 15:43:14 -08:00
Behdad Esfahbod
b632e7997d
Fix up gobject-introspection a bit
...
Minimal shaping works now!
2015-01-06 14:05:26 -08:00
Behdad Esfahbod
7d5e7613ce
Fail blob creation if length overflows or is too large
...
Fail if blob start plus length overflows; or if blob length
is greater than 2GB. It takes a while for fonts to get to that
size. In the mean time, it protects against bugs like this:
http://www.icu-project.org/trac/ticket/11450
Also avoids some weird issues with 32bit vs 64bit systems
as we accept length as unsigned int. As such, a length of
-1 will cause overflow on 32bit machines, but happily
accepted on a 64bit machine. Avoid that.
2014-12-18 18:22:21 -08:00
Behdad Esfahbod
73f7f8919e
Define _POSIX_C_SOURCE only if it is not defined
...
Fixes https://github.com/behdad/harfbuzz/pull/45
2014-07-09 17:17:18 -04:00
Behdad Esfahbod
2a8c49ade0
Remove unnecessary includes
2013-12-11 20:24:20 -05:00
Behdad Esfahbod
a8949df487
[introspection] Annotate Unicode / font callbacks
...
Should move these out of the public header...
We're "clean" of introspection warnings now. Remaining ones are about
graphite2 / freetype types not being introspectable.
2013-09-13 20:31:07 -04:00
Behdad Esfahbod
dfdbe7f932
[introspection] Make hb_blob_create() introspectable
2013-09-12 20:52:20 -04:00
Behdad Esfahbod
085d4291a9
[introspection] Disable constructors for now
...
Since our types are not associated with their methods, marking
constructors makes them inaccessible from bindings. Undo for now.
2013-09-12 17:14:33 -04:00
Behdad Esfahbod
288f289997
[docs/introspection] More annotations
2013-09-06 17:30:54 -04:00
Behdad Esfahbod
5f512017ba
[docs] Document a few symbols
2013-09-05 16:40:32 -04:00
Behdad Esfahbod
c3ba49b6fa
Always create sub-blobs in MEMORY_MODE_READONLY
...
This fixes a design bug with sanitize and sub-blobs that can
cause crashes. Jonathan and I found and debugged this issue
when we tested a corrupt font with the md5sum / filename:
ea395483d37af0cb933f40689ff7b60a. Two hours of intense
debugging we found out that the font has overlapping GSUB/GPOS
tables, and as such, sanitizing the second table can modify
the first one, which can cause all kinds of undefined behavior.
The correct way to fix this is to make sure sub-blobs are
always created readonly, since we consider the parent blob
to be a shared resource and can't modify it, even if it *is*
writable.
This essentially makes the READONLY_MAY_MAKE_WRITABLE mode
unused... Maybe we should simply remove / deprecate it.
2013-02-25 17:06:35 -05:00
Behdad Esfahbod
52c8d1226f
Minor
2013-01-14 13:51:46 -06:00
Behdad Esfahbod
f88d3bd7e4
Fix build with Sun compiler
2013-01-14 00:33:58 -06:00
Behdad Esfahbod
1bc1cb3603
Make source more digestable for gobject-introspection
2012-06-16 15:21:55 -04:00
Behdad Esfahbod
6220e5fc0d
Add ASSERT_POD for most objects
2012-06-06 03:30:09 -04:00
Behdad Esfahbod
0594a24484
Cleanup TRUE/FALSE vs true/false
2012-06-05 20:35:40 -04:00
Behdad Esfahbod
f06ab8a426
Better hide nil objects and make them const
2012-06-05 14:49:14 -04:00
Behdad Esfahbod
bc71ad4973
Fix atomic-int op on Apple
...
The OSAtomicAdd32Barrier operator returns the new value, we want the
old value.
2012-03-01 17:30:29 -08:00
Behdad Esfahbod
b95324cdd2
Minor
2011-09-21 16:50:39 -04:00
Behdad Esfahbod
33ccc77902
[API] Make set_user_data() functions take a replace parameter
...
We need this to set data on objects safely without worrying that some
other thread unsets it by setting it at the same time.
2011-08-09 00:43:24 +02:00
Behdad Esfahbod
c605bbbb6d
Remove C++ guards from source files
...
Where causing issues for people with MSVC.
2011-08-04 20:00:53 -04:00
Behdad Esfahbod
cc06c243d8
Streamline debugging infrastructure even more
2011-07-25 20:34:17 -04:00
Behdad Esfahbod
43ff203d8e
Use variadic macros for debugging
...
Looks *so* much nicer!
2011-07-25 17:35:24 -04:00
Behdad Esfahbod
decd4e3e16
Add sugar syntax for debug messages
...
Buffer debugging coming soon.
2011-07-25 16:47:02 -04:00
Behdad Esfahbod
b9452bfc16
Fix compiler warnings with -pedantic
2011-06-14 14:47:07 -04:00
Behdad Esfahbod
4101ca7dbb
Plug more leaks
...
All good now.
2011-05-11 14:30:56 -04:00
Behdad Esfahbod
1c9f8717eb
[API] Simplify blob API, remove lock
2011-05-06 22:59:42 -04:00
Behdad Esfahbod
a0f337a1cc
Remove unused hb_blob_try_writable_inplace()
2011-05-06 19:20:52 -04:00
Behdad Esfahbod
b81bd42951
Make hb_mutex_*() macros take a pointer
...
More intuitive.
2011-05-05 00:21:16 -04:00
Behdad Esfahbod
56eb5ad6f9
Move code around
...
Mutex (and Windows.h by extension) are fairly isolated now.
2011-05-04 19:27:37 -04:00
Behdad Esfahbod
d4141a44b9
[blob] Implement sub_blob() in terms of create()
...
Fixes problem with uninitialized sub_blob->mutex among other things.
Reported by Bradley Grainger.
2011-05-03 00:19:18 -04:00
Behdad Esfahbod
f55272ecde
Add hb_mutex_free() and use it
...
Based on patch by Bradley Grainger.
2011-05-02 20:57:28 -04:00
Behdad Esfahbod
4911062d5b
[API] Rename hb_blob_create_empty() to hb_blob_get_empty()
2011-05-02 19:36:39 -04:00
Behdad Esfahbod
5fa849b77d
[API] Add _set/get_user_data() for all objects
2011-04-27 21:46:01 -04:00
Behdad Esfahbod
47e71d9661
[object] Remove unnecessary use of macros
2011-04-27 16:41:08 -04:00
Behdad Esfahbod
8be1420f8f
[blob] Use HB_FUNC instead of __FUNCTION__
2011-04-27 16:16:43 -04:00
Behdad Esfahbod
fca368c468
Add hb_object_header_t which is the common part of all objects
...
Makes way for adding arbitrary user_data support.
2011-04-21 18:24:02 -04:00
Behdad Esfahbod
2409d5f8d7
Update Copyright headers
2011-04-21 17:14:28 -04:00
Behdad Esfahbod
c57d454acc
Rename all private sources and headers to C++ files
...
So we can liberally use the simple features of C++ that parts of the
codebase is already using.
2011-04-20 18:50:27 -04:00
Behdad Esfahbod
f19f4f9b09
Rename hb-blob.c to hb-blob.cc in preparation of more changes
2011-04-20 18:25:56 -04:00