bugGNU GRUB - Bugs: bug #40330, grub-mkfont: error: can't set...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #40330: grub-mkfont: error: can't set 16x16 font size with unifont 6.3

Submitted by:  Mike GIlbert <floppym>
Submitted on:  Mon 21 Oct 2013 04:15:49 PM UTC  
 
Category: CompilationSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: Every Time
Planned Release: None

(Jump to the original submission Jump to the original submission)

Wed 18 Dec 2013 06:05:55 PM UTC, comment #15:

And thank you for your effort

Vladimir Serbinenko <phcoder>
Project Administrator
Wed 18 Dec 2013 05:53:10 PM UTC, comment #14:

I can confirm that it worked. Also I've put original release files into blacklist. Cosing the bug.

Vladimir Serbinenko <phcoder>
Project Administrator
Wed 18 Dec 2013 04:35:11 AM UTC, comment #13:

I just uploaded a new version of the source tarball, PCF font, and TTF font here:

ftp://ftp.gnu.org/gnu/unifont/unifont-6.3.20131217/

I downloaded the PCF font after uploading it, verified the signature, and ran "grub-mkfont -o unifont.pf2" with that PCF font without complaint. If you can do the same and it looks okay in GRUB, I think it's safe to close this bug.

Paul Hardy <unifoundry>
Wed 18 Dec 2013 03:12:49 AM UTC, comment #12:

Ok.

If phcoder could modify the grub configure script to allow me to manually specify what file to use for unifont, that would be helpful. Otherwise, it is always going to pick up the pcf file.

Mike GIlbert <floppym>
Wed 18 Dec 2013 02:47:05 AM UTC, comment #11:

That's definitely not good. I'll redo things so FontForge doesn't operate on the PCF versions for now and perform another upload tonight.

In the meantime, I checked grub-mkfont with the BDF version of Unifont and that runs without complaint. You can download the BDF version from:

ftp://ftp.gnu.org/gnu/unifont/unifont-6.3.20131215/unifont-6.3.20131215.bdf.gz

with signature file

ftp://ftp.gnu.org/gnu/unifont/unifont-6.3.20131215/unifont-6.3.20131215.bdf.gz.sig

Paul Hardy <unifoundry>
Wed 18 Dec 2013 12:54:07 AM UTC, comment #10:

Running the pcf file through fontforge seems to completely convert the data format, at least according to the file utility.

Before fontforge:

floppym@naomi compiled % file unifont-6.3.20131215.pcf
unifont-6.3.20131215.pcf: X11 Portable Compiled Font data

After fontforge:

floppym@naomi compiled % file unifont-6.3.20131215.pcf
unifont-6.3.20131215.pcf: Spline Font Database version 3.0

Mike GIlbert <floppym>
Tue 17 Dec 2013 04:18:20 PM UTC, comment #9:

It looks like fontforge is doing something to the PCF font that grub-mkfont/freetype doesn't like.

I started again with the BDF font and ran bdftopcf on it. Then I ran the grub-mkfont command you give below. The output is at

http://unifoundry.com/pub/unifont-6.3.20131215/unifont-6.3.20131215.pf2.gz

The .sig file is in the same directory.

I don't plan to upload the PF2 font to Savannah, as it wasn't built from the source tarball directly; I did it by hand.

After running bdftopcf, I set the copyright and version information using fontforge, because bdftopcf drops that information. Maybe freetype only expects whatever bdftopcf puts in a PCF font and nothing more. When I tried it earlier I had not yet applied the fontforge changes.

The error is probably in freetype rather than fontforge, but either one could be responsible.

I can add auto-building a PF2 font to future Unifont releases for GRUB's sake, in which case I would put a copy in the Savannah directory.

Paul Hardy <unifoundry>
Tue 17 Dec 2013 03:49:28 PM UTC, comment #8:

