Commit d1199995 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Trace user-provided OpenType feature set.

parent 2999123f
...@@ -1096,11 +1096,27 @@ static DWRITE_NUMBER_SUBSTITUTION_METHOD get_number_substitutes(IDWriteNumberSub ...@@ -1096,11 +1096,27 @@ static DWRITE_NUMBER_SUBSTITUTION_METHOD get_number_substitutes(IDWriteNumberSub
return method; return method;
} }
static void analyzer_dump_user_features(DWRITE_TYPOGRAPHIC_FEATURES const **features,
UINT32 const *feature_range_lengths, UINT32 feature_ranges)
{
UINT32 i, j, start;
if (!TRACE_ON(dwrite) || !features)
return;
for (i = 0, start = 0; i < feature_ranges; i++, start += feature_range_lengths[i]) {
TRACE("feature range [%u,%u)\n", start, start + feature_range_lengths[i]);
for (j = 0; j < features[i]->featureCount; j++)
TRACE("feature %s, parameter %u\n", debugstr_an((char *)&features[i]->features[j].nameTag, 4),
features[i]->features[j].parameter);
}
}
static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
WCHAR const* text, UINT32 length, IDWriteFontFace* fontface, BOOL is_sideways, WCHAR const* text, UINT32 length, IDWriteFontFace* fontface, BOOL is_sideways,
BOOL is_rtl, DWRITE_SCRIPT_ANALYSIS const* analysis, WCHAR const* locale, BOOL is_rtl, DWRITE_SCRIPT_ANALYSIS const* analysis, WCHAR const* locale,
IDWriteNumberSubstitution* substitution, DWRITE_TYPOGRAPHIC_FEATURES const** features, IDWriteNumberSubstitution* substitution, DWRITE_TYPOGRAPHIC_FEATURES const** features,
UINT32 const* feature_range_len, UINT32 feature_ranges, UINT32 max_glyph_count, UINT32 const* feature_range_lengths, UINT32 feature_ranges, UINT32 max_glyph_count,
UINT16* clustermap, DWRITE_SHAPING_TEXT_PROPERTIES* text_props, UINT16* glyph_indices, UINT16* clustermap, DWRITE_SHAPING_TEXT_PROPERTIES* text_props, UINT16* glyph_indices,
DWRITE_SHAPING_GLYPH_PROPERTIES* glyph_props, UINT32* actual_glyph_count) DWRITE_SHAPING_GLYPH_PROPERTIES* glyph_props, UINT32* actual_glyph_count)
{ {
...@@ -1118,9 +1134,11 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, ...@@ -1118,9 +1134,11 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
TRACE("(%s:%u %p %d %d %s %s %p %p %p %u %u %p %p %p %p %p)\n", debugstr_wn(text, length), TRACE("(%s:%u %p %d %d %s %s %p %p %p %u %u %p %p %p %p %p)\n", debugstr_wn(text, length),
length, fontface, is_sideways, is_rtl, debugstr_sa_script(analysis->script), debugstr_w(locale), substitution, length, fontface, is_sideways, is_rtl, debugstr_sa_script(analysis->script), debugstr_w(locale), substitution,
features, feature_range_len, feature_ranges, max_glyph_count, clustermap, text_props, glyph_indices, features, feature_range_lengths, feature_ranges, max_glyph_count, clustermap, text_props, glyph_indices,
glyph_props, actual_glyph_count); glyph_props, actual_glyph_count);
analyzer_dump_user_features(features, feature_range_lengths, feature_ranges);
script = analysis->script > Script_LastId ? Script_Unknown : analysis->script; script = analysis->script > Script_LastId ? Script_Unknown : analysis->script;
if (max_glyph_count < length) if (max_glyph_count < length)
...@@ -1252,7 +1270,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2 ...@@ -1252,7 +1270,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2
UINT32 text_len, UINT16 const* glyphs, DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props, UINT32 text_len, UINT16 const* glyphs, DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
UINT32 glyph_count, IDWriteFontFace *fontface, FLOAT emSize, BOOL is_sideways, BOOL is_rtl, UINT32 glyph_count, IDWriteFontFace *fontface, FLOAT emSize, BOOL is_sideways, BOOL is_rtl,
DWRITE_SCRIPT_ANALYSIS const* analysis, WCHAR const* locale, DWRITE_TYPOGRAPHIC_FEATURES const** features, DWRITE_SCRIPT_ANALYSIS const* analysis, WCHAR const* locale, DWRITE_TYPOGRAPHIC_FEATURES const** features,
UINT32 const* feature_range_len, UINT32 feature_ranges, FLOAT *advances, DWRITE_GLYPH_OFFSET *offsets) UINT32 const* feature_range_lengths, UINT32 feature_ranges, FLOAT *advances, DWRITE_GLYPH_OFFSET *offsets)
{ {
DWRITE_FONT_METRICS metrics; DWRITE_FONT_METRICS metrics;
IDWriteFontFace1 *fontface1; IDWriteFontFace1 *fontface1;
...@@ -1261,9 +1279,11 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2 ...@@ -1261,9 +1279,11 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2
TRACE("(%s %p %p %u %p %p %u %p %.2f %d %d %s %s %p %p %u %p %p)\n", debugstr_wn(text, text_len), TRACE("(%s %p %p %u %p %p %u %p %.2f %d %d %s %s %p %p %u %p %p)\n", debugstr_wn(text, text_len),
clustermap, props, text_len, glyphs, glyph_props, glyph_count, fontface, emSize, is_sideways, clustermap, props, text_len, glyphs, glyph_props, glyph_count, fontface, emSize, is_sideways,
is_rtl, debugstr_sa_script(analysis->script), debugstr_w(locale), features, feature_range_len, is_rtl, debugstr_sa_script(analysis->script), debugstr_w(locale), features, feature_range_lengths,
feature_ranges, advances, offsets); feature_ranges, advances, offsets);
analyzer_dump_user_features(features, feature_range_lengths, feature_ranges);
if (glyph_count == 0) if (glyph_count == 0)
return S_OK; return S_OK;
...@@ -1313,6 +1333,8 @@ static HRESULT WINAPI dwritetextanalyzer_GetGdiCompatibleGlyphPlacements(IDWrite ...@@ -1313,6 +1333,8 @@ static HRESULT WINAPI dwritetextanalyzer_GetGdiCompatibleGlyphPlacements(IDWrite
transform, use_gdi_natural, is_sideways, is_rtl, debugstr_sa_script(analysis->script), debugstr_w(locale), transform, use_gdi_natural, is_sideways, is_rtl, debugstr_sa_script(analysis->script), debugstr_w(locale),
features, feature_range_lengths, feature_ranges, advances, offsets); features, feature_range_lengths, feature_ranges, advances, offsets);
analyzer_dump_user_features(features, feature_range_lengths, feature_ranges);
if (glyph_count == 0) if (glyph_count == 0)
return S_OK; return S_OK;
......
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