Commit Graph

5079 Commits

Author SHA1 Message Date
Behdad Esfahbod 49c44b58f6 [subset] Fix serialize_subset() calls
Ouch.
2018-09-03 16:37:17 -07:00
Behdad Esfahbod 7c9cfa2b40 Add intersects() method to GSUB/GPOS lookups 2018-09-02 19:47:50 -07:00
Behdad Esfahbod 61ce62e554 [subset] Minor
Remove Lookup::subset().
2018-09-02 17:00:39 -07:00
Behdad Esfahbod bfa72a9a72 [subset] Towards GSUB/GPOS subsetting
Add subset() call for GSUBGPOS struct and its dependencies.
Not hooked up anywhere.
2018-09-01 18:34:50 -07:00
Behdad Esfahbod 6803ed8674 [serialize] Add reset() 2018-08-31 17:11:08 -07:00
Behdad Esfahbod e58b190292 [subset] De-templatize hb_subset_context_t
We're going to (finally) use virtual methods for hb_serialize_context_t
customization, so don't need to carry a Serializer template variable
around...  Simplifies code.
2018-08-31 16:46:35 -07:00
Behdad Esfahbod 22acd424ca [serialize] Add a couple small methods 2018-08-31 16:41:18 -07:00
Behdad Esfahbod d1f29908c2 [subset] Add hb_subset_context_t<> 2018-08-31 16:31:00 -07:00
Behdad Esfahbod aba0a945c5 [subset] Add hb-subset-input.hh and make hb-subset.hh toplevel include 2018-08-31 13:25:19 -07:00
Behdad Esfahbod 18d01eac7f Minor 2018-08-31 13:00:57 -07:00
Behdad Esfahbod a23b892fe6 Shuffle 2018-08-29 18:28:39 -07:00
Behdad Esfahbod 93fe0faaee [subset] Clean up hb_subset_input_t API 2018-08-29 18:24:03 -07:00
Behdad Esfahbod d237ce7181 [subset] Bail if subsetting a table failed 2018-08-29 18:13:52 -07:00
Behdad Esfahbod f39166f0c0 [subset] Remove unused hb_subset_profile_t
We might reintroduce it later, but for now remove, as it was unused.
Some things that should have been in this object (drop_hints, etc)
are already in hb_subset_input_t.  So, for now, keep everything there.
2018-08-29 18:09:55 -07:00
Behdad Esfahbod 2ccc322cf8 [ot-font] Clean up cmap with gid=0
Fixes https://github.com/harfbuzz/harfbuzz/issues/1145
2018-08-29 16:38:25 -07:00
Behdad Esfahbod fee0f41c6c Don't declare extern symbols as inline
clang -O3 was completely removing _get_gdef(), causing link
failure when needed from another compilation unit.  Surprisingly,
"extern inline" didn't fix it.
2018-08-28 18:27:41 -07:00
Behdad Esfahbod 967741e4c4 Add explicit to hb_auto_t 1param constructors 2018-08-28 18:18:02 -07:00
Behdad Esfahbod c0a3f38f78 Fix distcheck 2018-08-28 17:22:59 -07:00
Behdad Esfahbod 2dde6c803a Explicitly pass reference in hb_auto_t constructor
Fixes clang bots as well as fuzzer issue.
2018-08-28 11:07:24 -07:00
Behdad Esfahbod a268068010 [ot-face] Remove tables_t. The face_data_t is what tables_t was 2018-08-26 15:18:46 -07:00
Behdad Esfahbod 3a0b3a29cc Free up hb-ot-face.hh from includes
There might be a better way to do this, but I couldn't find...
2018-08-26 15:11:24 -07:00
Behdad Esfahbod a84309afc8 [face] Use saved cmap in collect_unicodes() APIs 2018-08-26 09:33:01 -07:00
Behdad Esfahbod c624e18a24 [OT] Move code around 2018-08-26 09:19:20 -07:00
Behdad Esfahbod 3999094682 [OT] Use relaxed ops for recursing into GSUB/GPOS lookups again 2018-08-26 09:12:25 -07:00
Behdad Esfahbod d8c57e85d9 [GDEF] Move code around 2018-08-26 09:04:34 -07:00
Behdad Esfahbod 453e0c60b1 Add template keyword
I swear I have no idea why this is needed, but it is...
2018-08-26 01:30:52 -07:00
Behdad Esfahbod c44b0caf0d Fixup 2018-08-26 01:29:30 -07:00
Behdad Esfahbod 4096fbe487 [ot-face] Port GDEF to unified table accelerator model as well 2018-08-26 01:25:54 -07:00
Behdad Esfahbod b929100f87 [ot-face] Unify GSUB/GPOS accelerators in the table accelerator framework 2018-08-26 01:15:47 -07:00
Behdad Esfahbod 963413fc54 WIP 2018-08-26 00:47:55 -07:00
Behdad Esfahbod e6cb938065 [ot-face] Unify accelerators and tables 2018-08-26 00:21:29 -07:00
Behdad Esfahbod 7f8b6fe67d Minor 2018-08-26 00:07:12 -07:00
Behdad Esfahbod 59bca0d2cb [ot-font] Rename 2018-08-26 00:06:12 -07:00
Behdad Esfahbod 1c48a7ef06 [ot-font] Cache tables on face, not font 2018-08-25 23:57:16 -07:00
Behdad Esfahbod 71f8893eff [ot-font] Use init0 2018-08-25 23:27:45 -07:00
Behdad Esfahbod f36ae6f8a8 [ot-font] Make everything (cmap/metrics) lazy 2018-08-25 23:26:45 -07:00
Behdad Esfahbod 62fc54725a [ot-font] Fallback vertical advance to UPEM
Used to be ascent+descent.  Whatever. This is more convenient for
upcoming changes.
2018-08-25 23:15:52 -07:00
Behdad Esfahbod d950022c8a Add hb-ot-face.cc/hh 2018-08-25 23:06:37 -07:00
Behdad Esfahbod dae39c58fb [face] Introduce character-map API
New API:
+hb_face_collect_unicodes
+hb_face_collect_variation_selectors
+hb_face_collect_variation_unicodes
2018-08-25 22:44:39 -07:00
Behdad Esfahbod 66384db97c Minor 2018-08-25 22:39:17 -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
Behdad Esfahbod 82b12bcadd [unicode] Add HB_UNICODE_MAX
New API:
HB_UNICODE_MAX
2018-08-25 22:07:17 -07:00
Behdad Esfahbod b09a0336ca [cmap] More hb_auto_t<>(...) 2018-08-25 22:04:39 -07:00
Behdad Esfahbod 28634db07e [cmap] Fix skipping gid0 in Format4 collect_unicodes() 2018-08-25 21:23:43 -07:00
Behdad Esfahbod acce1fa3ea Use new hb_auto_t<> constructor with Coverage::Iter 2018-08-25 21:15:39 -07:00
Behdad Esfahbod ddea4d19cf Add 1-param passthrough constructor to hb_auto_t<>
And use.
2018-08-25 21:08:15 -07:00
Behdad Esfahbod c8cfb702e9 [cmap] Minor 2018-08-25 16:18:00 -07:00
Behdad Esfahbod 1dcf5fb038 [cmap Add hb_subset_collect_variation_unicodes()
To be moved to hb-face.h later.
2018-08-25 16:12:18 -07:00
Behdad Esfahbod 4806b3800d [cmap] Add hb_subset_collect_variation_selectors()
To be moved to hb-face later.
2018-08-25 15:58:40 -07:00
Behdad Esfahbod 3336de2479 [cmap] Remove unused code 2018-08-25 15:41:25 -07:00
Behdad Esfahbod 1becabe06c [cmap] Use bsearch to find subtables 2018-08-25 15:37:56 -07:00
Behdad Esfahbod 02fe03e09a [cmap] Factor out find_best_subtable 2018-08-25 15:33:05 -07:00
Behdad Esfahbod b41c43b4e1 Minor 2018-08-25 15:25:03 -07:00
Behdad Esfahbod 7d382fa276 [cmap] Implement collect_unicodes() for Format0/6/10 2018-08-25 09:42:52 -07:00
Behdad Esfahbod bd0e542525 [cmap] Simplify collect_unicodes()
Don't use accelerator (almost).  Hooks up Format13 as well.
2018-08-25 09:33:30 -07:00
Behdad Esfahbod d60c465627 Rename get_all_codepoints() to collect_unicodes() 2018-08-25 08:48:42 -07:00
Behdad Esfahbod 531051b8b9 [ot-font] Return char-not-found if mapped to gid 0
OpenType cmap table can use gid=0 to mean "not covered" to produce
more optimized cmap subtables.  Return false from get_nominal_glyph()
for those.  hb-ft already does this.
2018-08-25 08:44:18 -07:00
Behdad Esfahbod aadb2a9188 Add face-builder
New API:
+hb_face_builder_create
+hb_face_builder_add_table
2018-08-25 08:18:53 -07:00
Behdad Esfahbod 6cac9dc9cc [blob] Add as_bytes() 2018-08-24 10:29:45 -07:00
Behdad Esfahbod 29a9a08838 [sanitize] Document how sanitize machinery works 2018-08-24 10:24:45 -07:00
Behdad Esfahbod 142ac5a6be [serialize] Add copy_bytes() and copy_blob() 2018-08-24 10:07:49 -07:00
Behdad Esfahbod 1c6b369324 [ot] Rename hb_ot_layout_t to hb_ot_face_data_t 2018-08-23 11:30:21 -07:00
Emil A Eklund 22defe0965 Add guard around free_static_C_locale
Add HB_USE_ATEXIT guard around free_static_C_locale missed by previous
commit.
2018-08-14 18:10:17 -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 63be5dcdde 1.8.8 2018-08-14 10:59:34 -07:00
Behdad Esfahbod c9a22fa124 [icu] Pass normalizer instance down as user_data 2018-08-13 17:02:21 -07:00
Behdad Esfahbod f0ef096b8c Don't add reference in get_unicode_funcs() functions
Users don't expect a new reference returned from a get() function.
Indeed, all users of that API I foud where NOT destroying the reference.
Just change the implementations to NOT return a reference.

This applies to the following APIs:
hb_unicode_funcs_get_default()
hb_glib_get_unicode_funcs()
hb_icu_get_unicode_funcs()

Fixes https://github.com/harfbuzz/harfbuzz/issues/1134
2018-08-13 10:30:41 -07:00
Behdad Esfahbod 9bbd1cdf06 [uniscribe] Use lazy loader
Fixes https://github.com/harfbuzz/harfbuzz/issues/1129
2018-08-12 18:20:53 -07:00
Behdad Esfahbod 2663689936 Another clang bot fix 2018-08-12 18:10:59 -07:00
Behdad Esfahbod 989e71a982 Silence clang 2018-08-12 17:47:59 -07:00
Behdad Esfahbod 6750ec692c [lazy] Use for C_locale 2018-08-12 17:42:16 -07:00
Behdad Esfahbod 747d2564e6 [lazy] Port more 2018-08-12 17:32:10 -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 6901090945 [lazy] Make hb_lazy_loader_t<> more usable 2018-08-12 16:59:37 -07:00
Behdad Esfahbod bb905e9afc [lazy] Minor 2018-08-12 16:44:44 -07:00
Behdad Esfahbod 3945cd78a9 Minor 2018-08-12 16:33:48 -07:00
Behdad Esfahbod c21a1b95df [icu] Use get_relaxed for normalizer access
We've had the proper barriers already.  No need for more with every access.
2018-08-12 16:30:39 -07:00
Behdad Esfahbod 125fefa2a6 [icu] Fix for breakage after recent change 2018-08-12 16:29:41 -07:00
Behdad Esfahbod 53442be1ed [lazy] Use for ft_library 2018-08-12 16:20:11 -07:00
Behdad Esfahbod 7a8d480378 [lazy] Add .free() 2018-08-12 16:00:13 -07:00
Behdad Esfahbod c7ca30a533 [ot/ft] Port font_funcs statis to lazy-loader 2018-08-12 13:46:53 -07:00
Behdad Esfahbod cb3fc3685c [ucdn/glib/icu] Port unicode_funcs statics to lazy-loader 2018-08-12 13:39:01 -07:00
Behdad Esfahbod 1b6b481262 [lazy] Allow calling fini() multiple times 2018-08-12 13:16:40 -07:00
Behdad Esfahbod 918ad9f5d9 [lazy] More 2018-08-12 13:12:29 -07:00
Behdad Esfahbod 5abdf5eeba [lazy] More shuffle 2018-08-12 12:48:44 -07:00
Behdad Esfahbod 5d9863be6e Minor 2018-08-12 12:27:47 -07:00
Behdad Esfahbod f9a3eab810 Add explicit_operator
Fixes https://github.com/harfbuzz/harfbuzz/issues/1127
2018-08-12 12:21:56 -07:00
Behdad Esfahbod 470acb6c32 Rename 2018-08-12 12:13:36 -07:00
Martin Hosken 39607dc98e Support _ in feature ids 2018-08-11 16:55:16 -07:00
Behdad Esfahbod 652cd45c65 [coretext] Another try 2018-08-09 01:02:02 -07:00
Behdad Esfahbod 3f3585ca14 Fix coretext build (hopefully) 2018-08-09 00:58:17 -07:00
Behdad Esfahbod aa3b6017ed Revert "[iter] Make operator bool explicit"
This reverts commit 66920a6bac.

Some of our bots (Oracle Studio and Apple gcc 4.2) do not allow
explicit except for constructors.

https://github.com/harfbuzz/harfbuzz/issues/1127
2018-08-09 00:56:28 -07:00
Behdad Esfahbod e1a2354220 [atomic] More 2018-08-09 00:53:25 -07:00
Behdad Esfahbod f1f4b45ac3 Fix lazy_loader fini()
Was creating object even if wasn't there.
2018-08-09 00:28:40 -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
Behdad Esfahbod 6e42f4c53f [atomic] Remove hb_atomic_int_impl_t now that it's always int 2018-08-08 22:51:35 -07:00
Behdad Esfahbod 1227a9e5a5 [atomic] Unify typedef
Removes volatile from fallback implementation.  That was handwavy
anyway.
2018-08-08 22:45:49 -07:00
Behdad Esfahbod 5cd1888c9d [atomic] Change Mac atomic int type to int
If ever int is not 32bit, we'll fix this...
2018-08-08 22:43:53 -07:00
Behdad Esfahbod e1de86eac1 [atomic] Change Windows atomic int type to int 2018-08-08 22:42:33 -07:00