Commit Graph

111 Commits

Author SHA1 Message Date
Ben Wagner b918cd8c76 Document hb_feature_t.
This documents hb_feature_t. This is motivated mostly by the ambiguity
of the units for 'start' and 'end' (clusters) and whether they are
inclusive or exclusive. This also documents that for lookup type 3 the
value is the one based index into the alternates and that in a list of
features later feature values override previous feature values with the
same tag.
2019-10-11 20:54:06 +03:30
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Ebrahim Byagowi b2ebaa9afa Remove redundant 'inline' from methods (#1483) 2018-12-16 14:08:10 -05:00
Behdad Esfahbod b89c7fd3dc Allow defining HB_USE_ATEXIT to 0
That's better use of that value than requiring extra macro HB_NO_ATEXIT
2018-11-21 12:32:48 -05:00
Behdad Esfahbod 3bf1ce748f [shaper] Rename 2018-11-14 21:08:54 -05:00
Behdad Esfahbod 1db672a5e9 [shaper] Rename 2018-11-12 16:05:46 -05:00
Behdad Esfahbod cf5fa57f00 [docs] Change section titles again
I think I like the uniform "hb-*" more.
2018-10-27 04:51:42 -07:00
Behdad Esfahbod 00cf4e5eb6 [docs] Fill in some sections 2018-10-27 04:47:41 -07:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Emil A Eklund 7112c6413c Guard free_static function definitions with macro
Add HB_USE_ATEXIT macros around free_static function definitions to
avoid unused function compiler warnings/errors.
2018-08-14 14:04:10 -07:00
Behdad Esfahbod 2663689936 Another clang bot fix 2018-08-12 18:10:59 -07:00
Behdad Esfahbod 7bd508a0c4 [lazy] Rename free() 2018-08-12 17:19:55 -07:00
Behdad Esfahbod a3b97db910 [lazy] Port more to it 2018-08-12 17:14:32 -07:00
Behdad Esfahbod 1f7380944d [atomic] Add hb_atomic_ptr_t<> and port all uses
Found and fixed a couple bugs.

Found a couple multithreading issues.  Marked them with "XXX-MT-bug".
2018-08-09 00:27:01 -07:00
Ebrahim Byagowi 70d36543aa Make atexit callbacks threadsafe (#930) 2018-03-29 17:30:28 -07:00
Behdad Esfahbod dbdbfe3d7b Use nullptr instead of NULL 2017-10-15 12:11:08 +02:00
Behdad Esfahbod 5dfd341f51 Minor 2017-01-22 16:55:40 -08:00
Behdad Esfahbod 72364103bc Move code around 2017-01-20 20:16:53 -08:00
Behdad Esfahbod 72ada4f0c6 [GX] Hook up feature variations
Shape-plan caching is not implemented.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod 70e72e5f61 [gobject] Fix a few warnings
Part of https://github.com/behdad/harfbuzz/issues/277
2016-06-28 21:15:36 -07:00
Khaled Hosny 9ab9f974d4 [docs] More buffers documentation 2016-01-01 20:38:21 +04:00
Behdad Esfahbod 26ba4d1e1f Fix segfault with empty buffer in hb_shape_plan_execute()
Move the empty-buffer check from hb_shape_full() to hb_shape_plan_execute().

Reported by Simon Cozens.
2015-10-02 07:25:52 +01:00
Behdad Esfahbod b8811429b6 Fix Since tags
Fixes https://github.com/behdad/harfbuzz/issues/103
2015-09-03 15:53:22 +04:30
Sascha Brawer 01c3a88543 Fix "Since:" tags
Based on data from http://upstream-tracker.org/versions/harfbuzz.html
Resolves #103
2015-06-01 13:25:27 +02:00
Behdad Esfahbod be66ec5373 Use TRUE/FALSE instead of true/false in docs 2015-04-30 18:27:13 -04:00
Khaled Hosny d055e1fc78 Some attempt into initial hb-shape documentation
Very anaemic, needs to descripe the format understood by
hb_feature_from_string() etc., but it is just start.
2015-04-30 18:24:45 -04:00
Khaled Hosny a394bb6670 [bindings] Fix *_from_string functions
Without the element-type they will be getting garbage, at least with
Python.
2015-03-22 20:29:10 +02:00
Behdad Esfahbod b91904a40d [bindings] Replace deprecated allow-none with optional and nullable 2015-01-06 15:43:14 -08:00
Chris Peterson fb85d618f5 Add #ifdef HB_USE_ATEXIT to fix -Wunused-function warnings 2015-01-04 19:31:10 -08:00
Behdad Esfahbod 38fb30d742 Use atexit() only if it's safe to call from shared library
Apparently they are not (advertised as?) safe on BSD systems.
We ignore the case of static libraries.

Whitelisted on glibc, Android, and MSVC / mingw.

https://bugs.freedesktop.org/show_bug.cgi?id=82246
2014-08-06 13:34:49 -04:00
Behdad Esfahbod 6e69200a2a Fix snprintf() format
Patch from Maks Naumov.
Fixes https://github.com/behdad/harfbuzz/pull/22
2014-07-25 12:30:47 -04:00
Behdad Esfahbod 5c5cdbbdf8 Make sure broken feature strings are not partially parsed
If user doesn't check hb_feature_from_string() return value, we
don't want them to end up see the partially-parsed feature.
2014-07-25 12:21:49 -04:00
Behdad Esfahbod a795fe6378 Allow quotation marks around feature tag in hb_feature_from_string()
With this, I believe we accept CSS feature strings completely.
2014-07-25 12:15:49 -04:00
Behdad Esfahbod 3f64618474 Allow space at the end of feature string with values, eg 'dlig=1 ' 2014-07-25 12:13:19 -04:00
Behdad Esfahbod f31f7d2259 Minor 2014-07-25 12:13:19 -04:00
Behdad Esfahbod 60cb18a5de Allow on/off in hb_feature_from_string()
We now allow things like "dlig on" / "dlig=on".
2014-07-25 12:13:16 -04:00
Behdad Esfahbod d9e618eca9 Remove duplicate definition of ISALNUM
It's defined in hb-private.h already.
2014-07-25 12:02:26 -04:00
Behdad Esfahbod 2ee5f665de Fix parsing of features like "- liga" (with the space) 2014-07-25 12:02:22 -04:00
Behdad Esfahbod e15fa7a8cf Do not require the '=' in hb_feature_from_string()
Towards accepting CSS font-feature-settings strings.
2014-07-25 11:46:28 -04:00
Behdad Esfahbod f4fe9baefd Reject tags longer than 4 chars in hb_feature_from_string() 2014-07-25 11:39:55 -04:00
Behdad Esfahbod 288f289997 [docs/introspection] More annotations 2013-09-06 17:30:54 -04:00
Behdad Esfahbod 38b8b40526 Fix possible snprintf OOM
https://bugzilla.redhat.com/show_bug.cgi?id=1001645
2013-08-27 11:46:07 -04:00
Behdad Esfahbod 7235f33f9e Fix misc warnings reported by cppcheck
https://bugs.freedesktop.org/show_bug.cgi?id=65544
2013-06-10 15:08:49 -04:00
Behdad Esfahbod 20b817ac21 [buffer] Implement buffer deserialization for format=json
Using a ragel machine.
2013-02-27 18:49:18 -05:00
Behdad Esfahbod 847794e929 [buffer] Implement buffer deserialization for format=text
Using a ragel machine.
2013-02-27 18:49:18 -05:00
Behdad Esfahbod 8da5111269 Minor 2013-02-27 18:49:05 -05:00
Behdad Esfahbod c462b32dcb Disable automatic segment properties guessing
Before, if one called hb_shape() without setting script, language, and
direction on the buffer, hb_shape() was calling
hb_buffer_guess_segment_properties() on the user's behalf to guess
these.

This is very dangerous, since any serious user of HarfBuzz must set
these properly (specially important is direction).  So now, we don't
guess properties by default.  People not setting direction will get
an abort() now.  If the old behavior is desired (fragile, good for
simple testing only), users can call
hb_buffer_guess_segment_properties() on the buffer just before calling
hb_shape().
2013-02-15 07:51:47 -05:00
Behdad Esfahbod e9171af55c Bug 60053 - hb-common.cc:181:6: warning: ‘void free_langs()’ defined but not used 2013-01-29 22:45:00 -05:00
Behdad Esfahbod 3f82f8ff07 Rename hb_buffer_guess_properties() to hb_buffer_guess_segment_properties() 2012-11-15 18:48:10 -08:00
Behdad Esfahbod 1c7e55511a Minor fix
Ouch
2012-11-13 14:42:22 -08:00