bugfix: get_ch_width does not check glyph value

This commit is contained in:
Vincent Wei
2019-02-21 10:32:01 +08:00
parent 7f36c339b7
commit 0e918da2a4
+2
View File
@@ -112,6 +112,8 @@ static int get_ch_width (LOGFONT* logfont, DEVFONT* devfont,
return vbf_info->max_width * scale;
glyph_value = REAL_GLYPH(glyph_value);
if (glyph_value < vbf_info->first_glyph || glyph_value > vbf_info->last_glyph)
glyph_value = vbf_info->def_glyph;
return vbf_info->advance_x [glyph_value - vbf_info->first_glyph] * scale;
}