phcoder@debian:16:48:34:~/compile/i$ freetype-config --ftversion
2.5.1
phcoder@debian:16:39:24:~/compile/i$ ./grub-mkfont -o unifont.pf2 ~/downloads/unifont-6.3.20131215.pcf.gz
can't open file /home/phcoder/downloads/unifont-6.3.20131215.pcf.gz, index 0: error 2: unknown file format
phcoder@debian:16:47:56:~/compile/i$ gunzip < ~/downloads/unifont-6.3.20131215.pcf.gz > unifont.pcf
phcoder@debian:16:48:12:~/compile/i$ ./grub-mkfont -o unifont.pf2 unifont.pcf
can't open file unifont.pcf, index 0: error 2: unknown file format

What is your freetype version

Vladimir Serbinenko <phcoder>
Project Administrator
Tue 17 Dec 2013 05:12:52 AM UTC, comment #7:

I meant its signature file is at

ftp://ftp.gnu.org/gnu/unifont/unifont-6.3.20131215/unifont-6.3.20131215.pcf.gz.sig

Paul Hardy <unifoundry>
Tue 17 Dec 2013 05:02:10 AM UTC, comment #6:

I've just uploaded a new version of the Unifont package, as well as separate pre-built fonts, to ftp.gnu.org.

You can download the new PCF font at

ftp://ftp.gnu.org/gnu/unifont/unifont-6.3.20131215/unifont-6.3.20131215.pcf.gz

and its signature file at

ftp://ftp.gnu.org/gnu/unifont/unifont-6.3.20131215/unifont-6.3.20131215.pcf.gz

I ran grub-mkfont against the new PCF font, and it completed without any errors.

The BDF font is also in that directory if you want to see what bdftopcf uses as input. The BDF version of the font now contains the XLFD entries below as well as several more in addition to what was there. After running bdftopcf, I run fontforge on the resulting PCF font to set version and copyright information; bdftopcf does not preserve that information. You can see the details in the source tarball.

Paul Hardy <unifoundry>
Sat 30 Nov 2013 11:25:20 PM UTC, comment #5:

Ah, thanks in advance. I look forward to it.

Mike GIlbert <floppym>
Sat 30 Nov 2013 04:19:25 AM UTC, comment #4:

I am the maintainer of GNU Unifont. I just learned of this bug on Wednesday. I hadn't even had time to look into it further (being on the road for Thanksgiving). Today someone sent me a proposed set of changes for the BDF file to make life easier for FreeType and also grub-mkfont. The changes are to add these properties at a minimum to the unifont.bdf file, before converting to PCF:

After making those additions, FreeType and grub-mkfont should be able to convert the font properly. Apparently without those extra properties, FreeType makes some assumptions about Unifont that are incorrect and grub-mkfont fails as a result.

I'll be able to test this for a new release within 2 weeks, and will have the new release ready a week after that.

Paul Hardy

Paul Hardy <unifoundry>
Sun 27 Oct 2013 06:34:16 PM UTC, comment #3:

Sure.

http://unifoundry.com/unifont.html

http://unifoundry.com/pub/unifont-6.3.20131020/font-builds/unifont-6.3.20131020.pcf.gz

Mike GIlbert <floppym>
Sun 27 Oct 2013 06:21:57 PM UTC, comment #2:

Could you please post exact link to file in question? There are several variants of unifont (I.a. pcf and ttf)

Vladimir Serbinenko <phcoder>
Project Administrator
Mon 21 Oct 2013 04:21:19 PM UTC, comment #1:

By making a small change in grub-mkfont.c, we determined that freetype is returning 0x17 (invalid pixel size) from FT_Set_Pixel_Sizes.

Mike GIlbert <floppym>
Mon 21 Oct 2013 04:15:49 PM UTC, original submission:

grub-mkfont does not like the pcf version of unifont 6.3.

% grub-mkfont -o test.pf2 unifont-6.3.20131020.pcf.gz
grub-mkfont: error: can't set 16x16 font size.

This causes the grub build process to fail when unifont 6.3 has been installed in system font directories.

Gentoo bug report: https://bugs.gentoo.org/show_bug.cgi?id=488642

Mike GIlbert <floppym>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by unifoundry (Posted a comment)
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by floppym (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 18 Dec 2013 05:53:10 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup