1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-27 15:37:29 +03:00

add hex print of the freetype error code

It makes it easier to look up the error codes from the fterrdef.h
header file.
This commit is contained in:
Wez Furlong 2019-02-26 08:38:51 -08:00
parent bfeca4e724
commit 6aae40ac21

View File

@ -11,7 +11,7 @@ fn ft_result<T>(err: FT_Error, t: T) -> Result<T, Error> {
if succeeded(err) {
Ok(t)
} else {
Err(format_err!("FreeType error {:?}", err))
Err(format_err!("FreeType error {:?} 0x{:x}", err, err))
}
}
@ -70,8 +70,9 @@ impl Face {
let res = FT_Load_Glyph(self.face, glyph_pos, FT_LOAD_COLOR as i32);
ensure!(
succeeded(res),
"load_codepoint {}: FreeType error {:?}",
"load_codepoint {}: FreeType error {:?} 0x{:x}",
codepoint,
res,
res
);