src/hb-shape.cc


Log

Author Commit Date CI Message
Behdad Esfahbod e40c0d82 2020-09-16T12:48:30 [ENOMEM] Handle immutable buffer in shape_full() Move the content_type changing to shape_plan_execute() where it belongs. Skip setting if content type is UNKNOWN, which happens with empty buffers only, including the immutable buffer. Alternate fix to https://github.com/harfbuzz/harfbuzz/pull/2606 and https://github.com/harfbuzz/harfbuzz/pull/2625
Ebrahim Byagowi 679fac87 2020-07-30T15:29:43 Skip hb_shape if buffer object is immutable
Ben Wagner b918cd8c 2019-10-10T15:30:48 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.
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Ebrahim Byagowi b2ebaa9a 2018-12-16T22:38:10 Remove redundant 'inline' from methods (#1483)
Behdad Esfahbod b89c7fd3 2018-11-21T12:32:48 Allow defining HB_USE_ATEXIT to 0 That's better use of that value than requiring extra macro HB_NO_ATEXIT
Behdad Esfahbod 3bf1ce74 2018-11-14T21:08:54 [shaper] Rename
Behdad Esfahbod 1db672a5 2018-11-12T16:05:09 [shaper] Rename
Behdad Esfahbod cf5fa57f 2018-10-27T04:50:38 [docs] Change section titles again I think I like the uniform "hb-*" more.
Behdad Esfahbod 00cf4e5e 2018-10-27T04:07:33 [docs] Fill in some sections
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.
Emil A Eklund 7112c641 2018-08-14T13:50:24 Guard free_static function definitions with macro Add HB_USE_ATEXIT macros around free_static function definitions to avoid unused function compiler warnings/errors.
Behdad Esfahbod 26636899 2018-08-12T18:10:59 Another clang bot fix
Behdad Esfahbod 7bd508a0 2018-08-12T17:19:55 [lazy] Rename free()
Behdad Esfahbod a3b97db9 2018-08-12T17:14:32 [lazy] Port more to it
Behdad Esfahbod 1f738094 2018-08-09T00:22:37 [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".
Ebrahim Byagowi 70d36543 2018-03-30T05:00:28 Make atexit callbacks threadsafe (#930)
Behdad Esfahbod dbdbfe3d 2017-10-15T12:11:08 Use nullptr instead of NULL
Behdad Esfahbod 5dfd341f 2017-01-22T16:55:40 Minor
Behdad Esfahbod 72364103 2017-01-20T20:16:53 Move code around
Behdad Esfahbod 72ada4f0 2016-09-10T03:57:24 [GX] Hook up feature variations Shape-plan caching is not implemented.
Behdad Esfahbod 70e72e5f 2016-06-28T21:00:37 [gobject] Fix a few warnings Part of https://github.com/behdad/harfbuzz/issues/277
Khaled Hosny 9ab9f974 2016-01-01T20:38:21 [docs] More buffers documentation
Behdad Esfahbod 26ba4d1e 2015-10-02T07:25:52 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.
Behdad Esfahbod b8811429 2015-09-03T15:53:22 Fix Since tags Fixes https://github.com/behdad/harfbuzz/issues/103
Sascha Brawer 01c3a885 2015-06-01T13:22:01 Fix "Since:" tags Based on data from http://upstream-tracker.org/versions/harfbuzz.html Resolves #103
Behdad Esfahbod be66ec53 2015-04-30T18:27:13 Use TRUE/FALSE instead of true/false in docs
Khaled Hosny d055e1fc 2014-01-08T02:28:55 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.
Khaled Hosny a394bb66 2015-03-22T20:29:10 [bindings] Fix *_from_string functions Without the element-type they will be getting garbage, at least with Python.
Behdad Esfahbod b91904a4 2015-01-06T15:43:14 [bindings] Replace deprecated allow-none with optional and nullable
Chris Peterson fb85d618 2015-01-04T19:31:10 Add #ifdef HB_USE_ATEXIT to fix -Wunused-function warnings
Behdad Esfahbod 38fb30d7 2014-08-06T13:34:49 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
Behdad Esfahbod 6e69200a 2014-07-25T12:30:47 Fix snprintf() format Patch from Maks Naumov. Fixes https://github.com/behdad/harfbuzz/pull/22
Behdad Esfahbod 5c5cdbbd 2014-07-25T12:21:49 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.
Behdad Esfahbod a795fe63 2014-07-25T12:15:33 Allow quotation marks around feature tag in hb_feature_from_string() With this, I believe we accept CSS feature strings completely.
Behdad Esfahbod 3f646184 2014-07-25T12:04:27 Allow space at the end of feature string with values, eg 'dlig=1 '
Behdad Esfahbod f31f7d22 2014-07-25T12:03:52 Minor
Behdad Esfahbod 60cb18a5 2014-07-25T12:01:22 Allow on/off in hb_feature_from_string() We now allow things like "dlig on" / "dlig=on".
Behdad Esfahbod d9e618ec 2014-07-25T11:56:01 Remove duplicate definition of ISALNUM It's defined in hb-private.h already.
Behdad Esfahbod 2ee5f665 2014-07-25T11:53:46 Fix parsing of features like "- liga" (with the space)
Behdad Esfahbod e15fa7a8 2014-07-25T11:44:35 Do not require the '=' in hb_feature_from_string() Towards accepting CSS font-feature-settings strings.
Behdad Esfahbod f4fe9bae 2014-07-25T11:39:55 Reject tags longer than 4 chars in hb_feature_from_string()
Behdad Esfahbod 288f2899 2013-09-06T15:40:22 [docs/introspection] More annotations
Behdad Esfahbod 38b8b405 2013-08-27T11:44:09 Fix possible snprintf OOM https://bugzilla.redhat.com/show_bug.cgi?id=1001645
Behdad Esfahbod 7235f33f 2013-06-10T14:39:51 Fix misc warnings reported by cppcheck https://bugs.freedesktop.org/show_bug.cgi?id=65544
Behdad Esfahbod 847794e9 2013-02-27T17:59:28 [buffer] Implement buffer deserialization for format=text Using a ragel machine.
Behdad Esfahbod 20b817ac 2013-02-27T18:39:37 [buffer] Implement buffer deserialization for format=json Using a ragel machine.
Behdad Esfahbod 8da51112 2013-02-27T17:48:31 Minor
Behdad Esfahbod c462b32d 2013-02-15T07:51:47 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().
Behdad Esfahbod e9171af5 2013-01-29T22:45:00 Bug 60053 - hb-common.cc:181:6: warning: ‘void free_langs()’ defined but not used
Behdad Esfahbod 3f82f8ff 2012-11-15T18:45:31 Rename hb_buffer_guess_properties() to hb_buffer_guess_segment_properties()
Behdad Esfahbod 1c7e5551 2012-11-13T14:42:22 Minor fix Ouch
Behdad Esfahbod 96fdc04e 2012-09-06T22:26:16 Add hb_buffer_[sg]et_content_type And hb_buffer_content_type_t and enum values.
Behdad Esfahbod e30ebd27 2012-09-06T22:09:06 Add hb_feature_to/from_string()
Behdad Esfahbod 5393e3a6 2012-08-02T09:24:35 [OT] Minor refactoring
Behdad Esfahbod a8842e4a 2012-07-31T23:10:11 Remove some TODO items
Behdad Esfahbod 2f87cebe 2012-07-27T04:02:38 Implement shape_plan caching Should give us some performance boost.
Behdad Esfahbod b6b7ba13 2012-07-27T01:26:11 Switch old and uniscribe backends to shape_plan
Behdad Esfahbod c32c096a 2012-07-27T01:13:53 Switch to shape_plan Not optimized yet. Eats babies. And no shaper uses the shape_plan.
Behdad Esfahbod 5b95c148 2012-07-26T23:46:53 Start implementing shape_plan
Behdad Esfahbod bd26b4d2 2012-07-26T22:05:39 Minor
Behdad Esfahbod 027857d0 2012-07-26T17:34:25 Start adding a unified shaper access infrastructure Add global shape_plan. Unused so far.
Behdad Esfahbod 8fe4c740 2012-07-24T21:05:12 [hb-old] Add HarfBuzz.old shaper Choose using shaper name "old".
Jonathan Kew aa6d8498 2012-07-24T15:52:32 [CoreText] Add basic Core Text backend for comparison with our native shaping Does not attempt to handle clusters in a Uniscribe- or HarfBuzz-compatible way; just returns the original string indexes that CT maintains. These may even be out-of-order in the case of reordrant glyphs.
Behdad Esfahbod 97aa0b73 2012-07-24T15:02:34 Minor const correctness shuffling
Behdad Esfahbod 6095de16 2012-06-07T15:48:18 Fix clang warning with NO_MT path
Behdad Esfahbod 0594a244 2012-06-05T20:35:40 Cleanup TRUE/FALSE vs true/false
Behdad Esfahbod f64b2ebf 2012-06-05T19:23:29 Remove last static initializer We're free! Lazy or immediate...
Behdad Esfahbod a5e40542 2012-04-17T12:37:19 Make font immutable in hb_shape()
Behdad Esfahbod 6bd9b479 2012-04-12T14:53:53 Hide backend-specific shape functions Also remove shaper_options argument to hb_shape_full(). That was unused and for "future". Let it go. More shaper API coming in preparation for plan/planned API.
Behdad Esfahbod cd2b9010 2011-08-24T01:47:25 [graphite] Minor
Behdad Esfahbod 1f49cf32 2011-08-24T01:29:25 Add graphite2 integration from Martin Hosken To be modified, a lot.
Behdad Esfahbod 0501573d 2011-08-10T16:25:56 Fix const correctness in the API
Behdad Esfahbod 33ccc779 2011-08-09T00:43:24 [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.
Behdad Esfahbod 670c8734 2011-08-08T21:36:24 Fix shaper ordering logic
Behdad Esfahbod cc797e0d 2011-08-08T03:49:30 Minor
Behdad Esfahbod ff199ba3 2011-08-07T03:43:46 Fix shaper_list manipulation, aaaaaaaaaaaaargh
Behdad Esfahbod c62a8f10 2011-08-05T18:02:30 Free all static memory upon exit
Behdad Esfahbod 9da55450 2011-08-05T19:48:49 Add hb_shape_list_shapers()
Behdad Esfahbod c4d63ef7 2011-08-05T17:54:25 Fix env parsing code Also changed the separator to comma instead of colon.
Behdad Esfahbod 3ca6c4ec 2011-08-05T17:22:19 Change hb_shape() API back to what it was, add hb_shape_full() I disliked changing hb_shape() API, and disliked the fact that it was returning a bool now. So, reverted. Added new API for the extra functionality.
Behdad Esfahbod 02aeca98 2011-08-04T22:31:05 [API] Changes to main shape API hb_shape() now accepts a shaper_options and a shaper_list argument. Both can be set to NULL to emulate previous API. And in most situations they are expected to be set to NULL. hb_shape() also returns a boolean for now. If shaper_list is NULL, the return value can be ignored. shaper_options is ignored for now, but otherwise it should be a NULL-terminated list of strings. shaper_list is a NULL-terminated list of strings. Currently recognized strings are "ot" for native OpenType Layout implementation, "uniscribe" for the Uniscribe backend, and "fallback" for the non-complex backend (that will be implemented shortly). The fallback backend never fails. The env var HB_SHAPER_LIST is also parsed and honored. It's a colon-separated list of shaper names. The fallback shaper is invoked if none of the env-listed shapers succeed. New API hb_buffer_guess_properties() added.
Behdad Esfahbod c605bbbb 2011-08-04T20:00:53 Remove C++ guards from source files Where causing issues for people with MSVC.
Behdad Esfahbod c4641723 2011-07-07T23:47:19 [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.
Behdad Esfahbod 891c4755 2011-07-07T23:19:27 Humm, undo some shuffling In preparation for adding more advanced unicode funcs.
Behdad Esfahbod 1a64f6e1 2011-05-13T22:55:32 [API] Add HB_LANGUAGE_INVALID
Behdad Esfahbod 34fb5521 2011-05-06T00:04:28 [API] Add hb_language_get_default() It uses locale information to detect default language. It's used by hb_shape() whenever language is not set on the buffer. Not sure how to properly test it in the test suite. Tested by observing that with DejaVu Sans we select the proper local glyph version for U+431 under Serbian locale. See http://www.pango.org/ScriptGallery
Behdad Esfahbod 72657e4c 2011-05-02T20:46:32 [API] Make hb_font_create() take a face and reference it
Behdad Esfahbod 2409d5f8 2011-04-21T17:14:28 Update Copyright headers
Behdad Esfahbod c57d454a 2011-04-20T18:50:27 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.
Behdad Esfahbod c035812f 2011-04-20T17:03:00 [API] Rename hb_face_get_table() to hb_face_reference_table() That correctly reflects the reference ownership transfer happening.
Behdad Esfahbod fb194b87 2011-04-20T02:00:47 unicode: Cleanup implementation
Ryan Lortie 2fd0c577 2011-04-20T00:19:20 [API] unicode: rework virtual functions for subclassing Unicode data providers can now be subclassed, including support for chain-up. The interface should now be nicely bindable, as well. Also fix glib unicode funcs that where broken after hb_script_t changes. Nicely caught by the test-unicode.c added in this commit.
Behdad Esfahbod 62879eeb 2011-04-18T23:40:21 [API] Use ISO 15924 tags for hb_script_t This simplifies the code, reduces static data, and makes the design more extensible to future additions of new scripts.
Behdad Esfahbod 5814dfa3 2011-04-15T14:41:04 Cosmetic
Behdad Esfahbod 3286fc0e 2011-03-16T14:53:32 Let hb_shape() guess script and direction... - Rename HB_SCRIPT_INVALID_CODE to HB_SCRIPT_INVALID - Add HB_DIRECTION_INVALID - Make hb_script_get_horizontal_direction() public - Make hb_shape() guess script from buffer text (first non-common non-inherit script) if buffer script is set to HB_SCRIPT_INVALID (this is NOT the default.) - Make hb_shape() guess direction from buffer script if buffer direction is set to HB_DIRECTION_INVALID (this is NOT the default.) - Make hb-view.c set INVALID script and direction on the buffer. The above changes are meant to make hb-view fairly useful for uni-script uni-direction text. The guessing behavior however is NOT the default of hb_shape() and must be asked for explicitly. This is intended, because the guess is not a suitable substitute to full-fledged bidi and script segmentation. It's just a testing tool.
Behdad Esfahbod acdba3f9 2010-07-23T15:11:18 Prefer C linkage
Behdad Esfahbod b485da0b 2010-05-27T11:39:19 Disable Graphite as it crashes all over the place...
Behdad Esfahbod 15c7379c 2010-05-26T10:48:10 Revert "Merge remote branch 'martin/master'" This reverts commit 80af2812fb3b231ddcb4608ec13c6038a681c818, reversing changes made to c442672ec2fb83ed41f3994b3aa4f92a097664ab.
Martin Hosken 1432ab15 2010-05-22T00:56:40 Add graphical output to hbtestfont