[reorg] Move GSUB into OT::Layout::GSUB namespace.

This commit is contained in:
Garret Rieger 2022-03-23 16:28:22 -07:00
parent a9910e258f
commit b342adeb96
4 changed files with 18 additions and 13 deletions

View File

@ -9,9 +9,8 @@
using OT::Layout::GSUB::SubstLookup;
namespace OT {
// TODO(garretrieger): move this ot layout::GSUB namespace
//namespace Layout {
//namespace GSUB {
namespace Layout {
namespace GSUB {
/*
* GSUB -- Glyph Substitution
@ -46,14 +45,14 @@ struct GSUB : GSUBGPOS
};
struct GSUB_accelerator_t : GSUB::accelerator_t {
GSUB_accelerator_t (hb_face_t *face) : GSUB::accelerator_t (face) {}
}
}
struct GSUB_accelerator_t : Layout::GSUB::GSUB::accelerator_t {
GSUB_accelerator_t (hb_face_t *face) : Layout::GSUB::GSUB::accelerator_t (face) {}
};
//}
//}
}
#endif /* OT_LAYOUT_GSUB_GSUB_HH */

View File

@ -54,6 +54,8 @@
#include "hb-aat-layout-morx-table.hh"
#include "hb-aat-layout-opbd-table.hh" // Just so we compile it; unused otherwise.
using OT::Layout::GSUB::GSUB;
/**
* SECTION:hb-ot-layout
* @title: hb-ot-layout
@ -389,7 +391,7 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font,
*/
bool
OT::GSUB::is_blocklisted (hb_blob_t *blob HB_UNUSED,
GSUB::is_blocklisted (hb_blob_t *blob HB_UNUSED,
hb_face_t *face) const
{
#ifdef HB_NO_OT_LAYOUT_BLOCKLIST
@ -1529,7 +1531,7 @@ hb_ot_layout_lookups_substitute_closure (hb_face_t *face,
hb_map_t done_lookups_glyph_count;
hb_hashmap_t<unsigned, hb_set_t *> done_lookups_glyph_set;
OT::hb_closure_context_t c (face, glyphs, &done_lookups_glyph_count, &done_lookups_glyph_set);
const OT::GSUB& gsub = *face->table.GSUB->table;
const GSUB& gsub = *face->table.GSUB->table;
unsigned int iteration_count = 0;
unsigned int glyphs_length;
@ -1808,7 +1810,7 @@ struct GSUBProxy
table (*face->table.GSUB->table),
accels (face->table.GSUB->accels) {}
const OT::GSUB &table;
const GSUB &table;
const OT::hb_ot_layout_lookup_accelerator_t *accels;
};

View File

@ -40,6 +40,8 @@
#include "hb-ot-stat-table.hh"
#include "hb-ot-math-table.hh"
using OT::Layout::GSUB::GSUB;
typedef hb_hashmap_t<unsigned, hb_set_t *> script_langsys_map;
#ifndef HB_NO_SUBSET_CFF
@ -358,7 +360,7 @@ _populate_gids_to_retain (hb_subset_plan_t* plan,
#ifndef HB_NO_SUBSET_LAYOUT
if (close_over_gsub)
// closure all glyphs/lookups/features needed for GSUB substitutions.
_closure_glyphs_lookups_features<OT::GSUB> (
_closure_glyphs_lookups_features<GSUB> (
plan->source,
plan->_glyphset_gsub,
plan->layout_features,

View File

@ -55,6 +55,8 @@
#include "hb-ot-math-table.hh"
#include "hb-repacker.hh"
using OT::Layout::GSUB::GSUB;
/**
* SECTION:hb-subset
* @title: hb-subset
@ -312,7 +314,7 @@ _subset_table (hb_subset_plan_t *plan, hb_tag_t tag)
#ifndef HB_NO_SUBSET_LAYOUT
case HB_OT_TAG_GDEF: return _subset<const OT::GDEF> (plan);
case HB_OT_TAG_GSUB: return _subset<const OT::GSUB> (plan);
case HB_OT_TAG_GSUB: return _subset<const GSUB> (plan);
case HB_OT_TAG_GPOS: return _subset<const OT::GPOS> (plan);
case HB_OT_TAG_gvar: return _subset<const OT::gvar> (plan);
case HB_OT_TAG_HVAR: return _subset<const OT::HVAR> (plan);