mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-03 20:45:04 +00:00
[test] Build with HB_MINI
Also add CONFIG.md instructions for building configs with meson. Fixes https://github.com/harfbuzz/harfbuzz/issues/4760
This commit is contained in:
parent
106e4068b9
commit
49c8493f5c
5 changed files with 17 additions and 3 deletions
|
@ -130,6 +130,10 @@ The pre-defined configurations are:
|
|||
disabling thread-safety and debugging, and use even more size-optimized data
|
||||
tables.
|
||||
|
||||
To setup the build with these options use something like:
|
||||
```
|
||||
$ meson setup build -Dcpp_args=-DHB_MINI -Dc_args=-DHB_MINI
|
||||
```
|
||||
|
||||
## Tailoring configuration
|
||||
|
||||
|
@ -155,4 +159,4 @@ Note that the config option `HB_NO_CFF`, which is enabled by `HB_LEAN` and
|
|||
`HB_TINY` does *not* mean that the resulting library won't work with CFF fonts.
|
||||
The library can shape valid CFF fonts just fine, with or without this option.
|
||||
This option disables (among other things) the code to calculate glyph extents
|
||||
for CFF fonts, which many clients might not need.
|
||||
for CFF fonts or draw them, which many clients might not need.
|
||||
|
|
|
@ -491,7 +491,7 @@ _collect_base_variation_indices (hb_subset_plan_t* plan)
|
|||
base->collect_variation_indices (plan, varidx_set);
|
||||
const OT::ItemVariationStore &var_store = base->get_var_store ();
|
||||
unsigned subtable_count = var_store.get_sub_table_count ();
|
||||
|
||||
|
||||
|
||||
_remap_variation_indices (var_store, varidx_set,
|
||||
plan->normalized_coords,
|
||||
|
@ -731,7 +731,7 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
|
|||
plan->codepoint_to_glyph->alloc (unicodes->get_population () + glyphs->get_population ());
|
||||
|
||||
auto &gid_to_unicodes = plan->accelerator->gid_to_unicodes;
|
||||
|
||||
|
||||
for (hb_codepoint_t gid : *glyphs)
|
||||
{
|
||||
auto unicodes = gid_to_unicodes.get (gid);
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
static hb_face_t *face;
|
||||
static hb_face_t *sbix;
|
||||
|
||||
#ifndef HB_NO_AAT
|
||||
|
||||
static void
|
||||
test_aat_get_feature_types (void)
|
||||
{
|
||||
|
@ -114,15 +116,19 @@ test_aat_has (void)
|
|||
hb_face_destroy (trak);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
unsigned int status;
|
||||
hb_test_init (&argc, &argv);
|
||||
|
||||
#ifndef HB_NO_AAT
|
||||
hb_test_add (test_aat_get_feature_types);
|
||||
hb_test_add (test_aat_get_feature_selectors);
|
||||
hb_test_add (test_aat_has);
|
||||
#endif
|
||||
|
||||
face = hb_test_open_font_file ("fonts/aat-feat.ttf");
|
||||
sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
|
||||
|
|
|
@ -76,6 +76,7 @@ test_font (hb_font_t *font, hb_codepoint_t cp)
|
|||
hb_ot_color_has_png (face);
|
||||
hb_blob_destroy (hb_ot_color_glyph_reference_png (font, cp));
|
||||
|
||||
#ifndef HB_NO_AAT
|
||||
{
|
||||
hb_aat_layout_feature_type_t feature = HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC;
|
||||
unsigned count = 1;
|
||||
|
@ -87,6 +88,7 @@ test_font (hb_font_t *font, hb_codepoint_t cp)
|
|||
hb_aat_layout_feature_type_get_selector_infos (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, 0, &count, &setting, &default_index);
|
||||
result += count + feature + setting.disable + setting.disable + setting.name_id + setting.reserved + default_index;
|
||||
}
|
||||
#endif
|
||||
|
||||
hb_set_t *lookup_indexes = hb_set_create ();
|
||||
hb_set_add (lookup_indexes, 0);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include <hb-config.hh>
|
||||
|
||||
#include <hb.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue