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

dwrite: Test simulations mask bitwise for consistency.

This has no functional impact. Internal function is only called with one bit set at a time, but there is no reason to make it more confusing. Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c5c4e833
......@@ -4022,7 +4022,7 @@ static HRESULT init_font_data(const struct fontface_desc *desc, struct dwrite_fo
return S_OK;
}
static HRESULT init_font_data_from_font(const struct dwrite_font_data *src, DWRITE_FONT_SIMULATIONS sim,
static HRESULT init_font_data_from_font(const struct dwrite_font_data *src, DWRITE_FONT_SIMULATIONS simulations,
const WCHAR *facenameW, struct dwrite_font_data **ret)
{
struct dwrite_font_data *data;
......@@ -4035,10 +4035,10 @@ static HRESULT init_font_data_from_font(const struct dwrite_font_data *src, DWRI
*data = *src;
data->refcount = 1;
data->simulations |= sim;
if (sim == DWRITE_FONT_SIMULATIONS_BOLD)
data->simulations |= simulations;
if (simulations & DWRITE_FONT_SIMULATIONS_BOLD)
data->weight = DWRITE_FONT_WEIGHT_BOLD;
else if (sim == DWRITE_FONT_SIMULATIONS_OBLIQUE)
if (simulations & DWRITE_FONT_SIMULATIONS_OBLIQUE)
data->style = DWRITE_FONT_STYLE_OBLIQUE;
memset(data->info_strings, 0, sizeof(data->info_strings));
data->names = NULL;
......
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