Commit Graph
13519 Commits
Author SHA1 Message Date
Qunxin Liu c8594baa47 [instancer] instantiate GDEF varStore
And update layout var idxes accordingly
2023-09-27 10:58:39 -07:00
Qunxin Liu 77f24d822e [instancer] remap layout var_idxes code update
make hb_collect_variation_indices_context_t only collect layout
variation indices.
2023-09-27 10:46:45 -07:00
Qunxin Liu c8c97864e8 [instancer] simplify item_variations_t API calls
merge create,instantiate and as_item_varstore into one API
2023-09-25 10:41:52 -06:00
inobelar 69da5aae02 Added minor fixes to build without errors with gcc 4.9.2 2023-09-23 11:54:01 -06:00
Duncan Overbruck b8121ccbb6 [meson] keep asserts in test programs 2023-09-21 10:04:46 -06:00
Qunxin Liu 5aa4865a86 [instancer] fix compile warnings
In constructor ‘OT::delta_row_encoding_t::delta_row_encoding_t(OT::delta_row_encoding_t&&)’,
    inlined from ‘Type* hb_vector_t<Type, sorted>::push(Args&& ...) [with Args = {OT::delta_row_encoding_t}; Type = OT::delta_row_encoding_t; bool sorted = false]’ at ../src/hb-vector.hh:221:12,
    inlined from ‘bool OT::item_variations_t::as_item_varstore(bool, bool)’ at ../src/hb-ot-var-common.hh:1985:24:
../src/hb-ot-layout-common.hh:2304:8: warning: ‘obj.OT::delta_row_encoding_t::width’ may be used uninitialized [-Wmaybe-uninitialized]
 2304 | struct delta_row_encoding_t
      |        ^~~~~~~~~~~~~~~~~~~~
../src/hb-ot-var-common.hh: In member function ‘bool OT::item_variations_t::as_item_varstore(bool, bool)’:
../src/hb-ot-var-common.hh:1981:30: note: ‘obj.OT::delta_row_encoding_t::width’ was declared here
 1981 |         delta_row_encoding_t obj;
      |                              ^~~
In constructor ‘OT::delta_row_encoding_t::delta_row_encoding_t(OT::delta_row_encoding_t&&)’,
    inlined from ‘Type* hb_vector_t<Type, sorted>::push(Args&& ...) [with Args = {OT::delta_row_encoding_t}; Type = OT::delta_row_encoding_t; bool sorted = false]’ at ../src/hb-vector.hh:221:12,
    inlined from ‘bool OT::item_variations_t::as_item_varstore(bool, bool)’ at ../src/hb-ot-var-common.hh:1985:24:
../src/hb-ot-layout-common.hh:2304:8: warning: ‘obj.OT::delta_row_encoding_t::overhead’ may be used uninitialized [-Wmaybe-uninitialized]
 2304 | struct delta_row_encoding_t
      |        ^~~~~~~~~~~~~~~~~~~~
../src/hb-ot-var-common.hh: In member function ‘bool OT::item_variations_t::as_item_varstore(bool, bool)’:
../src/hb-ot-var-common.hh:1981:30: note: ‘obj.OT::delta_row_encoding_t::overhead’ was declared here
 1981 |         delta_row_encoding_t obj;
2023-09-20 17:05:47 -06:00
Behdad Esfahbod 4b3aa0104e Merge pull request #4410 from googlefonts/HVAR_instance
[instancer] instantiate HVAR/VVAR
2023-09-20 14:37:42 -06:00
Thomas Petillon da2c59d71f [instancer] Delete redundant code block in cvar subsetting
That case is handled in hb-subset.cc.

It also made compilation with HB_NO_VAR fail because it accessed table.fvar.
2023-09-20 14:36:50 -06:00
Thomas Petillon 284889b031 [subset] Drop fvar, avar, cvar, MVAR tables when in HB_NO_VAR mode 2023-09-20 14:36:50 -06:00
Qunxin Liu ef4ff1d6a4 [instancer] make varstore items sorting method match fonttool's
Also update expected tests
2023-09-20 11:45:00 -07:00
Qunxin Liu b5f7ca1ab4 [instancer] fix bots 2023-09-20 11:28:15 -07:00
Qunxin Liu 5ec21d4af4 [instancer] fix delta_row_encoding_t constructor
always move chars_
2023-09-20 12:11:54 -06:00
Qunxin Liu 58e5d45de8 [instancer] instantiate HVAR/VVAR 2023-09-20 10:12:34 -07:00
Qunxin Liu e81ad14dba [instancer] change optimize() to as_item_varstore()
which allows another option to skip optimization
2023-09-20 10:00:24 -07:00
Qunxin Liu 97d0e7a19f [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
2023-09-20 09:58:33 -07:00
Behdad Esfahbod 005582e0cb Merge pull request #4370 from 2xsaiko/outgoing/cmake-now-for-real
Re-do and clean up CMake support, making it use relocatable paths
2023-09-20 09:10:10 -06:00
Marco Rebhan da9b838910 Re-do and clean up CMake support, making it use relocatable paths
Closes #4025.
2023-09-20 08:35:15 +02:00
Marco Rebhan b5a1c2b483 Revert "Pass through absolute paths to cmake config directly"
This reverts commit db292f6f02.
2023-09-18 23:13:16 +02:00
Qunxin Liu c330c29175 [instancer] add a unit testcase for instantiating item variations 2023-09-18 12:24:05 -07:00
Qunxin Liu 7741fa3299 [instancer] bug fix: dont add duplicate rows into delta_row_encoding_t
Also fix compile_varidx_map()
2023-09-18 12:20:36 -07:00
Qunxin Liu 6c658b4105 [instancer] bug fix 2023-09-18 12:20:36 -07:00
Qunxin Liu 11cc479646 [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
2023-09-18 12:20:36 -07:00
Qunxin Liu 6e49128afd [instancer] always check and update default wght/width/slnt if necessary
Sometimes default values in original file are incorrect, and if default value for an axis is not changed, then these values won't be updated
2023-09-18 12:20:36 -07:00
Qunxin Liu 45c2d05d00 [instancer] add subset() for MVAR 2023-09-18 12:20:36 -07:00
Qunxin Liu e4e1ac44f0 [instancer] add serialize() for VariationStore
Input region_list and encoding_rows are from item_variations_t
2023-09-18 12:20:36 -07:00
Qunxin Liu 2326879229 [instancer] add serialize() for VarRegionList
The region list argument comes from item_variations_t.get_region_list()
2023-09-18 12:20:36 -07:00
Qunxin Liu b153af8553 [instancer] add optimize(), which optimizes varstore's storage 2023-09-18 12:20:36 -07:00
Qunxin Liu 3565ad8150 [instancer] add build_region_list() method 2023-09-18 12:20:36 -07:00
Qunxin Liu e4db29b102 [instancer] add instantiate() method
Also make change_tuple_variations_axis_limits() deterministic, use
sorted vector instead of iterating map keys
2023-09-18 12:20:35 -07:00
Qunxin Liu 5f058a9338 [instancer] add create_from_item_varstore () method 2023-09-18 12:20:35 -07:00
Qunxin Liu 152448881f [instancer] add struct definition item_variations_t
And struct delta_row_encoding_t
2023-09-18 12:20:35 -07:00
Khaled Hosny 0967a3e24a 8.2.1 2023-09-18 21:18:49 +03:00
David Corbett c6d53ab570 [Unicode 15.1] Update the vowel constraint table 2023-09-16 10:21:11 -04:00
David Corbett f318e104be [Unicode 15.1] Update the Indic table 2023-09-16 10:20:14 -04:00
David Corbett c03e4c10a4 [Unicode 15.1] Update emoji table and cluster test 2023-09-16 10:06:24 -04:00
David Corbett d8d4a192bd Update IANA Language Subtag Registry to 2023-08-02 2023-09-16 10:00:07 -04:00
David Corbett 6ed6ccac4c [Unicode 15.1] Update the USE table 2023-09-16 09:54:21 -04:00
David Corbett f485b6a9c0 [Unicode 15.1] Update the Arabic joining script list 2023-09-16 09:49:29 -04:00
David Corbett f15fe52442 [Unicode 15.1] Update the Arabic table 2023-09-16 09:45:51 -04:00
David Corbett b3705cbf07 [Unicode 15.1] Update the UCD table 2023-09-16 09:40:56 -04:00
David Corbett 767f937833 [USE] Update the data files
This uses the data files from
<https://github.com/microsoft/font-tools/tree/9e02b86c85d1a98a1d411e565d36723468f9e884/USE>
and closes #4404.
2023-09-16 09:25:39 -04:00
David Corbett 02c2e24749 Regenerate files using Ragel 6.10 2023-09-16 09:22:43 -04:00
Behdad Esfahbod 978918c32a [aat] Simplify complex condition
Based on https://github.com/RazrFalcon/rustybuzz/discussions/79#discussioncomment-6960324
2023-09-11 11:04:08 +01:00
Vincent Torri 17ee3cd7f4 fix warning with unsigned long 2023-09-10 11:34:30 +03:00
Khaled Hosny c1eb66d415 8.2.0 2023-09-08 22:02:35 +03:00
L. E. Segovia 15bc9e342f [meson] Detect Microsoft compilers through _MSC_FULL_VER
Microsoft ships three compilers nowadays: MSVC, clang-cl, and Clang.
The latter is always skipped by `compiler.get_argument_syntax()`,
which leads to the incorrect export macro being applied.

This commit also removes the tests that are affected in Microsoft Clang.
2023-09-06 10:04:29 +03:00
Qunxin Liu fd3eb2c672 fuzzer fix: https://oss-fuzz.com/testcase-detail/6032126569742336 2023-09-05 21:51:02 +03:00
Behdad Esfahbod 0340ba1c50 [bit-page] Add a few operators 2023-09-05 14:56:09 +03:00
Ben Wagner 4cfc6d8e17 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.
2023-08-31 22:49:42 +03:00
Garret Rieger 8d22a57065 [repacker] fix potential use after free in repacker.
During table splitting we iterate over the lookups map which can be modified during table splitting. This can result in a use after free in the iterator. Create a local copy of the lookup indices to avoid this.
2023-08-30 15:38:16 +03:00