You are not logged in.

#1 2016-03-03 23:51:10

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Installing and Enabling Bitmap (.pcf) Fonts in Bunsen Labs

By default, Debian does not allow the use of bitmap fonts which is a dang pity if you want to use fonts such as those included in the artwiz collection. This tutorial shows how to install and enable them. This tutorial will assume that the fonts will remain in the directory structure of the downloaded archive, just adapt the paths to suit your own needs.

These instructions are slightly adapted from urukrama's weblog.

WARNING: The use of bitmap fonts can cause problems in certain cases; generally its use is seems to be fine with OpenBox window decorations, but GTK widgets it can cause conflicts with some applications such as GIMP and Geany (specifically their Cairo library implementation). If you find these applications close themselves immediately after opening, change your GTK widget font back to a vector font.

More warnings: This has been known to cause problems with Aliasing fonts in major websites such as Facebook and ebay. It looks godawful. Fortunately, our very own hhh has long been aware of a solution and has documented it on the Crunchbang Forums, which I am going to put here for posterity's sake:

hhh wrote:

Solved. Jebus that was maddening. This is what I think is happening...

If I enable bitmap fonts, either through dpkg-reconfigure fontconfig-config or by symlinking 70-yes-bitmaps.conf and have the default preferences for Iceweasel, Firefox or Midori, and if Helvetica is specified in the web page's stylesheet, like "Helvetica, Arial, sans-serif", it renders horribly. In chromium, or if I disable bitmap fonts, or if I change Iceweasel's prefs to use a specific font like "sans", no problem.

The solution, from Debian Wiki Fonts/FAQ, was to include the following in my ~/.fonts.conf (before the final </fontconfig> tag)...

<!-- Helvetica is a non true type font, and will look bad. This
replaces it with whatever is the default sans-serif font -->

<match target="pattern" name="family" >
<test name="family" qual="any" >
<string>Helvetica</string>
</test>
<edit mode="assign" name="family" >
<string>sans-serif</string>
</edit>
</match>
<dir>/usr/share/fonts</dir>

--edit by hhh--

I haven't checked in helium/stretch, but in the upcoming lithium/buster releases, the above code works but  is outdated and produces a warning. Replace it with the following...

<!-- Helvetica is a non true type font, and will look bad. This
replaces it with whatever is the default sans-serif font -->

    <match>
        <test name="family"><string>Helvetica</string></test>
        <edit mode="assign" name="family" binding="strong"><string>sans-serif</string></edit>
    </match>

Just save the file, no logout required.

--/edit--

Enabling Bitmap Fonts

This step only needs to be performed once. Run the following command to reconfigure fonts for your system:

$ sudo dpkg-reconfigure fontconfig-config fontconfig

You can choose your own options, but the following options seem to work pretty well

  • Font tuning method for screen: Native

  • Enable subpixel rendering for screen: Automatic

  • Enable bitmapped fonts by default: Yes <-- Well obviously you want to pick this one

Installing New Bitmap Fonts

Download and unpack
Use the following command to unpack the bz2 archive:

$ tar xvjf artwiz-aleczapka-en-1.3.tar.bz2

Gzip the fonts
This next command is necessary because Debian no longer recognises .pcf fonts, only .pcf.gz. Go into the font folder, gzip all the fonts and then return to the parent folder:

$ cd artwiz-aleczapka-en-1.3
$ gzip *.pcf
$ cd ..

Move the fonts to the system font directory

$ sudo mv artwiz-aleczapka-en-1.3 /usr/share/fonts/X11/misc

Generate font indexes
Debian must be made aware of what fonts are available, and with what sizes:

$ cd /usr/share/fonts/X11/misc
$ sudo mkfontdir
$ sudo mkfontscale

Refresh the font cache

$ sudo fc-cache -f -v

Add the font directory to your local config
Open the file ~/.profile (or create it) for editing and add the following line, using the directory of your newly installed fonts (or if you installed to a location that already exists in the file, no need to make a change here)

$ geany ~/.profile

Adding the following line (being sure to include the ampersand at the end):

xset fp+ "/usr/share/fonts/X11/misc/artwiz-aleczapka-en-1.3/" &

And you should be good to go! Have fun pimpin' your UI with pseudo-futuristic bitmap fonts!

Last edited by hhh (2019-04-25 16:09:07)


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

#2 2016-03-04 07:29:04

ohnonot
...again
Registered: 2015-09-29
Posts: 3,673
Website

Re: Installing and Enabling Bitmap (.pcf) Fonts in Bunsen Labs

thanks for posting that.
i always do it first thing when i install a system, then i forget about it.
it's good to have a tutorial for it.

the artwiz fonts are really, really great, but... using them on fairly current hardware means you have extremely sharp eyes!  glasses

of course there's many more bitfonts. i sometimes like to use one of the lfpfonts.

Offline

#3 2016-03-04 08:58:37

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: Installing and Enabling Bitmap (.pcf) Fonts in Bunsen Labs

Nice! I go mad for pixel fonts in UIs. Can't be beat.


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

#4 2016-03-05 10:28:44

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Installing and Enabling Bitmap (.pcf) Fonts in Bunsen Labs

Great guide, thanks!

Just to note:

Eraph wrote:

There is a single file preventing the use of bitmap fonts in your system. If it exists, delete it.
Use ls to see if the file 70-no-bitmaps.conf exists:

$ ls /etc/fonts.d

And if it does...

$ sudo rm /etc/fonts.d/70-no-bitmaps.conf

This step is unnecessary, the `dpkg-reconfigure` command will delete that file and replace it with 70-yes-bitmaps.conf

Also, for the lazy:

sudo dpkg-reconfigure fontconfig-config fontconfig

smile

The bitmap fonts are disabled in BunsenLabs to prevent unsightly fonts on webpages and such when the requested font is unavailable and the system attempts to use a bitmap font as a fallback.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#5 2016-03-05 11:03:05

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: Installing and Enabling Bitmap (.pcf) Fonts in Bunsen Labs

Good advice! Cheers for that HoaS, I'll make the adjustments.


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

#6 2016-03-05 11:14:44

fog
Member
From: Athens, Greece
Registered: 2015-10-28
Posts: 112
Website

Re: Installing and Enabling Bitmap (.pcf) Fonts in Bunsen Labs

Nice guide, thanks.

ohnonot wrote:

...of course there's many more bitfonts. i sometimes like to use one of the lfpfonts.

Thanks smile


Toshiba Satellite P50-C-17C (i7-6700HQ/12GB/1TB + 128GB/GeForce GTX 950M/FHD)
Where there's a shell, there is a way.
github || photos || blog || dArt

Offline

#7 2019-04-25 16:10:24

hhh
That's it!
Registered: 2015-09-17
Posts: 7,462
Website

Re: Installing and Enabling Bitmap (.pcf) Fonts in Bunsen Labs

Bump, I've edited the OP fontconfig to eliminate the warning produced in lithium/buster releases.

Offline

Board footer

Powered by FluxBB