[Grub] There are messy codes on displaying Chinese characters in grub after install xenial-desktop_0320.

Bug #1559933 reported by kyt
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Kylin
Fix Released
High
ShuiLu Pi
freetype (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre
grub2 (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

[Machine]
Dell Vostro 3900
  [Version]
xenial-desktop_0320(amd64&i386)
  [Details]
[Grub] There are messy codes on displaying Chinese characters in grub after install xenial-desktop_0320.
  [Test Case]
1. nstall xenial-desktop_0320 & reboot
2. Check the grub
Expected Result: no messy codes in grub
Actual Result: There are messy codes in grub

安装xenial-desktop_0320后,grub出现乱码

Revision history for this message
kyt (952456204-6) wrote :
zhangchao (zctgbhu)
description: updated
kyt (952456204-6)
summary: - [Grub] There are messy codes in grub after install xenial-desktop_0320.
+ [Grub] There are messy codes on displaying Chinese characters in grub
+ after install xenial-desktop_0320.
description: updated
zhangchao (zctgbhu)
Changed in ubuntukylin:
status: New → Triaged
milestone: xenial-beta2 → xenial-finalrelease
zhangchao (zctgbhu)
Changed in ubuntukylin:
importance: Undecided → High
zhangchao (zctgbhu)
Changed in ubuntukylin:
assignee: zhangchao (zctgbhu) → ShuiLu Pi (pishuilu1128)
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
Jiulun.Du (dujiulun2006) wrote :

This also affects me. I filed a duplicated bug report #1568105.

The new version of grub-common package ships a smaller unicode.pf2 font, which I think is the cause.

Revision history for this message
ShuiLu Pi (pishuilu1128) wrote :

Yes, this bug is caused by unicode.pf2 font. I use unicode.pf2 which is in old version testing, the font is displayed properly.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

That's interesting. You mean this arrangement of symbols has no meaning?

I would have expected to see a "recovery" option show up in that specific place; and I would have said this is because of a translation.

That said, I don't see how this may be caused by unicode.pf2. It is just a font. How do you test with the old version?

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Anthony Wong (anthonywong) wrote :

You can see from the screenshot that there are actually some characters with a ? in a box, that should be a placeholder for characters that do not exist in the font.

Revision history for this message
ShuiLu Pi (pishuilu1128) wrote :

I mean unicode.pf2 not include some characters in new grub2 package. But these characters is Included in old grub2 package.

Revision history for this message
Jiulun.Du (dujiulun2006) wrote :

I'm re-uploading my screenshot in my duplicated report.

As you can see, in recent versions of Grub, all recovery and old kernel entries reside in "高级选项" (Chinese for "advanced options"). In 29 version from wily, the four characters are displayed fine; while in 36 version from xenial, only "级" is shown correctly and the other three are boxed question marks, meaning the character cannot be displayed by the font.

I didn't test 29 font with 36 version, but the font does become smaller, and this is nonetheless a regression.

BTW, this is the first screen most Chinese users will see when they boot Ubuntu (not just Kylin, all Ubuntu variants).

information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Jiulun.Du (dujiulun2006) wrote :

Sorry about the operation above, buggy mouse...

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Indeed. I'm sorry about that, it goes to show that I need to adjust my prescription (or look more closely, in any case). There's indeed missing glyphs.

I'm looking into this.

Changed in grub2 (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in grub2 (Ubuntu):
status: Triaged → In Progress
Revision history for this message
zhangchao (zctgbhu) wrote :

I found that this problem may be caused by libfreetype。
There are some problems with unicode.pf2 in the Grub2 of 1604(Size only 1.4M),and 1510 is good(Size is 2.4M)。
in 1604,if the libfreetype version is reduced to 1510(2.5.2-4ubuntu2), and build build-grub-mkfont,the unicode.pf2 built by./build-grub-mkfont is normal。

Revision history for this message
zhangchao (zctgbhu) wrote :

I found If use the 2.6.x version of the libfreetype make unicore.pf2 in grub2, wiill only generate 32768 glyphs 。
use the 2.5.x version of the libfreetype make unicore.pf2 is good,and there are 57086 glyphs。
32768 = 2^15 , May be related to the type of length?
But I did not find any relevant changes in the 2.6.0 version of libfreetype....

tags: added: rls-x-incoming
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I've been bisecting this for most of the day yesterday and this morning; tracked it down to a single commit in freetype. After some more refining, I managed to reduce this to two lines of change reverting the bad commit.

I have a package in my PPA right now that will build to make sure freetype isn't completely broken by this change; once it's done I'll also push grub to the same PPA for a build test to make sure it's really fixed. If all these tests pass, I'll upload the fix.

Changed in freetype (Ubuntu):
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
status: New → In Progress
Changed in grub2 (Ubuntu):
status: In Progress → Invalid
Changed in grub2 (Ubuntu):
status: Invalid → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package freetype - 2.6.1-0.1ubuntu2

---------------
freetype (2.6.1-0.1ubuntu2) xenial; urgency=medium

  * debian/patches/0001-Revert-pcf-Signedness-fixes.patch: revert signedness
    fixes in pcf which break grub-mkfont (limits glyphs to 32768, which drops
    most zh_CN glyphs and probably others). (LP: #1559933)

 -- Mathieu Trudel-Lapierre <email address hidden> Fri, 15 Apr 2016 14:53:27 -0400

Changed in freetype (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-36ubuntu3

---------------
grub2 (2.02~beta2-36ubuntu3) xenial; urgency=medium

  * No-change rebuild to correctly build our unicode font against libfreetype6.
    (LP: #1559933)

 -- Mathieu Trudel-Lapierre <email address hidden> Fri, 15 Apr 2016 17:21:17 -0400

Changed in grub2 (Ubuntu):
status: In Progress → Fix Released
ShuiLu Pi (pishuilu1128)
Changed in ubuntukylin:
status: Triaged → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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