← Back to team overview

documentation-packages team mailing list archive

[Bug 1768312] Re: EFI Grub appears to use HEAVY box drawing characters, whilst Ubuntu Font only has Light ones


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: grub2 (Ubuntu)
       Status: New => Confirmed

You received this bug notification because you are a member of
Documentation Packages, which is subscribed to fonts-ubuntu in Ubuntu.

  EFI Grub appears to use HEAVY box drawing characters, whilst Ubuntu
  Font only has Light ones

Status in Ubuntu Font Family:
Status in fonts-ubuntu package in Ubuntu:
Status in grub2 package in Ubuntu:

Bug description:
  This is a two-in-one bug report.

  I'm trying to use UbuntuMono font in grub, and that does not look

  Specifically, box drawing characters (corner, hline, vline) appear to
  be used in their "heavy" variants, whilst UbuntuMono font only has
  "light" variants.

  Reading the code, it appears that an attempt to re-map
  seems to not work.

  Steps to reproduce:
  grub-mkfont -v -v -s 64 -o my.pf2 \
  sudo cp my.pf2 /boot/grub/unicode.pf2
  sudo cp my.pf2 /boot/grub/fonts/unicode.pf2

  (Note the -v -v prints the glyphs, if one adds `| grep Glyph` there,
  one can see that the font has 0x2500 character the light horizontal
  line, but not 0x2501 which is a heavy one

  Reboot and notice how everything is huge and Ubuntu Mono font, yet the
  frame around the menu is formed out of tiny characters that look like
  '?' in a diamond-like shape.

  Next, using font-forge I've copied the "light" glyphs into the "heavy"
  ones, and exported font as .ttf, and regenerated the my.pf2 file, and
  installed it instead of the unicode.pf2 - and after rebooting
  everything started to work fine.

  I'm not sure if grub is intentionally using "heavy" glyphs, or if
  remapping of characters from "heavy" to "light" is failing.

  I'm not sure if "heavy" weight box drawing characters can be
  developed. However, I think it would be nice to make UbuntuMono font
  be compatible/usable as a grub font.

  I am not capable of developing "heavy" weight box drawing characters
  in the Ubuntu Mono font, however, I hope it should be possible to
  binary patch the font and copy "light" glyphs into the "heavy"
  codepoints. Or somehow specify inside the truetype font that these
  glyphs should be used twice. Specifically:

  0x2500 -> 0x2501
  0x2502 -> 0x2503
  0x250c -> 0x250f
  0x2510 -> 0x2513
  0x2514 -> 0x2517
  0x2518 -> 0x251b
  0x251c -> 0x2523
  0x2524 -> 0x252b
  0x252c -> 0x2533
  0x2534 -> 0x253b
  0x253c -> 0x254b

  Note there are many more glyphs that allow for "mixing&matching"
  light/heavy, e.g. "UP HEAVY AND LEFT LIGHT", above copies would simply
  "fully-heavy" glyphs available, and rendered identical to the "fully-
  light" glyphs.

To manage notifications about this bug go to: