Commit Graph

11420 Commits

Author SHA1 Message Date
Behdad Esfahbod b51ab1a9e5 [cff] Optimize byte_str_ref_t
Make it 16 bytes instead of 24.  This struct is used in the subroutine
call stack heavily.

This change makes the HB AdobeVFPrototype benchmark to become faster
than FT one, with about 6% speedup as a result of this change.
2022-11-21 10:27:07 -07:00
Behdad Esfahbod 7a39464b18 [cff] Hide members of byte_str_ref_t 2022-11-21 09:48:54 -07:00
Behdad Esfahbod 18141f0007 [cff] Move a sub_array call
No logic change.... I hope?!
2022-11-21 09:47:03 -07:00
Behdad Esfahbod f66415cdd1 [cff] Move initialization of a type to constructor 2022-11-21 09:40:16 -07:00
Behdad Esfahbod 70a5cd53f6 [algs] Assert trivial copy assignable in stable_sort 2022-11-21 08:52:33 -07:00
Behdad Esfahbod 9bb39423f5 [algs] Simplify stable_sort signatures 2022-11-20 17:40:54 -07:00
Behdad Esfahbod d119568df6 [cbdt] Use vector tail() 2022-11-20 14:11:51 -07:00
Behdad Esfahbod 87a88117c8 [object] Use vector tail() 2022-11-20 14:10:39 -07:00
Behdad Esfahbod 76ce390b5a [ucd] Document algorithms 2022-11-20 13:54:56 -07:00
Behdad Esfahbod ed43bc5118 [buffer] Move delete_glyphs_inplace() here 2022-11-20 13:10:19 -07:00
Behdad Esfahbod dd88dae8a9 [unicode] Simplify set_funcs a bit more 2022-11-19 15:23:53 -07:00
Behdad Esfahbod 2d8ff3bcbe [unicode] Destroy user_data in set_funcs fail paths
This is what the font_funcs / draw_funcs do.
2022-11-19 15:23:44 -07:00
Behdad Esfahbod 527823ccac [unicode] Destroy user_data in set_funcs fail paths
This is what the font_funcs / draw_funcs do.
2022-11-19 15:19:08 -07:00
Behdad Esfahbod 56d6b6992b [font/draw] Remove unneeded branch
The preamble sets user_data/destroy to nullptr if func is nullptr.
2022-11-19 15:11:59 -07:00
Behdad Esfahbod 976bb26cc1 [draw] Optimize set_func functions 2022-11-19 15:06:23 -07:00
Behdad Esfahbod 114167a933 [font] Optimize set_func functions 2022-11-19 14:47:45 -07:00
Behdad Esfahbod f9d7b303ed [thai] Use smaller type for arrays
No logic change.
2022-11-19 14:20:36 -07:00
Behdad Esfahbod 72c4e431af [use-table] Add a OPTIMIZE_SIZE version 2022-11-19 13:40:33 -07:00
Behdad Esfahbod 83c3a91dc6 [gen-use-table] Report fullCost 2022-11-19 13:34:58 -07:00
Behdad Esfahbod ba08de624e [ucd] Change OPTIMIZE_SIZE to compression level 9
Also changes default compression level from 3 to 5, but that shows
no change in the generated table size.
2022-11-19 13:25:19 -07:00
Behdad Esfahbod b68f9f3cfe [machinery] Adjust comment 2022-11-18 21:36:01 -07:00
Behdad Esfahbod a47ba1dc0e [lazy-pointer] Hide instance 2022-11-18 21:14:07 -07:00
Behdad Esfahbod 281b4705b4 [pool] Rewrite a loop as dagger 2022-11-18 20:25:05 -07:00
Behdad Esfahbod 3ff8abf272 Revert "[map] Allow std::move-ing keys into the map"
This reverts commit f657ef7e57.

This breaks many compilers with messages like this:

hb-subset-plan.hh:226: undefined reference to `OT::head::tableTag'

I'm out of my depth re how to fix it.
2022-11-18 19:38:12 -07:00
Behdad Esfahbod 039e476bac [test-vector] Test sink-move'ing 2022-11-18 19:26:02 -07:00
Behdad Esfahbod a3a218edb5 [map] Add a couple more sink interfaces 2022-11-18 19:24:41 -07:00
Behdad Esfahbod 90226eab89 [test-map] Test inserting shared_ptr key 2022-11-18 19:21:58 -07:00
Behdad Esfahbod f657ef7e57 [map] Allow std::move-ing keys into the map 2022-11-18 19:17:03 -07:00
Behdad Esfahbod a1768ad829 [map] Fix use of != 2022-11-18 19:08:34 -07:00
Behdad Esfahbod e74b372b59 [test-map] Test moving values 2022-11-18 18:43:31 -07:00
Behdad Esfahbod a9c6a20b19 [map] Support moving value in sink interface 2022-11-18 18:29:12 -07:00
Behdad Esfahbod 1bf9afaad0 [test-vector] Test sink interface 2022-11-18 18:20:50 -07:00
Behdad Esfahbod fa0e4b041d [test-map] Test sink interface 2022-11-18 18:20:14 -07:00
Behdad Esfahbod 1c612a8541 [test-set] Test sinking range 2022-11-18 18:19:31 -07:00
Behdad Esfahbod 356708e34a [test-set] Test length of iterator 2022-11-18 18:17:34 -07:00
Behdad Esfahbod 2892fc71e8 [vector] Add std::move to pop()
This was removed in 76fc27713f,
but I believe that was faultly. It was because of a bad move
implementation in the set.
2022-11-18 18:03:59 -07:00
Behdad Esfahbod 921f45f46d [array] Rewrite hash() as dagger 2022-11-18 17:26:58 -07:00
Behdad Esfahbod 213117317c [array] Remove hash specializations for bytes
Not needed.
2022-11-18 17:24:44 -07:00
Behdad Esfahbod bef5a1c8dc [vector] Comment 2022-11-18 17:22:17 -07:00
Behdad Esfahbod 69b41f92ec [vector] Simplify shift_down_vector()
Compiler is smarter than I am.
2022-11-18 17:04:34 -07:00
Behdad Esfahbod 1dd9396c7a [vector] Optimize grow_vector() for size
Again, compiler is smarter than I am.
2022-11-18 17:01:14 -07:00
Behdad Esfahbod d36f688131 [vector] Optimize shrink_vector for size
Compiler is smarter than I am.
2022-11-18 17:00:07 -07:00
Behdad Esfahbod bc8eded296 [vector] Remove a for loop 2022-11-18 16:51:24 -07:00
Behdad Esfahbod afd9a58bd7 [vector] Save a couple hb_iter() invocations 2022-11-18 16:47:32 -07:00
Behdad Esfahbod 3ead9863d2 [map] Add size() 2022-11-18 16:43:47 -07:00
Behdad Esfahbod 42db8be189 [map] Minor remove if condition 2022-11-18 16:41:50 -07:00
Behdad Esfahbod 4ec706980c [map] Rewrite hash() as dagger
Somehow our daggers instead of for loop save size. I cannot
pinpoint why, other than maybe not inlining.
2022-11-18 16:39:30 -07:00
Behdad Esfahbod 025a68cb07 [map] Optimize copy resizing logic 2022-11-18 16:33:04 -07:00
Behdad Esfahbod f1d716871d [map] Change bucket_for_hash() to item_for_hash() 2022-11-18 16:31:27 -07:00
Behdad Esfahbod d012f9a9b3 [map] Change bucket_for() to item_for() 2022-11-18 16:29:06 -07:00
Behdad Esfahbod 68a29020c5 [bit-page] Write hash() as dagger 2022-11-18 16:02:45 -07:00
Behdad Esfahbod 87271e1b2e [bit-page] Write get_population as dagger 2022-11-18 16:01:23 -07:00
Behdad Esfahbod 744eb6baf9 [bit-page] Write is_empty() as dagger 2022-11-18 15:56:06 -07:00
Behdad Esfahbod 43a4028f0e [algs] Move hb_vector_size_t to bit-page as only user 2022-11-18 15:54:34 -07:00
Behdad Esfahbod 01f961ac3a [gsubgpos] Minor call hb_iter() instead of ->iter() directly 2022-11-18 15:47:17 -07:00
Behdad Esfahbod bba5765583 [gsubgpos] Remove a few unnecessary namespace invocations 2022-11-18 14:52:17 -07:00
Behdad Esfahbod b4d0d1608d [gsubgpos] Rewrite a couple apply() functions as daggers 2022-11-18 14:47:33 -07:00
Behdad Esfahbod 76c8214eb5 [gsubgpos] Move member around 2022-11-18 12:30:46 -07:00
Behdad Esfahbod 81a573008e [map] Optimize storage 2022-11-17 16:59:36 -07:00
Behdad Esfahbod ae080bf202 [map] Initialize key and value explicitly
If they are of int time they won't be initialized otherwise.
2022-11-17 16:34:58 -07:00
Behdad Esfahbod 1d41b9cb3c [user-data] std::move item 2022-11-17 16:26:48 -07:00
Behdad Esfahbod ff0bb74895 [map] Call item_t constructor/destructor directly 2022-11-17 16:17:37 -07:00
Behdad Esfahbod 5c88715949 [map] Add item_t.destruct() 2022-11-17 16:14:16 -07:00
Behdad Esfahbod 7f83040836 [map] Simplify (de)construction of item_t 2022-11-17 16:10:37 -07:00
Behdad Esfahbod 99103bd976 [map] Destruct objects when clearing 2022-11-17 15:57:06 -07:00
Behdad Esfahbod 4caad5720c [test-map] Add test for reset
I expect this to leak now, since we don't destruct items.
2022-11-17 15:51:39 -07:00
Behdad Esfahbod e93c01c3ae [map] Rename item clear() to construct() 2022-11-17 15:50:00 -07:00
Behdad Esfahbod fc22d706fe [test-map] Don't insert null smart-pointers in map
Dereferencing them is not supported anymore after
3aad7c2ddf

We don't support that for regular pointers, so don't supporting
them for smart-pointers sounds right to me.
2022-11-17 15:47:43 -07:00
Behdad Esfahbod 896377463f [map] Don't resize map if not necessary 2022-11-17 15:25:45 -07:00
Behdad Esfahbod 7595fa2d9a [map] Fix copy-assignment operator
Ouch!
2022-11-17 15:23:14 -07:00
Behdad Esfahbod 41f4bdac35 [map] Fix resize during copy-construction/assignment 2022-11-17 15:16:00 -07:00
Behdad Esfahbod 3aad7c2ddf [algs] Remove smart-pointers from hb_hash()
hb_deref() handles them. I think this code predated that.
2022-11-17 15:10:47 -07:00
Behdad Esfahbod 7bd101728a [map] Minor use hb_iter instead of hb_array 2022-11-17 15:01:55 -07:00
Behdad Esfahbod 238fc14716 [map] Simplify iterators 2022-11-17 14:58:50 -07:00
Behdad Esfahbod 410c14bfa2 [map] Fix equality
Ouch!
2022-11-17 14:53:00 -07:00
Behdad Esfahbod 6dfd4a16e7 [ot-font] Remove stale TODO 2022-11-16 22:44:22 -07:00
Behdad Esfahbod a0bde1e1ea [open-type] Remove (Sorted)ArrayOf.sub_array() 2022-11-16 21:27:12 -07:00
Behdad Esfahbod f2b5db700f [vector] Remove .sub_array () 2022-11-16 21:22:57 -07:00
Behdad Esfahbod c7d57dcf26 [vector/array] Simplify qsort() 2022-11-16 21:21:31 -07:00
Behdad Esfahbod 1610008e62 [gsubgpos] Minor remove call to hb_iter 2022-11-16 20:02:36 -07:00
Behdad Esfahbod 19ec01d25c [gsubgpos] Sprinkle const around 2022-11-16 19:14:42 -07:00
Behdad Esfahbod 561946c7d5 [layout] Comment 2022-11-16 17:59:29 -07:00
Behdad Esfahbod 2268207c19 [layout] Update comment 2022-11-16 17:51:22 -07:00
Behdad Esfahbod 658f8f4391 [layout] Comment 2022-11-16 17:50:35 -07:00
Behdad Esfahbod 27a8fe7d58 [layout] Only update buffer digest if buffer changed by a pause 2022-11-16 17:49:44 -07:00
Behdad Esfahbod 8b2a211123 [layout] Keep digest updated in the context
Don't recompute digest after every (applied) GSUB lookup.
2022-11-16 16:57:44 -07:00
Behdad Esfahbod a5964a2d2a [layout] Minor simplify 2022-11-16 16:45:23 -07:00
Behdad Esfahbod 80b8758881 [layout] Add a buffer message for digest-skipped lookups 2022-11-16 16:26:41 -07:00
Behdad Esfahbod afa71ee8ef Fix alignment error 2022-11-16 16:22:45 -07:00
Behdad Esfahbod dff1b809a0 [buffer] Add .digest() and use 2022-11-16 16:19:05 -07:00
Behdad Esfahbod 654a2eafc8 [layout] Use buffer-digest for GSUB as well
Combined with previous commit, this shows up to 12% speed up with
Roboto and the en-words (ie. short strings) benchmark, about 5%
for longer English tests, and no adverse effect on heavier fonts.
2022-11-16 16:13:52 -07:00
Behdad Esfahbod 15b6c32599 [layout] Use a buffer digest for GPOS to skip whole lookups 2022-11-16 16:11:36 -07:00
Behdad Esfahbod a053b84cb9 [gsubgpos] Optimize set-digest initialization
Previously we were once collecting set-digest for each subtable,
and another time for each lookup.

Now we compute the one for each lookup simply from the ones for
its subtables.
2022-11-16 14:39:25 -07:00
Behdad Esfahbod 20654cd889 [set-digest] Minor no logic change 2022-11-16 14:29:10 -07:00
Behdad Esfahbod 95b9763dbc [set-digest] Minor simplify 2022-11-16 14:15:01 -07:00
Behdad Esfahbod 9855b678f2 [cache] Minor rewrite assertion 2022-11-16 13:37:34 -07:00
Behdad Esfahbod a10ff20562 [ft] Comment 2022-11-16 13:34:37 -07:00
Behdad Esfahbod 557be9502a [test-vector] Fix test 2022-11-16 12:47:05 -07:00
Behdad Esfahbod 9027d15410 [test-iter] Fix leak 2022-11-16 12:39:30 -07:00
Behdad Esfahbod afd716d4cd [serialize] Don't free object-pool in reset() 2022-11-16 12:28:56 -07:00
Behdad Esfahbod 02949cf64f [priority-queue] More assert adjustment 2022-11-16 12:06:44 -07:00
Behdad Esfahbod 620ddd762d [priority-queue] Fix asserts 2022-11-16 12:04:35 -07:00
Behdad Esfahbod 57de568aad [indic-table] Minor adjust empty lines 2022-11-16 11:50:40 -07:00
Behdad Esfahbod 281a2602cc Update generated file 2022-11-16 11:36:33 -07:00
Behdad Esfahbod f734c26c5c [test-vector] Test inserting set and map 2022-11-15 16:27:56 -07:00
Behdad Esfahbod 0a97d27c2b [test-iter] Add another test 2022-11-15 16:23:48 -07:00
Behdad Esfahbod e9e985682a [fallback-shape] Remove TODO 2022-11-15 16:11:57 -07:00
Behdad Esfahbod 6df8498da2 [sample.py] Fix warning 2022-11-15 15:52:04 -07:00
Behdad Esfahbod 49fe5c1e5a [glib] Remove old cruft from pre-2011 2022-11-15 15:37:23 -07:00
Behdad Esfahbod 1bd1a37837 [test] Minor 2022-11-15 15:18:36 -07:00
Behdad Esfahbod 35aa492eb7 [main] sprintf -> snprintf 2022-11-15 15:05:15 -07:00
Behdad Esfahbod 72c6962012 [buffer-deserialize-text] Fix glyph name for glyph flags
Skip "#" in glyph names.
2022-11-14 21:34:16 -07:00
Behdad Esfahbod dee26de76f [test-buffer-serialize] Allow no font 2022-11-14 16:24:25 -07:00
Behdad Esfahbod f6076890c5 Hide all mentions of name_table_overrides behind EXPERIMENTAL_API
Fixes https://github.com/harfbuzz/harfbuzz/issues/3872
2022-11-14 16:06:39 -07:00
Behdad Esfahbod ebc382a847 Revert "Avoid use values () in hb-hashmap if value_t has an overriden operator &"
This reverts commit b92e4cc009.
2022-11-14 15:59:46 -07:00
Behdad Esfahbod ff0d0d020e [meta] Use std::decay 2022-11-14 14:48:07 -07:00
Behdad Esfahbod 24cf86b009 [array] Fix MSVC fail 2022-11-14 13:58:43 -07:00
Behdad Esfahbod a87843be3d [array] Another try at sizeof sorted_array 2022-11-14 13:43:58 -07:00
Behdad Esfahbod 72ba0b2aa2 [array] Fix MSVC fail 2022-11-14 13:41:15 -07:00
Qunxin Liu b92e4cc009 Avoid use values () in hb-hashmap if value_t has an overriden operator & 2022-11-14 13:19:55 -07:00
Behdad Esfahbod ea63e95e4c [GPOS.PairPos] Adjust unsafe-to-break for non-zero ValueFormat2
Fixes https://github.com/harfbuzz/harfbuzz/issues/3824
2022-11-14 12:36:48 -07:00
Behdad Esfahbod 85e0be1357 [vector/array] Add simple test for sorted size 2022-11-13 17:28:09 -07:00
Behdad Esfahbod 4e618557a6 [vector] Don't subclass sorted vector from unsorted
Was doubling the size unnecessarily.
2022-11-13 17:23:25 -07:00
Behdad Esfahbod 630f09c8b6 Another hb_memcpy instead of strncpy use 2022-11-09 11:32:30 -07:00
Behdad Esfahbod cd011ceadf Use hb_memcpy instead of strncpy
Nul-termination is not intended.
2022-11-09 11:30:44 -07:00
Behdad Esfahbod c158b626c3 [name] Simplify buffer-length calculation 2022-11-08 15:05:31 -07:00
Behdad Esfahbod 55edf59d52 [name] Typo 2022-11-08 14:53:27 -07:00
Behdad Esfahbod 27c8bbcb04 Revert "[name] Simplify buffer-length calculation"
This reverts commit d70595657e.
2022-11-08 14:48:38 -07:00
Behdad Esfahbod d70595657e [name] Simplify buffer-length calculation 2022-11-08 14:15:56 -07:00
Qunxin Liu 6314aa7da4 [subset] add an experimental API that can override name strings for specified name_id 2022-11-08 14:10:25 -07:00
Behdad Esfahbod f53ef69d59 [indic] Order left-matras inside-out
Fixes https://github.com/harfbuzz/harfbuzz/issues/3863
2022-11-05 15:40:05 -06:00
Qunxin Liu dbb7f47b19 fix bug in hb_hashmap_t has() interface
It was not working when the value type is hb_bytes_t because hb_array_t
overloaded operator &
2022-11-03 13:48:23 -06:00
Behdad Esfahbod d1f445ec1e [name] Typo 2022-11-02 12:24:04 -06:00
Behdad Esfahbod fc935fb81b Fix snprintf use
https://github.com/harfbuzz/harfbuzz/pull/3495#issuecomment-1299107964
2022-11-01 14:40:47 -06:00
Lorenz Wildberg 2ee42bbac2 hb_variation_to_string: Fix GIR annotation 2022-11-01 11:21:25 -06:00
Behdad Esfahbod 02b76393ef [config] Re-enable BORING_EXPANSION
Only the non-experimental parts (currently avar2) are
enabled by default.
2022-10-29 11:19:04 -06:00
Behdad Esfahbod 6a47ef34b1 [config] If not HB_EXPERIMENTAL, then HB_NO_BEYOND_64K 2022-10-29 11:14:27 -06:00
Behdad Esfahbod a0f999cd95 [config] Rename HB_NO_VARIATIONS2 to HB_NO_AVAR2 2022-10-29 11:13:40 -06:00
Behdad Esfahbod 60c6b7786d Disable -Wcast-function-type-strict
https://github.com/harfbuzz/harfbuzz/pull/3859#issuecomment-1295409126
2022-10-28 14:19:39 -06:00
Martin Storsjö d88269c827 freetype: Fix function signatures to match without casts
Clang 16 has got a new stricter warning for casts of function types
(see 1aad641c79).

This new warning gets included as part of the existing error
diagnostic setting of -Wcast-function-type.

This fixes errors like these:

../src/hb-ft.cc:1011:34: error: cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to 'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
    ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-10-28 13:49:41 -06:00
Qunxin Liu 8a5524833c [instance] update OS2/.usWeightClass and .usWidthClass when
no-prune-unicode-ranges option is enabled
2022-10-27 11:59:31 -06:00
خالد حسني (Khaled Hosny) fddeba26e4
Merge pull request #3857 from 2xsaiko/outgoing/cmake-abs-path
Pass through absolute paths to cmake config directly
2022-10-26 22:34:02 +02:00
Marco Rebhan db292f6f02
Pass through absolute paths to cmake config directly
The previous code concatenates includedir to _harfbuzz_prefix verbatim,
which results in a wrong final include path in case includedir is an absolute
path. Instead, we can let meson determine the absolute include and lib paths
in advance and save them in the cmake config.

This is an issue in nixpkgs, where includedir is set to the final (absolute)
path of the built library in the Nix store, which causes CMake projects
depending on harfbuzz to not configure.

See https://github.com/NixOS/nixpkgs/issues/180054.
2022-10-26 22:13:44 +02:00
Behdad Esfahbod 477d71724c [glyf] Limit points in a glyf to 10000 roughly
Only enforced when components are being expanded.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3838
2022-10-26 13:11:47 -06:00
Behdad Esfahbod 9aad3dba8f [SingleSubst] Fix degenerate-lookup test
Part of https://github.com/harfbuzz/harfbuzz/issues/3853
2022-10-26 13:04:02 -06:00
Garret Rieger 83769b9cb1 [subset] add comment for why we retain empty lookups. 2022-10-21 18:29:23 -06:00
Garret Rieger 70e2de2bd4 [subset] Always output Lookup's even if they are empty.
The rest of layout subsetting depends on lookup indices being consistent with those computed during planning. So if an empty lookup is discarded during the subset phase it will invalidate all subsequent lookup indices. Generally we shouldn't end up with an empty lookup as we pre-prune them during the planning phase, but it can happen in rare cases such as when a subtable is considered degenerate (eg. #3853)
2022-10-21 18:29:23 -06:00
Joel Auterson c813f84235 Make build work for arm-none-eabi 2022-10-21 11:09:35 -06:00
Behdad Esfahbod b0b7a65388 [subset] Fix check-symbols failure
Fixes https://github.com/harfbuzz/harfbuzz/issues/3850
2022-10-20 17:13:26 -06:00
Khaled Hosny 970321db7b 5.3.1 2022-10-19 22:06:46 +02:00
Behdad Esfahbod a73137d101 [face] Fix annotation 2022-10-17 12:18:24 -06:00
Behdad Esfahbod d65af60213 [shape] Adjust Grapheme clusters for Katakana voiced sound marks
Fixes https://github.com/harfbuzz/harfbuzz/issues/3844
2022-10-15 14:26:02 -06:00
Behdad Esfahbod bda42fc34a
Merge pull request #3842 from harfbuzz/patch_mode
[subset] Begin implementing a subset accelerator
2022-10-14 15:08:22 -06:00
Garret Rieger f53ebf5584 [subset] Add hb_subset_preprocess to experimental symbol list for check-symbols. 2022-10-14 19:38:19 +00:00
Garret Rieger fdb98ed88e [subset] add missing HB_EXTERN. 2022-10-14 18:30:39 +00:00
Garret Rieger 515863e57c [subset] Remove add accelerator flag, replace with new api method.
Adds hb_subset_preprocess() which preprocesses the face and attaches accelerator data.
2022-10-13 23:42:00 +00:00
Garret Rieger 573640c99f [subset] Add hb-subset-accelerator.hh to Make soure list. 2022-10-13 23:21:35 +00:00
Behdad Esfahbod a756bd1944 [glyf] Use component phantom points after transformation 2022-10-13 17:18:19 -06:00
Behdad Esfahbod 82d19c08fc Revert "[glyf/Composite] Remove phantom points when not needed anymore"
This reverts commit 527e63a3bd.
2022-10-13 17:17:03 -06:00
Behdad Esfahbod 527e63a3bd [glyf/Composite] Remove phantom points when not needed anymore 2022-10-13 17:13:40 -06:00
Garret Rieger f4903defc4 [subset] use the accelerator in the subsetting benchmark. 2022-10-13 21:38:54 +00:00
Garret Rieger 01481db582 [subset] use accelerator unicode to gid map if available. 2022-10-13 21:12:22 +00:00
Garret Rieger 4ec5eb955f [subset] add a subset accelerator.
Can be optionally attached to the face during subsetting. Contains data which can accelerate future subsets.
2022-10-13 19:40:31 +00:00
Garret Rieger f105c28749 [subset] Suggested flags to enable more performant subset production for use in incxfer. 2022-10-13 18:53:41 +00:00
Behdad Esfahbod 5769d422c5 [type] Add HBFixed template 2022-10-13 12:12:24 -06:00
Behdad Esfahbod 8c29dcaee4 s/HBFixed/F16DOT16/g 2022-10-13 12:06:15 -06:00
Behdad Esfahbod 294b1c9f6e Use snprintf instead of sprintf 2022-10-13 11:30:02 -06:00
Garret Rieger 9559d3c1c1 [repacker] fix incorrect coverage table size estimation.
During splitting of PairPosFormat2 the code was assuming the maximum size of the generated coverage table would be equal too the current size. This is incorrect size the new coverage table may not preserve the ranges found in the original coverage table (since we are splitting based on class, not coverage) and in the worst case may convert from format2 to format1. So use the size of a format1 table as the max size.
2022-10-11 14:06:04 -06:00
Khaled Hosny 3ce4b8f5c9 5.3.0 2022-10-08 19:10:07 +02:00
Garret Rieger 99f4668e19 [repacker] use mutable copies of Coverage/ClassDef in MarkBasePos shrink operation.
Also make mutable copies (when needed) of the top level subtables during a split operation.
2022-09-30 10:58:50 -06:00
Garret Rieger 8f1bf23cc9 [subset] optimize glyf subsetting w/ retain gids.
When retain gids is enabled the subset plan may require the output of many empty glyphs. This change optimizes the glyf subsetting code when the number of retained glyphs << number of output glyphs. Unnessecary lookups to the glyph map are reduced by iterating through the glyph map instead of the output glyph set.
2022-09-29 15:44:49 -06:00
Qunxin Liu e94fe2adf3 [instance] minor optimizations to glyf instancing 2022-09-29 12:14:43 -06:00
Qunxin Liu b90ce34a25 [instance] fix for non-empty .notdef glyph metrics update
we need pass in source glyph's outline data to calculate boundaries, and
then drop the outline data if notdef-outline is specified.

Also disable shifting points for instancing in get_points () API
2022-09-29 12:14:43 -06:00
Qunxin Liu b706c6f77e [instance] update FeatureList with variations 2022-09-29 12:14:43 -06:00
Qunxin Liu 8f3a7017c3 [instance] support FeatureVariations table 2022-09-29 12:14:43 -06:00
Qunxin Liu f4813e3b7f [instance] update collect_lookups/prune_features()/closure_features() with variations
Some features will be substituted with variations, so we do not collect
lookups from the original feature tables.
2022-09-29 12:14:43 -06:00
Qunxin Liu 64e2f2fc58 [instance] store active featurevariation record/condition idxes in the plan 2022-09-29 12:14:43 -06:00
Qunxin Liu 0a6c16a313 [instance] instantiate fvar table
Added an old->new axes_indices mapping in the subset plan
2022-09-29 12:14:43 -06:00
Behdad Esfahbod 486fc2271a [cplusplus] Add missing const 2022-09-28 15:11:45 -06:00
Qunxin Liu c335bf469f support dereferencing shared_ptrs and unique_ptrs 2022-09-27 15:44:29 -06:00
Garret Rieger 8cd7d1c3fe [subset] Allow table ordering on the face builder to be overriden. 2022-09-22 16:52:14 -06:00
Behdad Esfahbod b70032edda [layout] Fix typo in docs 2022-09-22 15:59:16 -06:00
Khaled Hosny d2966d3919 [ot-font] Try CBDT extents before outline tables
Like we do for sbix table.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3827
2022-09-22 15:50:27 -06:00
Behdad Esfahbod 1fdf046427
Merge pull request #3799 from harfbuzz/optical-bounds
Optical bounds
2022-09-22 12:03:17 -06:00
David Corbett 3ca5fbda76 [USE] Update the data files
This uses the data files from
<3254c94606/USE>
and closes #3817.
2022-09-21 16:28:02 -06:00
Behdad Esfahbod b78d4b1e58 [color] Fix documentation re UPEM vs PPEM
Fixes https://github.com/harfbuzz/harfbuzz/issues/3826
2022-09-21 13:27:12 -06:00
Behdad Esfahbod 56c4670935 [subset] Fix compiler warning
Fixes https://github.com/harfbuzz/harfbuzz/issues/3823
2022-09-20 17:40:13 -06:00
Behdad Esfahbod c02a1a4adc [ot-font] Remove unused include 2022-09-20 17:40:13 -06:00
David Corbett d7cc82ad48 Update the language system tag registry URL 2022-09-20 10:37:50 -06:00
Jonathan Kew f54d2b3e2c [aat] Map 'rlig' to AAT required-ligatures setting.
Fixes #3819.
2022-09-20 10:37:27 -06:00
Khaled Hosny d827a5ee40 [subset] Skip glyph closure for any dropped table
If COLR or MATH tables are being dropped, there is no point in closing
glyphs over them, just like it is done for GSUB.
2022-09-19 13:49:42 -06:00
Khaled Hosny 4a1d891c63 5.2.0 2022-09-17 03:19:29 +02:00
Qunxin Liu 2b766e8ade [subset] No need to collect_features twice 2022-09-06 13:41:51 -06:00
David Corbett 09b9a1ffdd [USE] Allow ZWNJ at the end of a cluster 2022-09-06 11:33:12 -06:00
Qunxin Liu a3e6dbbb43 [subset] skip the script if it's not included in the final subset 2022-09-06 11:29:34 -06:00
Behdad Esfahbod 752060a49c [layout] Document hb_ot_layout_lookup_get_optical_bound() 2022-09-01 13:47:12 -06:00
Behdad Esfahbod 71c6cba097 [layout] Rename API:
-hb_ot_layout_get_optical_bound()
+hb_ot_layout_lookup_get_optical_bound()
2022-09-01 13:43:19 -06:00
Behdad Esfahbod 3892128a1f [layout] Add HB_NO_LAYOUT_RARELY_USED 2022-09-01 13:41:50 -06:00
Behdad Esfahbod 8e88653f05 [layout] Move code around 2022-09-01 13:39:26 -06:00
Behdad Esfahbod 4bf9621113 [optical-bounds] Optimize 2022-09-01 13:36:26 -06:00