mirror of
https://github.com/wez/wezterm.git
synced 2024-11-10 15:04:32 +03:00
fonts: freetype: metrics: skip sizing an undefined glyph
This commit is contained in:
parent
51c2646eee
commit
21ab0887db
@ -149,6 +149,9 @@ impl Face {
|
||||
let mut width = 0.0;
|
||||
for i in 32..128 {
|
||||
let glyph_pos = FT_Get_Char_Index(self.face, i);
|
||||
if glyph_pos == 0 {
|
||||
continue;
|
||||
}
|
||||
let res = FT_Load_Glyph(self.face, glyph_pos, FT_LOAD_COLOR as i32);
|
||||
if succeeded(res) {
|
||||
let glyph = &(*(*self.face).glyph);
|
||||
|
Loading…
Reference in New Issue
Block a user