* util/grub-mkfont.c (main): Report errors in FT_New_Face.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-01-03 14:16:42 +01:00
parent 1b394975e9
commit 323a8e9c64
2 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2011-01-03 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkfont.c (main): Report errors in FT_New_Face.
2010-12-31 Ian Campbell <ijc@hellion.org.uk> 2010-12-31 Ian Campbell <ijc@hellion.org.uk>
* util/grub.d/20_linux_xen.in (linux_entry): Correctly capitalize * util/grub.d/20_linux_xen.in (linux_entry): Correctly capitalize

View file

@ -1146,11 +1146,18 @@ main (int argc, char *argv[])
{ {
FT_Face ft_face; FT_Face ft_face;
int size; 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], grub_printf ("can't open file %s, index %d: error %d", argv[optind],
font_index); font_index, err);
if (err > 0 && err < (signed) ARRAY_SIZE (ft_errmsgs))
printf (": %s\n", ft_errmsgs[err]);
else
printf ("\n");
continue; continue;
} }