From 323a8e9c6413ea90030c24d663f4c4f12a7a1ffd Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 3 Jan 2011 14:16:42 +0100 Subject: [PATCH] * util/grub-mkfont.c (main): Report errors in FT_New_Face. --- ChangeLog | 4 ++++ util/grub-mkfont.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9881baee9..7f5a316fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-01-03 Vladimir Serbinenko + + * util/grub-mkfont.c (main): Report errors in FT_New_Face. + 2010-12-31 Ian Campbell * util/grub.d/20_linux_xen.in (linux_entry): Correctly capitalize diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index fff6a619e..983ac7065 100644 --- a/util/grub-mkfont.c +++ b/util/grub-mkfont.c @@ -1146,11 +1146,18 @@ main (int argc, char *argv[]) { FT_Face ft_face; int size; + FT_Error err; - if (FT_New_Face (ft_lib, argv[optind], font_index, &ft_face)) + err = FT_New_Face (ft_lib, argv[optind], font_index, &ft_face); + if (err) { - grub_util_info ("can't open file %s, index %d", argv[optind], - font_index); + grub_printf ("can't open file %s, index %d: error %d", argv[optind], + font_index, err); + if (err > 0 && err < (signed) ARRAY_SIZE (ft_errmsgs)) + printf (": %s\n", ft_errmsgs[err]); + else + printf ("\n"); + continue; }