Commit Graph

41 Commits

Author SHA1 Message Date
Behdad Esfahbod 93f7c1652a Revert "[glib/ucdn/icu/ft/ot] Make returned funcs inert"
This reverts commit 5daf3bd449.

If other atexit callbacks try to destruct the objects we destruct
in atexit callbacks, bad things will happen.

I'll come up with some other way to catch premature destruction
of HB-owned objects.

Fixes https://github.com/behdad/harfbuzz/issues/618
2017-11-14 10:59:54 -08:00
Behdad Esfahbod 5daf3bd449 [glib/ucdn/icu/ft/ot] Make returned funcs inert
Such that client cannot accidentally destroy them, even though that
will be a bug in their code...
2017-10-27 16:37:11 -06:00
Behdad Esfahbod bfa7f37a73 Fix previous commit
Oops.
2017-10-27 16:03:51 -06:00
Behdad Esfahbod 8864864b62 [glib/icu/ucdn] Make the funcs object allocated on demand 2017-10-27 15:26:45 -06:00
Behdad Esfahbod ce97945440 [icu] Fix error check 2017-10-22 18:23:38 -04:00
Fredrik Roubert 41b1984be9 Switch from ICU deprecated unorm_normalize to unorm2_normalize. (#569)
The new unorm2_normalize has been public API since ICU 4.4, while
the old unorm_normalize has been deprecated since ICU 56.

Now, beginning with ICU 60, unorm_normalize will also be annotated
U_DEPRECATED and trigger the compiler -Wdeprecated-declarations warning.
2017-10-17 15:06:31 -07:00
Behdad Esfahbod dbdbfe3d7b Use nullptr instead of NULL 2017-10-15 12:11:08 +02:00
Kal Conley 5f995db103 Fix missing ICU #include
Fix compile error in hb-icu.cc when ICU configured with
U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1
2016-02-26 00:36:17 +01:00
Chris Peterson d1897a98d8 Fix hb_atomic_ptr_cmpexch -Wunused-value warnings 2015-01-03 19:46:19 -08:00
Behdad Esfahbod 903648437c Start fleshing out builtin font functions 2014-03-24 15:19:15 -07:00
Behdad Esfahbod daf0731865 [ICU] Fix includes
As reported by Steven Loomis, including uversion.h works everywhere.
2012-08-16 07:32:59 -04:00
Behdad Esfahbod 4ac4c6f2e1 Fix ICU build with older ICUs 2012-08-13 10:52:52 -04:00
Behdad Esfahbod d5045a5f40 [ICU] Use new normalizer2 compose/decompose API
It's considerably faster than the fallback implementation we had
previously!
2012-08-11 21:27:15 -04:00
Behdad Esfahbod b1914b8bd0 Fix warnings 2012-08-07 16:57:48 -04:00
Behdad Esfahbod 3a7e137a68 Dn't use gint 2012-08-03 17:23:40 -07:00
Behdad Esfahbod 21fdcee001 Add hb_unicode_combining_class_t 2012-08-01 16:28:50 -04:00
Behdad Esfahbod 378d279bbf Implement Unicode compatibility decompositions
Based on patch from Philip Withnall.
https://bugs.freedesktop.org/show_bug.cgi?id=41095
2012-07-31 21:36:16 -04:00
Behdad Esfahbod a18280a8ce Fix warnings produced by clang analyzer 2012-06-07 15:44:12 -04:00
Behdad Esfahbod 0594a24484 Cleanup TRUE/FALSE vs true/false 2012-06-05 20:35:40 -04:00
Behdad Esfahbod be4560a3b5 Undo default unicode-funcs to avoid static initializer again 2012-06-05 18:43:57 -04:00
Behdad Esfahbod f06ab8a426 Better hide nil objects and make them const 2012-06-05 14:49:14 -04:00
Behdad Esfahbod 889caa52fa [icu] Use U_FAILURE 2012-01-18 22:32:52 -05:00
Behdad Esfahbod 36a4f4a482 Replace u_strlen() with u_countChar32()
The latter is what I meant.
2012-01-18 22:16:49 -05:00
Behdad Esfahbod 299ae0c3a3 [icu] Remove glib-ism 2012-01-14 21:29:45 -05:00
Behdad Esfahbod 4c9fe88d30 [API] Make all _from_string() functions take a len parameter
Can be -1 for NUL-terminated string.  This is useful for passing parts
of a larger string to a function without having to copy or modify the
string first.

Affected functions:

	hb_tag_t hb_tag_from_string()
	hb_direction_from_string()
	hb_language_from_string()
	hb_script_from_string()
2011-08-26 09:22:12 +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 63c0ef4a07 Fix decompose() implementations to work with non-starter non-composables
Add tests.
2011-07-21 20:58:42 -04:00
Behdad Esfahbod 5157e12a55 Rename HB_UNICODE_GENERAL_CATEGORY_COMBINING_MARK to HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK
Spacing_Mark is the current Unicode long-name for this property value.
The previous name was wrongly carried from glib.
2011-07-21 00:12:33 -04:00
Behdad Esfahbod 498e1a9be6 [icu] Implement compose()/decompose() 2011-07-20 23:19:49 -04:00
Behdad Esfahbod fca0923b04 Minor 2011-07-20 22:16:13 -04:00
Behdad Esfahbod c4641723fb [API] Add compose() and decompose() unicode funcs, rename other ones
Add compose() and decompose() unicode funcs.  These implement
pair-wise canonical composition/decomposition.

The glib/icu implementations are lacking for now.  We are adding
API for this to glib, but I cannot find any useful API in ICU.
May end of implementing these in-house.

Changed all unicode_funcs callback names to remove the "_get" part.
Eg, hb_unicode_get_script_func_t is now hb_unicode_script_func_t,
and hb_unicode_get_script() is hb_unicode_script() now.
2011-07-08 00:09:31 -04:00
Behdad Esfahbod b9452bfc16 Fix compiler warnings with -pedantic 2011-06-14 14:47:07 -04:00
Behdad Esfahbod 03034acb8a [icu] Make sure we return script UNKNOWN instead of INVALID 2011-05-02 12:37:45 -04:00
Behdad Esfahbod d4bee9f813 [API] Add hb_unicode_funcs_get_default() 2011-04-27 09:38:19 -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 4d559cddbb [icu] Remove big script switch(), rely on reverse-lookup 2011-04-21 14:58:23 -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 f144a8ea84 [icu] Add two-way script conversion functions
Also optimizes the common-direction script lookup.
2011-04-20 02:54:42 -04:00
Behdad Esfahbod 5c8c1b680c Remove verbose comments 2011-04-20 02:29:22 -04:00
Behdad Esfahbod fb194b8794 unicode: Cleanup implementation 2011-04-20 02:27:39 -04:00