Emacs won't start, complaining about font ending in a number

Bug #697412 reported by Barry Warsaw
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
GNU Emacs
Fix Released
Undecided
Unassigned
Ubuntu Font Family
Invalid
Undecided
Unassigned
emacs23 (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

Binary package hint: emacs23

I've installed the "Ubuntu Beta Mono 17" font from https://launchpad.net/~canonical-ux/+archive/walled-garden (currently a private PPA). If you set your default system fixed width font to this (via Preferences -> Appearance -> Fonts) and set the font size to 11, then start emacs from the command line, you get the following early error message on the console and Emacs does not start:

Font `Ubuntu Beta Mono 17 11' is not defined

Now starting emacs with "emacs --font monospace" will get the first frame up, but then C-x 5 2 fails with the same error message in the minibuffer. The font size doesn't matter, since if you use the default 12 point font, the '11' is replaced by '12' in the error message above. Note that you can still use the font if you reset your system font to monospace and then set Ubuntu Beta Mono 17 in your .emacs or via customize on the default face.

After confirmation by colleagues, we think it's a font parsing bug in Emacs. Using a system font of 'courier 10 pitch' does not cause the problem, nor does using a font with a number at the end but with no space between it and the preceding word. It appears as though ending the font name in "[space][number]" causes the problem.

Upstream bug report:

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7853

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

Very interesting catch; ultimately this won't be a problem as the final name will be "Ubuntu Mono" once it has gone through all the way down the phased beta program (~ubuntu-typeface-interest people will be next).

Revision history for this message
Barry Warsaw (barry) wrote :

Yep, and there are fairly easy workaround for now. Specifically, leave your system mono font alone and use `M-x customize-face RET default RET` to select Ubuntu Beta Mono 17 for Emacs (there are similar application-specific workarounds for things like Gnome terminal and Claws, which I use).

Paul Sladen (sladen)
summary: - Emacs won't start, complaining about font
+ Emacs won't start, complaining about font ending in a number
Paul Sladen (sladen)
description: updated
Revision history for this message
Robert Collins (lifeless) wrote :

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7853 is the upstream (new comment testing lp behaviour)

Paul Sladen (sladen)
Changed in ubuntu-font-family:
status: New → Invalid
Changed in emacs:
status: New → Fix Committed
Changed in emacs23 (Ubuntu):
status: New → Triaged
Changed in emacs:
status: Fix Committed → Fix Released
Paul Sladen (sladen)
tags: added: uff-emacs uff-metadata uff-monospace uff-stack uff-upstream
Revision history for this message
Thomas Sisson (thomas-sisson-1) wrote :

Font handling for Emacs is still not fixed. This specific font may have been resolved, but there are many fonts out there that Emacs simply doesn't recognize. Is the bug present in Emacs 24? If not, why is the default version still 23? Is this just the fact that font management has changed so much in Linux since Emacs was first written. For example, fonts.config in the home directory is now deprecated even though we have personal and system fonts.

Revision history for this message
era (era) wrote :

As per the latest comment in the upstream bug, this was already fixed in upstream Emacs 23 in 2011.

Revision history for this message
era (era) wrote :
Revision history for this message
era (era) wrote :

This would have been fixed when Ubuntu synced to Emacs 23.3 but I don't have an environment where I can test that it is now fixed. Could somebody please verify that the fix works with Emacs >= 23.3 on Ubuntu with a font with a name like that?

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.