* grub-core/font/font.c (grub_font_load): Add support for default
path for fonts ($prefix/fonts). * grub-core/kern/corecmd.c (grub_core_cmd_insmod): Unify condition for checking if string is a path. * grub-core/normal/main.c (features): Add feature_default_font_path. * util/grub-mkconfig.in: Skip mangling of GRUB_FONT into GRUB_FONT_PATH. * util/grub.d/00_header.in: Use default directory if possible. * util/grub-install.in: Install unicode.pf2.
This commit is contained in:
parent
b3e0862255
commit
274416e82f
7 changed files with 86 additions and 46 deletions
|
@ -124,11 +124,47 @@ if [ "x$serial" = x1 ]; then
|
|||
fi
|
||||
|
||||
if [ "x$gfxterm" = x1 ]; then
|
||||
# Make the font accessible
|
||||
prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT_PATH}"`
|
||||
if [ -n "$GRUB_FONT" ] ; then
|
||||
# Make the font accessible
|
||||
prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"`
|
||||
cat << EOF
|
||||
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then
|
||||
EOF
|
||||
else
|
||||
for dir in ${pkgdatadir} ${GRUB_PREFIX} /usr/share/grub ; do
|
||||
for basename in unicode unifont ascii; do
|
||||
path="${dir}/${basename}.pf2"
|
||||
if is_path_readable_by_grub ${path} > /dev/null ; then
|
||||
font_path=${path}
|
||||
else
|
||||
continue
|
||||
fi
|
||||
break 2
|
||||
done
|
||||
done
|
||||
if [ -n "${font_path}" ] ; then
|
||||
cat << EOF
|
||||
if [ x\$feature_default_font_path = xy ] ; then
|
||||
font=unicode
|
||||
else
|
||||
EOF
|
||||
|
||||
# Make the font accessible
|
||||
prepare_grub_to_access_device `${grub_probe} --target=device "${font_path}"`
|
||||
cat << EOF
|
||||
font="`make_system_path_relative_to_its_root "${font_path}"`"
|
||||
fi
|
||||
|
||||
if loadfont \$font ; then
|
||||
EOF
|
||||
else
|
||||
cat << EOF
|
||||
if loadfont unicode ; then
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
cat << EOF
|
||||
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
|
||||
set gfxmode=${GRUB_GFXMODE}
|
||||
load_video
|
||||
insmod gfxterm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue