Don't fail when language is not set
This commit is contained in:
parent
1c00a46c7a
commit
d691ba3f40
|
@ -689,8 +689,11 @@ _hb_directwrite_shape(hb_shape_plan_t *shape_plan,
|
||||||
|
|
||||||
bool backward = HB_DIRECTION_IS_BACKWARD(buffer->props.direction);
|
bool backward = HB_DIRECTION_IS_BACKWARD(buffer->props.direction);
|
||||||
|
|
||||||
wchar_t lang[4];
|
wchar_t lang[4] = {0};
|
||||||
mbstowcs(lang, hb_language_to_string(buffer->props.language), 4);
|
if (buffer->props.language != NULL) {
|
||||||
|
mbstowcs(lang, hb_language_to_string(buffer->props.language), 4);
|
||||||
|
}
|
||||||
|
|
||||||
hr = analyzer->GetGlyphs(pchars, length,
|
hr = analyzer->GetGlyphs(pchars, length,
|
||||||
fontFace, FALSE,
|
fontFace, FALSE,
|
||||||
buffer->props.direction,
|
buffer->props.direction,
|
||||||
|
@ -741,7 +744,7 @@ _hb_directwrite_shape(hb_shape_plan_t *shape_plan,
|
||||||
|
|
||||||
int font_size = font->face->get_upem();
|
int font_size = font->face->get_upem();
|
||||||
if (font_size < 0)
|
if (font_size < 0)
|
||||||
font_size = -font_size;
|
font_size = -font_size;
|
||||||
int x_mult = (double)font->x_scale / font_size;
|
int x_mult = (double)font->x_scale / font_size;
|
||||||
|
|
||||||
hr = analyzer->GetGlyphPlacements(pchars,
|
hr = analyzer->GetGlyphPlacements(pchars,
|
||||||
|
|
Loading…
Reference in New Issue