Wishlist: Enable use of Ubuntu Mono as .psf console-setup font

Reported by Paul Sladen on 2011-02-24
62
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Ubuntu Font Family
Wishlist
Unassigned
ubuntu-font-family-sources (Ubuntu)
Wishlist
Unassigned

Bug Description

The text-mode console (Ctrl-Alt-F1) currently uses the default system/VGA font but a hinted version of Ubuntu Mono would be lovely to have loadable on the Linux console when it's finished.

Converting a TTF so that it is usable as bitmap Linux console font appears to be a two-stage process; first rasterising to a BFD bitmap font file (bitmap with metrics), and then from that into a rawform, equal width PSF bitmap console font:

  otf2bdf /usr/share/fonts/truetype/ubuntu-font-family/UbuntuBetaMono-R-R21.ttf > UbuntuBetaMono-R-R21.bdf
  bdf2psf UbuntuBetaMono-R-R21.bdf /usr/share/bdf2psf/standard.equivalents /usr/share/bdf2psf/required.set+/usr/share/bdf2psf/useful.set 256 UbuntuBetaMono-R-R21.psf
  setfont -h17 UbuntuBetaMono-R-R21.psf

The R21 Mono Beta has a cell bounding box of 482×1000 (including necessary leading and advance); this leads to bounding box of 8x17 rather than the traditional 8x16 and this is what the "-n17" forces upon loading. The result useful but very ugly because of the lack of manual hinting.

We probably also want to make sure that at least all of the codepoints listed in the 'required.set' file are present and populated if we're going to replace the current default.
=====
Eventually (11.10?) we should try to apply the Ubuntu fonts to the console as well. Steps 12–14 are blocked waiting for the Ubuntu Monospace to be released and available in the archive.

 11) gfxboot-theme-ubuntu (Proportional) - bug #732854
 12) Bterm (d-i) (Monospace) -
 13) Grub2 (Monospace) - bug #729470
 14) Console-setup (Monospace) - bug #724022 (this bug)

Paul Sladen (sladen) on 2011-02-24
Changed in ubuntu-font-family:
status: New → Incomplete
importance: Undecided → Wishlist
Changed in ubuntu-font-family-sources (Ubuntu):
importance: Undecided → Wishlist
Paul Sladen (sladen) wrote :

Glyphs missing to finish 'required.set':

  for U in `cut -d: -f2 missing-gliphs.txt | tr -d ' ' | sort | uniq` ; do grep '# '$U /usr/share/bdf2psf/required.set ; done

Thankfully it basically appears to just be the box/line drawing characters (13) + full blocks (4) + arrows (4)—and we need these for real-world testing anyway since they are specific to our own cell ratio:

  # U+2191: UPWARDS ARROW
  # U+2193: DOWNWARDS ARROW
  # U+2500: BOX DRAWINGS LIGHT HORIZONTAL
  # U+2502: BOX DRAWINGS LIGHT VERTICAL
  # U+250C: BOX DRAWINGS LIGHT DOWN AND RIGHT
  # U+2510: BOX DRAWINGS LIGHT DOWN AND LEFT
  # U+2514: BOX DRAWINGS LIGHT UP AND RIGHT
  # U+2518: BOX DRAWINGS LIGHT UP AND LEFT
  # U+251C: BOX DRAWINGS LIGHT VERTICAL AND RIGHT
  # U+2524: BOX DRAWINGS LIGHT VERTICAL AND LEFT
  # U+252C: BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
  # U+2534: BOX DRAWINGS LIGHT UP AND HORIZONTAL
  # U+253C: BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
  # U+256A: BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
  # U+256C: BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
  # U+2588: FULL BLOCK
  # U+2591: LIGHT SHADE
  # U+2592: MEDIUM SHADE
  # U+25A0: BLACK SQUARE
  # U+25B6: BLACK RIGHT-POINTING TRIANGLE
  # U+25C0: BLACK LEFT-POINTING TRIANGLE

Paul Sladen (sladen) wrote :

Box drawing glyphs and arrows possibilities; take-1.

Paul Sladen (sladen) wrote :

Workings; hard to work out how to give the arrows "the spirit of Ubuntu"... perhaps others can do better!

Paul Sladen (sladen) on 2011-03-08
Changed in ubuntu-font-family:
milestone: none → mono
Paul Sladen (sladen) on 2011-03-09
tags: added: uff-bitmap uff-console
Paul Sladen (sladen) wrote :

nb. to self. For VNC into to Ubuntu Could instances running with only a plain VGA interface (no framebuffer) it will also probably be necessary to patch 'vgasrc/vgafonts.c' in the 'seabios' package; this contains 8x8, 8x14 and 8x16 default fonts:

  "These fonts come from ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip
   * The package is (c) by Joseph Gil
   * The individual fonts are public domain"

Hello all,

I'd like some advice on binary package naming for bitmap fonts.

