grub-mkfont outputs fonts that grub cannot use (font characters not in ascending order: 0 <= 0)

Bug #729470 reported by Paul Sladen
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: grub2

As part of validation of the utility of the Ubuntu Mono in-development fonts I've been doing some tests for using them in Grub, Console, gfxboot and text-installer.

Currently the "Ubuntu Beta Mono" only has about 1200 codepoints, so the rest need to fall back to an existing full-coverage font. Grub currently uses Unifont for this.

  Current attempt at generation is:

  BASE=UbuntuBetaMono500-hacked
  grub-mkfont -s16 -o $BASE.pf2 $BASE.[ot]tf /usr/share/fonts/truetype/unifont/unifont.ttf

with the following in '/etc/default/grub':

  GRUB_FONT=/boot/grub/UbuntuBetaMono500-hacked.pf2

however, after an 'update-grub' and reboot the message:

  font characters not in ascending order: 0 <= 0

is printed, which appears to be coming from:

  ./grub-core/font/font.c

Ideally grub-mkfont should produce self-compliant .pf2 fonts!

Revision history for this message
Paul Sladen (sladen) wrote :

Characters from both appear to be being inserted into the same file, the 'm' with the short centre stem is coming from Ubuntu Mono.

  Glyph #191, U+006d
  Width 7, Height 8, X offset 1, Y offset 0, Device width 8
  +.......
  +.......
  +.......
  +.......
  +.......
  +.......
  +###_##_
  +#__#__#
  +#__#__#
  +#__#__#
  +#__#__#
  +#__#__#
  +#__#__#
  +#__#__#
  +.......
  +.......
  +.......

  Glyph #192, U+006d
  Width 6, Height 7, X offset 1, Y offset 0, Device width 8
  +.......
  +.......
  +.......
  +.......
  +.......
  +.......
  +.......
  +######.
  +#_##_#.
  +#_##_#.
  +#_##_#.
  +#____#.
  +#____#.
  +#____#+
  +.......
  +.......
  +.......

Revision history for this message
Paul Sladen (sladen) wrote :

Neither do attempts at forced subsetting work:

  grub-mkfont -v -v -v -v -s16 -o UbuntuBetaMono500-hacked.pf2 --range=0x0-0x1f,0x100-0x1ffff /usr/share/fonts/truetype/unifont/unifont.ttf --range=0x20-0x7f UbuntuBetaMono500-hacked.[ot]tf

Here, the first use of '--range' is taken as the canonical one and applied to the (output) rather than the following input(s).

Revision history for this message
Colin Watson (cjwatson) wrote :

Where can I get a copy of the font file that exhibits this bug?

Revision history for this message
Paul Sladen (sladen) wrote :

In particular:

  https://chinstrap.canonical.com/~sladen/UbuntuBetaMono500-hacked.otf

but passing any two fonts to 'grub-mkfont' has the same effect.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.