|
|
|
@ -29,22 +29,33 @@ |
|
|
|
|
namespace graph { |
|
|
|
|
|
|
|
|
|
gsubgpos_graph_context_t::gsubgpos_graph_context_t (hb_tag_t table_tag_, |
|
|
|
|
graph_t& graph_, |
|
|
|
|
hb_vector_t<char>& buffer_) |
|
|
|
|
graph_t& graph_) |
|
|
|
|
: table_tag (table_tag_), |
|
|
|
|
graph (graph_), |
|
|
|
|
buffer (buffer_), |
|
|
|
|
lookup_list_index (0), |
|
|
|
|
lookups () |
|
|
|
|
lookups (), |
|
|
|
|
buffers () |
|
|
|
|
{ |
|
|
|
|
if (table_tag_ != HB_OT_TAG_GPOS |
|
|
|
|
&& table_tag_ != HB_OT_TAG_GSUB) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
GSTAR* gstar = graph::GSTAR::graph_to_gstar (graph_); |
|
|
|
|
if (gstar) { |
|
|
|
|
gstar->find_lookups (graph, lookups); |
|
|
|
|
lookup_list_index = gstar->get_lookup_list_index (graph_); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
unsigned gsubgpos_graph_context_t::create_node (unsigned size) |
|
|
|
|
{ |
|
|
|
|
char* buffer = (char*) hb_calloc (1, size); |
|
|
|
|
if (!buffer) |
|
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
buffers.push (buffer); |
|
|
|
|
|
|
|
|
|
unsigned extension_size = OT::ExtensionFormat1<OT::Layout::GSUB_impl::ExtensionSubst>::static_size; |
|
|
|
|
buffer.alloc (num_non_ext_subtables () * extension_size); |
|
|
|
|
return graph.new_node (buffer, buffer + size); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
unsigned gsubgpos_graph_context_t::num_non_ext_subtables () { |
|
|
|
|