The Ubuntu Font Family is still in its initial bootstrapping phase,
with the body of the work for the first five scripts and thirteen
fonts being lead primarily by Dalton Maag and released by Canonical.

Yesterday I got back the first beta of 'Ubuntu Mono Regular' with
manual hinting instructions: this opens up the door to rendering these
to black-and-white 8x16 bitmap forms for use on the console, grub,
bterm et al.

Each of these has a custom bitmap font format, most of which are
generated first by exporting to BDF, and then converting again, eg. to
PSF in the case of 'setfont' and the Linux console.

Currently the binary TTF package is 'ttf-ubuntu-font-family' and my
plan was to make the source package generate a second binary; perhaps
'psf-ubuntu-mono-font-family'. Does this make sense? Does it fit
with the current naming scheme? Can anyone suggest a preferred idea?

 -Paul

1. "Wishlist: Enable use of Ubuntu Mono as .psf console-setup font"
    https://bugs.launchpad.net/ubuntu-font-family/+bug/724022

2. The source is 'ubuntu-font-family-sources' per Nicolas' advice,
    which is from before the renaming scheme started.

3. PSF installing to '/usr/share/consolefonts/*.psf'

I guess you didn't notice, but in Debian we are moving to a new font
package naming policy. We are getting rid of the format-specific
prefix for font packages and going for fonts-[foundry-]fontname, where
the foundry is completely option and should only be used for
disambiguation purposes.

Also, do the tools for building console fonts still exist in Debian? I
thought they were removed long ago and that we can no longer build
such fonts from source.

--
bye,
pabs

http://wiki.debian.org/PaulWise

Paul Sladen (sladen) wrote :

On Fri, 15 Jul 2011, Paul Wise wrote:
> On Fri, 15 Jul 2011, Paul Sladen wrote:
> > ... which is from before the renaming scheme started.
> > ...
> > ... Does it fit with the current naming scheme?
> I guess you didn't notice,

My apologies for not being more explicit. *In light of the on-going
naming scheme change*, I would appreciate some guidance on what to
call binary fonts of varying formats derived from the same (source)
typeface.

Having binary packages all called f-[f-]name but with different
contents (for example, TTF, vs. PSF) doesn't work. I would appreciate
some guidance, or suggestions on how to disambigute these. For
example the inclusion of 'psf-' or 'console-' as a prefix, or postfix.

> do the tools for building console fonts still exist in Debian?

  http://packages.debian.org/search?keywords=otf2bdf&searchon=contents
  http://packages.debian.org/search?keywords=bdf2psf&searchon=contents
  http://packages.debian.org/search?keywords=grub-mkfont&searchon=contents
  ...

 -Paul

Paul Wise (Debian) (pabs) wrote :

On Fri, Jul 15, 2011 at 1:53 PM, Paul Sladen <email address hidden> wrote:

> My apologies for not being more explicit.  *In light of the on-going
> naming scheme change*, I would appreciate some guidance on what to
> call binary fonts of varying formats derived from the same (source)
> typeface.
>
> Having binary packages all called f-[f-]name but with different
> contents (for example, TTF, vs. PSF) doesn't work.  I would appreciate
> some guidance, or suggestions on how to disambigute these.  For
> example the inclusion of 'psf-' or 'console-' as a prefix, or postfix.

I think I would be putting all the formats in one package, or using
fonts-[foundtry]-fontname-console.

Are PSF files also used on the console on FreeBSD or Hurd?

>  http://packages.debian.org/search?keywords=otf2bdf&searchon=contents
>  http://packages.debian.org/search?keywords=bdf2psf&searchon=contents
>  http://packages.debian.org/search?keywords=grub-mkfont&searchon=contents

Ah, good!

--
bye,
pabs

http://wiki.debian.org/PaulWise

Paul Sladen (sladen) on 2011-07-15
description: updated
Paul Sladen (sladen) wrote :

On Fri, 15 Jul 2011, Paul Wise wrote:
> On Fri, Jul 15, 2011 at 1:53 PM, Paul Sladen <email address hidden> wrote:
> > 'psf-' or 'console-' as a prefix, or postfix.
> using fonts-[foundry]-fontname-console.

Okay-dokey, '-console' is certainly a possibility then.

> I think I would be putting all the formats in one package,

The downside of an all-in-one binary package has the potential
for a large negative impact on minimal or server image sizes; the
bitmap fonts in question (for Ubuntu Mono Regular) are ~10 kilobytes
each; the intermediate BDF text-based format is ~150 kB.

For a server/non-X system, it doesn't make sense to install four
megabytes of .ttf files just for the framebuffer usage.[1][2]

> Are PSF files also used on the console on FreeBSD or Hurd?

PSF (for Linux 'setfont') might be a sub-optimal example. I believe
that FreeBSD uses 'vidcontrol' and '.fnt' files, although I'm not sure
whether this .fnt has combinality with anything else.

A better example would be the bitmap formats encoded for each of
Bterm(Debian installer)/Grub/gfxboot, where the usefulness of the
bitmap font format is not tied to kernel-specific loading utilities.

 -Paul

[1] Note that the situation would be similar for webfonts, where
    there are several different encoding are required for different
    browsers. You wouldn't want to ship them unless required and when
    running a webserver serving said webfonts.

[2] If you're wondering why, it's so that it's possible to easily set
    the default Ubuntu (server) look-and-feel... and it's preferable,
    wherever possible, to have an optional additional package to
    seed/install, rather than to create a delta vs. Debian/upstream.

Paul Sladen (sladen) wrote :

Nb. to self (and any others following); the exact font subset loaded is install-time and locale dependent; search for 'CODESET' and 'FONTFACE' in:

  /var/lib/dpkg/info/console-setup.config

or:

  dpkg-reconfigure console-setup

Launchpad Janitor (janitor) wrote :

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

Changed in ubuntu-font-family-sources (Ubuntu):
status: New → Confirmed

On Fri, 15 Jul 2011, Paul Wise wrote:
> I think I would be putting all the formats in one package, or using
> fonts-[foundry]-fontname-console.

I've uploaded a bump of 'ubuntu-font-family-sources' Source with the
console-font building code uncommented[0][1]:

  $ dpkg -L fonts-ubuntu-font-family-console | grep psf
  /usr/share/consolefonts/UbuntuMono-R-8x16.psf
  /usr/share/consolefonts/UbuntuMono-BI-8x16.psf
  /usr/share/consolefonts/UbuntuMono-B-8x16.psf
  /usr/share/consolefonts/UbuntuMono-RI-8x16.psf

This second binary is in addition to the current main
'ttf-ubuntu-font-family' binary. I would be grateful for advice about
what would be the best name for a renamed main binary package.

 -Paul

[0] Had been waiting on the promoting bitmap handling utilities
    'otf2bdf' and 'bdf2psf' to Ubuntu 'main'.

[1] A separate package (<20 kB) so that server/embedded systems are
    not dependent upon shipping many megabytes of vector fonts.

Christian Perrier (bubulle) wrote :

Quoting Paul Sladen (<email address hidden>):
> On Fri, 15 Jul 2011, Paul Wise wrote:
> > I think I would be putting all the formats in one package, or using
> > fonts-[foundry]-fontname-console.
>
> I've uploaded a bump of 'ubuntu-font-family-sources' Source with the
> console-font building code uncommented[0][1]:
>
> $ dpkg -L fonts-ubuntu-font-family-console | grep psf
> /usr/share/consolefonts/UbuntuMono-R-8x16.psf
> /usr/share/consolefonts/UbuntuMono-BI-8x16.psf
> /usr/share/consolefonts/UbuntuMono-B-8x16.psf
> /usr/share/consolefonts/UbuntuMono-RI-8x16.psf
>
> This second binary is in addition to the current main
> 'ttf-ubuntu-font-family' binary. I would be grateful for advice about
> what would be the best name for a renamed main binary package.

Hmm, that seems tricky.

I'm personnally nnot entirely happy with
fonts-ubuntu-font-family-whatever. It seems weird to repeat "font" in
the pkg name and "family" is not exactly a font name.

Indeed, how about simply "fonts-ubuntu" for the package providing the
TTF|OTF fonts and fonts-ubuntu-console for the package providing the
console fonts. Is there a chance that there is a
fonts-ubuntu-somethingelse for another font family provided by the
"ubuntu" foundry?

CC'ing you, Paul though I'm unsure this is needed as you're probably
subscribed to the LP bug.

Paul Sladen (sladen) wrote :

Christian: Sorry for the delay in replying. I must have missed the CC email. Yes, there is already 'ubuntu-title' from the Ubuntu "Foundry". Other people have mentioned doing a Serif version; whether or not that would fall under the same "family", I couldn't say. Ubuntu Title is in the package:

  http://packages.debian.org/ubuntu-title

I appreciate that perhaps 'fonts-ubuntu-font-family-console' isn't great. But is the recommendation I got from others on 'pkg-fonts' at the time that I asked.

Can we please just include any console version in ubuntu-font-family?

Mark

Mike (mike123) wrote :

Has this been dropped? Would add a nice bit of polish to the distro.

Daniel van Vugt (vanvugt) wrote :

Isn't this related to bug 433897?

Beni Cherniavsky (cben) wrote :

Will it be possible to include a larger version of the font, e.g. 32x16?
16x8 is unusably tiny (and unnecessarily ugly) on "retina" displays.

I'm on Yoga 2 which has a ridiculous density 3200x1800 13" display.
Even with 32x16 fonts, I get 200x56 chars console.
I briefly tried Ubuntu fonts in the console but whether I like the shape or not VGA and Terminus win simply because they have 32x versions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers