All bitmap fonts no longer visible after upgrade 19.10 -> Focal (development)

Bug #1861340 reported by Jonathan Hartley on 2020-01-29
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pango
Fix Released
Unknown
pango1.0 (Ubuntu)
Low
Unassigned

Bug Description

For years I've installed a bitmap font for my terminals, but since I upgraded to Focal (development branch) today, it (and other bitmap fonts) no longer work.

The font is 'Dina', from here:
http://www.dcmembers.com/jibsen/download/61/?unapproved=504&moderation-hash=f1abb9d89caafa881dcfc05cd32372e7

I have always installed it using a script:

    # install dina
    sudo mkdir -p /usr/share/fonts/Dina
    cd /usr/share/fonts/Dina
    sudo unzip ~/Downloads/Dina.zip

    # enable bitmap fonts
    sudo rm -f /etc/fonts/conf.d/70-no-bitmaps.conf

    # rebuild the cache
    fc-cache -f -v

    # Set as default mono font
    gsettings set org.gnome.desktop.interface monospace-font-name "Dina 8"

This has always worked in the past, through many versions of Ubuntu, including 19.10.

I installed Focal today, using `sudo do-release-upgrade -d`.

Now the above script does not make Dina visible in font selectors such as that produced by the Tweaks / Fonts / [Monospace Text] button. Terminals that were previously configured to use that font now display the "box of hex digits" characters (what are they called?)

gnome-font-viewer does not list any of the installed bitmap fonts.

While trying to find a fix, I tried a few changes to the above script, which did not help:

* Unzip to "$HOME/.fonts" instead
* Trying other symlinks in the fonts config.d:

    (
        cd /etc/fonts/conf.d
        sudo rm -f 70-no-bitmaps.conf
        sudo ln -sf ../conf.avail/70-yes-bitmaps.conf
    )

  (tried with both 'yes-bitmaps' and 'force-bitmaps')
* fc-cache -r # "really" force cache re-creation

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1861340/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Jonathan Hartley (tartley) wrote :

I have the same problem with other bitmaps fonts, such as those at https://github.com/Tecate/bitmap-fonts. They appear to install fine, "fc-cache" reports finding them, but they are not visible in font selection dialogs.

`sudo dpkg-reconfigure fontconfig` does not help.

I can see the installed bitmap fonts with fc-list:

    $ fc-list | grep dina
    /usr/share/fonts/bitmap/dina/Dina_r400-9.bdf: Dina:style=Regular
    /usr/share/fonts/bitmap/dina/Dina_r400-8.bdf: Dina:style=Regular
    [... etc]

summary: - Bitmap font no longer useable on upgrade 19.10 -> Focal (development)
+ Bitmap fonts no longer visible on upgrade 19.10 -> Focal (development)
summary: - Bitmap fonts no longer visible on upgrade 19.10 -> Focal (development)
+ All bitmap fonts no longer visible on upgrade 19.10 -> Focal
+ (development)
summary: - All bitmap fonts no longer visible on upgrade 19.10 -> Focal
+ All bitmap fonts no longer visible after upgrade 19.10 -> Focal
(development)
description: updated
Jonathan Hartley (tartley) wrote :

I semi-guessed at package 'fontconfig' to associate. Advice welcome.

affects: ubuntu → fontconfig (Ubuntu)
Jonathan Hartley (tartley) wrote :

I'm speculating that pango 1.44 dropping support for bitmap fonts might be a cause: https://gitlab.gnome.org/GNOME/pango/issues/386

affects: fontconfig (Ubuntu) → pango1.0 (Ubuntu)
description: updated
description: updated
Changed in pango1.0 (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Sebastien Bacher (seb128) wrote :

Indeed, that's an upstream pango decision to drop support for bitmap fonts

Changed in pango1.0 (Ubuntu):
status: Confirmed → Triaged
Changed in pango:
status: Unknown → Fix Released
Jonathan Hartley (tartley) wrote :

I don't think 'fix released' is the right status.

Could Focal use a slightly older version of Pango, to keep bitmap fonts working for another 6 months, hoping it becomes clearer how to continue supporting them going forward?

Sebastien Bacher (seb128) wrote :

The status is just a mapping launchpad does from the gitlab closed state, if you look carrefully you will notice that the Ubuntu line is set as 'triaged'. I'm not sure we want to stay on an older serie for the LTS only to workaround that issue though...

Jonathan Hartley (tartley) wrote :

Thanks for talking me through it Sebastien. Fair enough, I defer to your experience on that.

Jonathan Hartley (tartley) wrote :

I succeeded with the process of converting a bitmap font into a vector format with embedded bitmaps, which Pango will display. It took me hours to figure out, so for anyone else:

Use fontforge, as described here:
https://gitlab.gnome.org/GNOME/pango/issues/386#note_570411

The gotcha is that once you've installed the resulting font, then it displays invisibly in font selection dialogs. However, don't give up there! If you click around blindly to select the font you want, then the font displays correctly in gnome-terminal, including all size variations, with bold and italic variants.

There is some residual weirdness in that selecting a font size that is not defined in the bitmap (e.g. when using 'ctrl-+'), the terminal goes completely blank instead of falling back to another font.

For me, using fonttosfnt, as also described in that thread, had many serious issues (eg the resulting font only preserved the bitmap's smallest size variant)

Jonathan Hartley (tartley) wrote :

For others with similar problems, I'm keeping my findings up to date here: https://www.tartley.com/dina-as-otf

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

Other bug subscribers

Remote bug watches

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