Commit 7208bc40 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Initialize GSUB offsets in shaping cache.

parent b8f1aed6
...@@ -448,6 +448,7 @@ struct scriptshaping_cache ...@@ -448,6 +448,7 @@ struct scriptshaping_cache
void *context; void *context;
UINT16 upem; UINT16 upem;
struct ot_gsubgpos_table gsub;
struct ot_gsubgpos_table gpos; struct ot_gsubgpos_table gpos;
struct struct
......
...@@ -2942,6 +2942,16 @@ DWRITE_CONTAINER_TYPE opentype_analyze_container_type(void const *data, UINT32 d ...@@ -2942,6 +2942,16 @@ DWRITE_CONTAINER_TYPE opentype_analyze_container_type(void const *data, UINT32 d
void opentype_layout_scriptshaping_cache_init(struct scriptshaping_cache *cache) void opentype_layout_scriptshaping_cache_init(struct scriptshaping_cache *cache)
{ {
cache->font->grab_font_table(cache->context, MS_GSUB_TAG, &cache->gsub.table.data, &cache->gsub.table.size,
&cache->gsub.table.context);
if (cache->gsub.table.data)
{
cache->gsub.script_list = table_read_be_word(&cache->gsub.table, FIELD_OFFSET(struct gpos_gsub_header, script_list));
cache->gsub.feature_list = table_read_be_word(&cache->gsub.table, FIELD_OFFSET(struct gpos_gsub_header, feature_list));
cache->gsub.lookup_list = table_read_be_word(&cache->gsub.table, FIELD_OFFSET(struct gpos_gsub_header, lookup_list));
}
cache->font->grab_font_table(cache->context, MS_GPOS_TAG, &cache->gpos.table.data, &cache->gpos.table.size, cache->font->grab_font_table(cache->context, MS_GPOS_TAG, &cache->gpos.table.data, &cache->gpos.table.size,
&cache->gpos.table.context); &cache->gpos.table.context);
......
...@@ -52,6 +52,7 @@ void release_scriptshaping_cache(struct scriptshaping_cache *cache) ...@@ -52,6 +52,7 @@ void release_scriptshaping_cache(struct scriptshaping_cache *cache)
return; return;
cache->font->release_font_table(cache->context, cache->gdef.table.context); cache->font->release_font_table(cache->context, cache->gdef.table.context);
cache->font->release_font_table(cache->context, cache->gsub.table.context);
cache->font->release_font_table(cache->context, cache->gpos.table.context); cache->font->release_font_table(cache->context, cache->gpos.table.context);
heap_free(cache); heap_free(cache);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment