src/hb-ot-var-common.hh


Log

Author Commit Date CI Message
Behdad Esfahbod ffe955b9 2025-02-26T13:40:18 [GVAR] Change offsetToData size to 24bit As per https://github.com/harfbuzz/boring-expansion-spec/issues/162
Behdad Esfahbod b12612f5 2025-02-25T13:47:06 Fix compiler warnings
Behdad Esfahbod aaecaa4c 2025-02-24T22:03:00 [vector] Disallow accidental creation of transient vectors Fix sites that were doing this under our feet. This lowers precision of some instancing operations from double to float, which modifies a few results by rounding error. TODO: Update tests.
Qunxin Liu 622e9c33 2024-11-06T10:59:17 [instancer] fix for incorrect offset calculation when we have gvar padding
Behdad Esfahbod 2ba0b9ee 2024-08-29T11:41:28 Turn some byte data into unsigned char, from char Fixes https://github.com/harfbuzz/harfbuzz/issues/4844
Qunxin Liu 72502ef0 2024-08-12T14:08:06 [instancer] dont return false when variation data is empty after partial instancing
Behdad Esfahbod 0037ee28 2024-05-24T08:10:15 Merge pull request #4578 from harfbuzz/varc-table `VARC` table
Behdad Esfahbod fecc5789 2024-05-23T16:23:21 [var] Minor, make a function a template
Garret Rieger 3f38ffd6 2024-05-13T18:50:43 [subset] Fix remaining double conversion warnings.
Garret Rieger b74a7ecc 2024-05-07T19:53:01 Fix IUP differences accoss platforms. - Slightly increase the tolerance to account for differences in floating point math across platforms. - The specific issue is a fused multiply add (d = d1 + (x - x1) * scale; in hb-subset-instancer-iup.cc) - Also fix more implicit double conversion warnings.
Behdad Esfahbod ca642570 2024-05-07T10:19:30 Rename result_t to rebase_tent_result_t
Garret Rieger e81c8c13 2024-05-03T18:06:14 Change tolerance from float to double.
Behdad Esfahbod 66cd7c04 2024-04-23T13:09:22 [Condition] Shuffle code around
Behdad Esfahbod a94a5c63 2024-04-16T17:10:43 [varc] Add get_point_at to glyf/CFF2
Behdad Esfahbod 763f8390 2024-03-15T11:45:39 [TupleValues] Move compile/decompile here
Behdad Esfahbod b24511d2 2024-03-15T11:00:31 [TupleVariations] Rename encode/unpack to compile/decompile
Behdad Esfahbod 8ccebae1 2024-03-15T10:53:25 [TupleVariations] Simplify encode API
Behdad Esfahbod 3d0c03ae 2024-03-15T10:48:18 [TupleVariations] Take array instead of vector in encode
Behdad Esfahbod 0dcdbb4f 2024-02-06T16:23:48 [VARC] Add consume_all to unpack_deltas() Untested.
Behdad Esfahbod bd795373 2024-02-06T14:38:21 [TupleValues] Encode 32bit values https://github.com/harfbuzz/boring-expansion-spec/blob/main/VARC.md#tuplevalues
Behdad Esfahbod 0c605453 2024-02-06T14:29:50 [TupleValues] Decode 32bit values https://github.com/harfbuzz/boring-expansion-spec/blob/main/VARC.md#tuplevalues
Behdad Esfahbod e1d0ee3b 2024-04-16T17:10:05 [var] Mark a few methods as static
Behdad Esfahbod a69a6cb0 2024-04-16T17:08:06 Avoid a copy
Garret Rieger 2cfa5505 2024-03-27T23:21:57 [instancer] Switch to doubles for delta calculations. FontTools uses double's internally so match FontTool's precision so we get the same results more often for floating point calculations.
Bruce Mitchener 3cfdbd67 2024-02-16T23:41:55 Use `noexcept` on swap, move constructors, etc.
Behdad Esfahbod 031fdb1c 2024-02-06T14:51:41 Rename VarStoreInstancer to ItemVarStoreInstancer
Behdad Esfahbod 1cb47eff 2024-02-06T14:49:31 Rename VariationStore to ItemVariationStore
Qunxin Liu f072de93 2024-01-30T10:31:14 [instancer] move iup code to a seprate file
Qunxin Liu 4d5fb233 2024-01-26T16:00:58 fix build
Qunxin Liu 0cbc8123 2024-01-26T11:26:10 [instancer] add iup_optimize() call into instantiation
Qunxin Liu a3e3473c 2024-01-26T10:34:58 [instancer] when iup delta opt is enabled, add default deltas to coords
Qunxin Liu f1cdcc70 2024-01-26T10:12:38 [instancer] add iup delta optimization functions tuple_delta_t ported from fonttools
Qunxin Liu 8ad540bb 2024-01-26T09:58:48 [instancer] move compile_point_set to be a member of tuple_delta_t Also change hb_bytes_t to vector for memory safety
Behdad Esfahbod 7ee7e2e3 2023-11-04T15:02:28 [sanitize] Add remaining hb_barrier() annotations I'm sure I've forgot some. But this is a good start.
Behdad Esfahbod b5329459 2023-11-01T16:53:26 [tuple_delta_t] Micro-optimize encoding vector access
Behdad Esfahbod 59cfb4c5 2023-11-01T16:25:50 [instancing] Micro-optimize a loop
Behdad Esfahbod 29d49ece 2023-11-01T15:55:47 [vector] Introduce realloc_moves tag Some types (even aggregate) can be moved using realloc(). Extend the fast path to hb_hashmap and tuple_delta_t.
Qunxin Liu 1a5dd610 2023-10-16T09:47:16 [instancer] retain empty rows when region is empty and item_count is not
Qunxin Liu 1f395cba 2023-10-12T10:06:00 [instancer] templatize the priority queue, use custom type for varstore when instantiating varstore, we need to pop a tuple like (combined_gain, i, j), if combined gain is the same then we compare the value of i, and then j. So we'd like to use custom type as the key when popping from the queue. This would match fonttool's algorithm cause it uses heappop().
Qunxin Liu f9b04b21 2023-09-27T09:36:52 [instancer] match fonttools'r order when calculating chars Also fix a bug, make sure map set is happening before std::move
Qunxin Liu c8c97864 2023-09-21T11:29:43 [instancer] simplify item_variations_t API calls merge create,instantiate and as_item_varstore into one API
Qunxin Liu ef4ff1d6 2023-09-20T11:35:33 [instancer] make varstore items sorting method match fonttool's Also update expected tests
Qunxin Liu b5f7ca1a 2023-09-20T11:28:15 [instancer] fix bots
Qunxin Liu e81ad14d 2023-09-19T13:23:58 [instancer] change optimize() to as_item_varstore() which allows another option to skip optimization
Qunxin Liu 97d0e7a1 2023-09-19T11:25:14 [instancer] add inner_maps as optional argument when creating item_variations_t This allows that we create item_variations_t with only a subset of the original varstore
Qunxin Liu 7741fa32 2023-09-18T10:44:47 [instancer] bug fix: dont add duplicate rows into delta_row_encoding_t Also fix compile_varidx_map()
Qunxin Liu 6c658b41 2023-09-15T11:49:47 [instancer] bug fix
Qunxin Liu 11cc4796 2023-09-11T09:57:14 [instancer] fix columns and get_chars_overhead() in delta_row_encoding_t make columns a vector of uint8_t so it supports more than 32 columns
Qunxin Liu b153af85 2023-08-31T13:12:08 [instancer] add optimize(), which optimizes varstore's storage
Qunxin Liu 3565ad81 2023-08-31T13:07:54 [instancer] add build_region_list() method
Qunxin Liu e4db29b1 2023-08-31T12:59:39 [instancer] add instantiate() method Also make change_tuple_variations_axis_limits() deterministic, use sorted vector instead of iterating map keys
Qunxin Liu 5f058a93 2023-08-31T12:55:04 [instancer] add create_from_item_varstore () method
Qunxin Liu 15244888 2023-08-31T12:40:30 [instancer] add struct definition item_variations_t And struct delta_row_encoding_t
Ben Wagner 4cfc6d8e 2023-08-31T13:54:34 Specify tuple_variations_t special member functions Building with clang complains about the use of `tuple_variations_t`'s implicit copy constructor and copy assignment operator, since automatic generation of these is deprecated when declaring a non-default destructor. This is a good warning because it isn't obvious that copies were being made instead of the object being moved and this struct should be moved and not copied. Declare all the special member functions, defaulting the moves and deleting the copies. After making `tuple_variations_t` move only, an issue is revealed in `hb_vector_t::push` which has been requiring that objects be copyable. Remove the old non-emplacing `push` now that this works with all existing objects and make a single `push` which is more like `std::vector::emplace_back` since that is somewhat what the newer `push` is attempting to do.
Behdad Esfahbod 2023384b 2023-08-22T13:09:26 Merge pull request #4368 from googlefonts/support_gvar Initial implementation for gvar partial instancing
Qunxin Liu dd8d3576 2023-08-22T12:54:50 [instancer] enable partial instancing tests when experimental api is on
Qunxin Liu bea26446 2023-08-15T14:20:54 [instancer] reference all points for gvar If a point is not referenced and delta is not inferred, set delta to 0
Behdad Esfahbod 8d19274c 2023-08-14T14:40:26 [layout] Speed up VarStoreInstancer
Qunxin Liu 366ffd1e 2023-08-07T10:32:47 [instancer] fix move constructor for tuple_delta_t
Qunxin Liu 5a4694b6 2023-08-07T09:55:30 [instancer] add calc_inferred_deltas() for gvar
Qunxin Liu fb447274 2023-08-07T09:44:41 [instancer] add instantiate () for gvar
Qunxin Liu 746b112f 2023-08-07T09:26:42 [instancer] add serialize () for gvar
Qunxin Liu 3c86b096 2023-07-28T16:18:51 [instancer] Add instantiate () and compile_bytes() for gvar -Also add support for using shared_points and shared_tuples
Qunxin Liu 198612c1 2023-07-28T15:41:54 [instancer] add decompile_glyph_variations () for gvar
Qunxin Liu a0f810ef 2023-07-28T15:04:47 [instancer] add struct glyph_variations_t for gvar -Add compile_peak_coords () in tuple_delta_t -Add compile_shared_tuples () for glyph_variations_t
Qunxin Liu 45a0d65c 2023-07-27T09:06:02 [instancer] cosmetic change
Behdad Esfahbod b36b100e 2023-07-26T14:42:46 [var] Remove byte_data_t; use hb_bytes_t Now that we have hopefully fixed the bug preventing hb_bytes_t use, remove the hack. Ref. 5690840ceb190341f9960d2b975c4366566ae86b https://github.com/harfbuzz/harfbuzz/issues/4138
Qunxin Liu 5cab0709 2023-07-26T09:56:07 [instancer] fix for missing to update tuple indices flag in operator +=
Qunxin Liu 515f85d5 2023-07-24T11:10:17 [instancer] fix incorrect encoded_len
Qunxin Liu bccdcf5b 2023-07-21T10:17:43 [instancer] fix a bug in compiling deltas_y for gvar
Qunxin Liu 12be4cb1 2023-07-17T11:08:54 [instancer-solver] fix APIs calling rebase_tent() with TripleDistances
Behdad Esfahbod c14f94f7 2023-07-10T16:28:22 Fix compiler error hb-ot-var-common.hh:758:32: error: implicit conversion from 'int' to 'char' changes value from 191 to -65 [-Werror, -Wconstant-conversion] *it++ = (DELTAS_ARE_ZERO | 63);
Behdad Esfahbod b583978b 2023-07-08T20:41:58 [subset/DeltaSetMapIndex] Speedup retaingids serialize()
Behdad Esfahbod 3505486a 2023-07-08T20:28:45 [subset/DeltaSetMapIndex] Micro-optimize
Behdad Esfahbod e92eefaa 2023-07-02T11:35:51 [gvar] Cache two values in shared_tuple_active_idx Speeds up varc-hangul.ttf draw_glyph by 10%.
Behdad Esfahbod 99db06b4 2023-06-26T17:30:31 [var] Simplify a couple of copy operations
Behdad Esfahbod 73bcd3f2 2023-06-26T17:24:40 [var] Adjust a few allocations to not clean space Since we immediately copy.
Qunxin Liu b10cff99 2023-06-20T13:36:10 [instancer] address review comments manage memory through vector when possible
Qunxin Liu e39e0201 2023-06-20T11:48:53 [instancer] add serialize() method for TupleVariationData
Qunxin Liu 5ef0199d 2023-06-20T11:39:20 [instancer] instantiate() and compile_bytes () for tuple_variations_t Also add testing code
Qunxin Liu 48c70ce5 2023-06-20T11:30:51 [instancer] add compile_tuple_var_header()
Qunxin Liu 6354b71f 2023-06-20T11:24:05 [instancer] add compile_deltas() for tuple_delta_t
Qunxin Liu a00ad83a 2023-06-20T11:17:11 [instancer] add encode_delta_run()
Qunxin Liu 19e5033b 2023-06-20T11:02:41 [instancer] add compile_all_point_sets() and find_shared_points () compiled bytes for points set are stored in a hashmap
Qunxin Liu 065e0af5 2023-06-20T10:58:24 [instancer] add compile_point_set() for tuple_variations_t Also add a byte_data_t struct to store compiled bytes
Qunxin Liu e41b688b 2023-06-12T13:25:19 [instancer] fix bug in tuple varstore decompiling when points count is 0, it means deltas will apply to all points
Qunxin Liu 3669a627 2023-06-08T13:26:37 fix bot
Qunxin Liu 9fd36766 2023-06-08T12:27:36 [instancer] add testing code for change_tuple_variation_axis_limits() Also fixed a small bug
Qunxin Liu 8057661f 2023-06-08T12:10:27 [instancer] use axis tag as hashmap key instead of axis index This makes remove_axis() and set_tent() faster, which are used by change_axis_limits ()
Qunxin Liu 389446c5 2023-06-08T09:07:47 [instancer] add merge_tuple_variations ()
Qunxin Liu 01f9b797 2023-06-05T17:26:20 address review comments
Qunxin Liu 796a0df9 2023-06-05T15:33:43 try to fix bot
Qunxin Liu 2012df07 2023-06-05T13:46:04 [instancer] add struct tuple_variation_t And add function to decompile TupleVariationData into the struct
Qunxin Liu 9f508b73 2023-06-05T13:35:28 [instancer] add unpack_axis_tuples () in TupleVariationHeader
Qunxin Liu 7b0ecbd8 2023-06-05T13:08:12 [instancer] add struct tuple_delta_t to represent 1 tuple variation
Behdad Esfahbod 82741304 2023-06-04T09:41:41 [subset] start_embed never returns nullptr Remove checks.
Qunxin Liu 1ae99d1a 2023-06-01T15:22:26 bug fix
Behdad Esfahbod 9b5afad4 2023-04-27T12:38:44 [var] Fix assertion Fixes https://oss-fuzz.com/testcase-detail/4861707188305920
Behdad Esfahbod 5d1a603a 2023-04-26T16:25:15 [var] Fix compiler warnings
Behdad Esfahbod af393e96 2023-04-26T16:02:06 [gvar] Refactor a variable