installing bitmap font

Everything about X, Gnome, KDE, ... and everything running on it

installing bitmap font

Postby morgon » 2018-10-13 16:29

Hi,

I have a problem installing a bitmap font in testing.

Here is what I did:

I enabled bitmap-fonts via "sudo dpkg-reconfigure fontconfig-config"
I copied the pcf-file to a directory in my home-dir and ran "mkfontdir"
Then I ran "sudo xset +fp <my font-dir>" and verified that fp had been updated via "xset q".
Then I ran "sudo xset rehash"
Then I ran "sudo dpkg-reconfigure fontconfig"

I now expected the font to be available, but it seems it isn't. fc-list cannot find it and an application that uses it gives warnings.

What am I doing wrong?

Many thanks!

UPDATE:

Can someone explain this to me:

Code: Select all
/home/mh > xlsfonts | grep -i siji
-wuncon-siji-medium-r-normal--0-0-75-75-c-0-iso10646-1
-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1
/home/mh > fc-list | grep -i siji
/home/mh >


What I tried above was to install the siji-font. After that xlsfonts seems to list it, fc-list does not.
What is the difference?
morgon
 
Posts: 111
Joined: 2010-08-28 03:04

Re: installing bitmap font

Postby Head_on_a_Stick » 2018-10-13 17:41

morgon wrote:I have a problem installing a bitmap font in testing

Which font? How are you installing it? Which version of Debian are you running?

Then I ran "sudo xset +fp <my font-dir>" and verified that fp had been updated via "xset q".
Then I ran "sudo xset rehash"

FWIW you should run those commands as your normal user and the second one should be `xset fp rehash` (I think).

If you place your fonts in ~/.local/share/fonts then the X server should pick them up automagically.

To enable bitmap fonts use the method described here by urukrama:

https://urukrama.wordpress.com/2016/01/ ... in-debian/

I don't think the xorg configuration file described in that link will be needed for fonts installed from the Debian repositories though.
In rebus mathematicis errores quam minimi non sunt contemnendi.
User avatar
Head_on_a_Stick
 
Posts: 8570
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: installing bitmap font

Postby morgon » 2018-10-13 17:50

As I've said I run testing.
As I've said it's about the siji-font.
I have tried to install it as I have said.

And I try to avoid "automagical" solutions, I would rather understand a little bit how things work.

xset -q shows that my font-directory is in fp.
Yet when I run "fc-cache -f -v" this directory does not seem to get processed... but why?
morgon
 
Posts: 111
Joined: 2010-08-28 03:04

Re: installing bitmap font

Postby debiman » 2018-10-14 13:52

troubleshooting:
does xfontsel see the font?
but some gtk font chooser dialog doesn't?

where and how do you plan to use it? siji, was it?

edit: it looks like that urukrama post has all you need.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: installing bitmap font

Postby morgon » 2018-10-14 17:42

xfontsel sees it.
xlsfonts sees it.
fc-list does not see it.

I want to use the siji-font with polybar.

So what is is that the urukaram post does and I do not?

Pleas enlighten me as I don't see it....
morgon
 
Posts: 111
Joined: 2010-08-28 03:04

Re: installing bitmap font

Postby morgon » 2018-10-14 18:28

Ok. I think I figured it out (do a certain degree):

The issue I had has to do with fontconfig-caches.

Now you can put your font in one of the directories that fontconfig knows about it by default, then the urukrama-posting mentioned above should do the trick.

However the information given there that pcf-files need to be gzipped is wrong. At least on my testing system plain pcf-files work just fine.

If you want to put your fonts into a directory that fontconfig does not know about you need to tell it by placing a file into /etc/fonts/conf.d with this example syntax:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>/path/to/my/dir</dir>
</fontconfig>


The whole topic of how fonts work in X and in debian is still a mystery to me - I'd be thankful for a pointer to a good tutorial.
morgon
 
Posts: 111
Joined: 2010-08-28 03:04

Re: installing bitmap font

Postby debiman » 2018-10-21 11:44

morgon wrote:The whole topic of how fonts work in X and in debian is still a mystery to me

there's basically two separate systems:
the old xfonts, bitmapped fonts.
and the new scalable fonts: xft (freetype).
the latter are usually managed by fontconfig.
fontconfig can be made to "see" the old xfonts also, but doesn't do so by default on most distros.
yes, it's a jungle.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable