Commit a23d21a9 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

dwrite: Use the debugstr_fourcc function instead of reimplementing it.

parent beb1805c
......@@ -208,7 +208,7 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last
const char *debugstr_sa_script(UINT16 script)
{
return script < Script_LastId ? debugstr_tag(dwritescripts_properties[script].props.isoScriptCode) : "undefined";
return script < Script_LastId ? debugstr_fourcc(dwritescripts_properties[script].props.isoScriptCode) : "undefined";
}
static const struct fallback_description
......@@ -1508,7 +1508,7 @@ static void analyzer_dump_user_features(DWRITE_TYPOGRAPHIC_FEATURES const **feat
for (i = 0, start = 0; i < feature_ranges; 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_tag(features[i]->features[j].nameTag),
TRACE("feature %s, parameter %u\n", debugstr_fourcc(features[i]->features[j].nameTag),
features[i]->features[j].parameter);
}
}
......@@ -2188,7 +2188,7 @@ static HRESULT WINAPI dwritetextanalyzer2_CheckTypographicFeature(IDWriteTextAna
struct dwrite_fontface *font_obj;
HRESULT hr;
TRACE("%p, %p, %u, %s, %s, %u, %p, %p.\n", iface, fontface, sa.script, debugstr_w(locale), debugstr_tag(feature),
TRACE("%p, %p, %u, %s, %s, %u, %p, %p.\n", iface, fontface, sa.script, debugstr_w(locale), debugstr_fourcc(feature),
glyph_count, glyphs, feature_applies);
if (sa.script > Script_LastId)
......
......@@ -108,11 +108,6 @@ static inline BOOL dwrite_array_reserve(void **elements, size_t *capacity, size_
return TRUE;
}
static inline const char *debugstr_tag(DWORD tag)
{
return debugstr_an((char *)&tag, 4);
}
const char *debugstr_sa_script(UINT16) DECLSPEC_HIDDEN;
static inline unsigned short get_table_entry_16(const unsigned short *table, WCHAR ch)
......
......@@ -674,7 +674,7 @@ const void* get_fontface_table(IDWriteFontFace5 *fontface, UINT32 tag, struct dw
hr = IDWriteFontFace5_TryGetFontTable(fontface, tag, (const void **)&table->data, &table->size, &table->context,
&table->exists);
if (FAILED(hr) || !table->exists) {
TRACE("Font does not have %s table\n", debugstr_tag(tag));
TRACE("Font does not have %s table\n", debugstr_fourcc(tag));
return NULL;
}
......@@ -1050,7 +1050,7 @@ static HRESULT WINAPI dwritefontface_TryGetFontTable(IDWriteFontFace5 *iface, UI
struct dwrite_fontface *fontface = impl_from_IDWriteFontFace5(iface);
struct file_stream_desc stream_desc;
TRACE("%p, %s, %p, %p, %p, %p.\n", iface, debugstr_tag(table_tag), table_data, table_size, context, exists);
TRACE("%p, %s, %p, %p, %p, %p.\n", iface, debugstr_fourcc(table_tag), table_data, table_size, context, exists);
stream_desc.stream = fontface->stream;
stream_desc.face_type = fontface->type;
......
......@@ -5413,7 +5413,7 @@ static HRESULT WINAPI dwritetypography_AddFontFeature(IDWriteTypography *iface,
{
struct dwrite_typography *typography = impl_from_IDWriteTypography(iface);
TRACE("%p, %s, %u.\n", iface, debugstr_tag(feature.nameTag), feature.parameter);
TRACE("%p, %s, %u.\n", iface, debugstr_fourcc(feature.nameTag), feature.parameter);
if (!dwrite_array_reserve((void **)&typography->features, &typography->capacity, typography->count + 1,
sizeof(*typography->features)))
......
......@@ -3140,7 +3140,7 @@ static unsigned int opentype_get_sbix_formats(IDWriteFontFace5 *fontface)
ret |= DWRITE_GLYPH_IMAGE_FORMATS_TIFF;
break;
default:
FIXME("unexpected bitmap format %s\n", debugstr_tag(GET_BE_DWORD(glyph_data->graphic_type)));
FIXME("unexpected bitmap format %s\n", debugstr_fourcc(GET_BE_DWORD(glyph_data->graphic_type)));
}
}
}
......
......@@ -272,8 +272,8 @@ HRESULT shape_get_positions(struct scriptshaping_context *context, const unsigne
if ((language = shape_select_language(cache, MS_GPOS_TAG, script_index, language, &language_index)))
{
TRACE("script %s, language %s.\n", debugstr_tag(script), language != ~0u ?
debugstr_tag(language) : "deflangsys");
TRACE("script %s, language %s.\n", debugstr_fourcc(script), language != ~0u ?
debugstr_fourcc(language) : "deflangsys");
opentype_layout_apply_gpos_features(context, script_index, language_index, &features);
}
}
......
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