You are not logged in.

#1 2008-03-23 11:49:12

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Why can I not use Dina-font as a Xft font?(SOLVED)

If I use the following code with i.e. dzen2: -*-dina-medium-r-*-*-15-*-*-*-*-*-iso8859-1 everything works fine. The problem is that I want to use it in awesome's statusbar, but ASFAIK it only uses Xft fonts.

Dina fonts are stored in *.bdf.pcf.gz files and as I understand it these font types should be usable in Xft oriented apps. Or what?

Any hints/help are appreciated.

Last edited by Ashren (2008-03-23 16:27:30)

Offline

#2 2008-03-23 12:46:33

tami
Member
From: Norway, Oslo
Registered: 2007-11-10
Posts: 58
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Perhaps this could help you:
http://awesome.naquadah.org/wiki/index. … zing_Fonts

From the site:

run 'xlsfonts | grep <fontname>' or xfontsel, and your font should be available.

Maybe:

 general
   {
      font = dina-15
   }

would work...?


"Possession means worries and luggage bags one has to drag along." Little My wink

Offline

#3 2008-03-23 13:06:45

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Thanks tami, the problem is that dina does show up in xfontsel and xlsfonts, but what name should I insert in .awesomerc?

I have added the path to xorg.conf (it's the same as terminus')

Here is the output of xlsfonts:

-windows-dina-bold-i-normal--0-0-96-96-c-0-iso8859-1
-windows-dina-bold-i-normal--13-80-96-96-c-70-iso8859-1
-windows-dina-bold-i-normal--15-90-96-96-c-70-iso8859-1
-windows-dina-bold-i-normal--16-100-96-96-c-80-iso8859-1
-windows-dina-bold-r-normal--0-0-96-96-c-0-iso8859-1
-windows-dina-bold-r-normal--13-80-96-96-c-70-iso8859-1
-windows-dina-bold-r-normal--15-90-96-96-c-70-iso8859-1
-windows-dina-bold-r-normal--16-100-96-96-c-80-iso8859-1
-windows-dina-medium-i-normal--0-0-96-96-c-0-iso8859-1
-windows-dina-medium-i-normal--13-80-96-96-c-70-iso8859-1
-windows-dina-medium-i-normal--15-90-96-96-c-70-iso8859-1
-windows-dina-medium-i-normal--16-100-96-96-c-80-iso8859-1
-windows-dina-medium-r-normal--0-0-96-96-c-0-iso8859-1
-windows-dina-medium-r-normal--13-80-96-96-c-70-iso8859-1
-windows-dina-medium-r-normal--15-90-96-96-c-70-iso8859-1
-windows-dina-medium-r-normal--16-100-96-96-c-80-iso8859-1

Offline

#4 2008-03-23 13:28:27

tami
Member
From: Norway, Oslo
Registered: 2007-11-10
Posts: 58
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

I do not use dina - but gamow.

In my awesome config I use:
general
    {
        font = "gamow-6"
    }

Perhaps proposed by me earlier:

dina-15

would work?


"Possession means worries and luggage bags one has to drag along." Little My wink

Offline

#5 2008-03-23 13:46:32

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

I have tried your example earlier and again when you proposed it, but Dina does not show up in any apps under font settings and therefore it is not possible to use the xft name of the font - I believe.

If I enter "dina-10" the font displayed looks uncannily like sans, which I believe awesome defaults to if it can not find a font.

Edit:
Gamow is pretty nice btw.

Last edited by Ashren (2008-03-23 14:01:36)

Offline

#6 2008-03-23 14:28:25

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

IT works fine for me, this is what I have in my .Xdefaults:

urxvt*font:         xft:Dina:size=10

These are the font files I have on my system:

$ ls -l /usr/share/fonts/local/Dina*
-rw-r--r-- 1 root root 24K 2008-02-08 00:54 /usr/share/fonts/local/DinaBold10.pcf
-rw-r--r-- 1 root root 21K 2008-02-08 00:54 /usr/share/fonts/local/DinaBold8.pcf
-rw-r--r-- 1 root root 23K 2008-02-08 00:54 /usr/share/fonts/local/DinaBold9.pcf
-rw-r--r-- 1 root root 24K 2008-02-08 00:54 /usr/share/fonts/local/DinaBoldItalic10.pcf
-rw-r--r-- 1 root root 21K 2008-02-08 00:54 /usr/share/fonts/local/DinaBoldItalic8.pcf
-rw-r--r-- 1 root root 23K 2008-02-08 00:54 /usr/share/fonts/local/DinaBoldItalic9.pcf
-rw-r--r-- 1 root root 24K 2008-02-08 00:54 /usr/share/fonts/local/DinaItalic10.pcf
-rw-r--r-- 1 root root 21K 2008-02-08 00:54 /usr/share/fonts/local/DinaItalic8.pcf
-rw-r--r-- 1 root root 23K 2008-02-08 00:54 /usr/share/fonts/local/DinaItalic9.pcf
-rw-r--r-- 1 root root 24K 2008-02-08 00:54 /usr/share/fonts/local/DinaMedium10.pcf
-rw-r--r-- 1 root root 21K 2008-02-08 00:54 /usr/share/fonts/local/DinaMedium8.pcf
-rw-r--r-- 1 root root 23K 2008-02-08 00:54 /usr/share/fonts/local/DinaMedium9.pcf

Maye sure that you have correct font paths in your xorg.conf, and mayre fun mkfontdir/mkfontscale on the directory where you have installed the font.

EDIT: I don't use awesome anymore, but "Dina-10" worked just fine in awesomerc (if I remember correctly).

Last edited by fwojciec (2008-03-23 14:30:28)

Offline

#7 2008-03-23 14:34:19

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

For some reason the Dina directory does not exist on in my /usr/share/fonts/local dir. But a lot of files named dina_r*00-*.bdf.pcf.gz is located here. I installed dina-font with yaourt. How did you install them fwojciec?

Offline

#8 2008-03-23 14:41:20

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Ok I found the fonts here:
http://www.donationcoder.com/Forums/bb/ … pic=7857.0

And installed them locally in ~/.fonts
did a mkfontdir/mkfontscale and fc-cache and now I can use Dina.

Thanks for the suggestions guys.

Offline

#9 2008-03-23 14:41:45

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Downloaded a tarball, and extracted to /usr/share/fonts/local manually (I didn't even know there was an aur package for this font).
The tarball was taken from this thread: http://www.donationcoder.com/Forums/bb/ … pic=7857.0 (the PCF one)

EDIT: You were first I guess -- I didn't have the link bookmarked, so it took me a moment to find it again smile

Last edited by fwojciec (2008-03-23 14:42:39)

Offline

#10 2008-03-23 14:59:23

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Thanks for your trouble.

Offline

#11 2008-04-13 07:02:13

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Hey there,

I was wondering if you figured out why the Dina fonts from AUR do not work. I downloaded the version of Dina indicated in this thread and it works great, but there are a number of other bitmap fonts that I'd like to see in XFT apps, like those in the proggyfonts package. It would be interesting to see how to go about making these fonts visible to XFT.

Regards,
j

Offline

#12 2008-04-13 10:36:19

Gigamo
Member
Registered: 2008-01-19
Posts: 394

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Agreed, I as well would like to use proggyfonts in specific apps smile

Offline

#13 2008-04-13 19:37:21

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

You guys could always download the ttf/pcf versions of proggyfonts:

http://www.proggyfonts.com/index.php?menu=download

And unpack them in i.e. ~/.fonts then run mkfontdir, mkfontscale fc-cache and then add ~/.fonts to your xorg.conf fontpath.

Offline

#14 2008-04-14 17:53:21

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Ashren wrote:

You guys could always download the ttf/pcf versions of proggyfonts:

http://www.proggyfonts.com/index.php?menu=download

And unpack them in i.e. ~/.fonts then run mkfontdir, mkfontscale fc-cache and then add ~/.fonts to your xorg.conf fontpath.

I tried downloading the PCFs (I don't like the TTF for some reason) and it still doesn't work because it turns out those PCF files are generated with some of the information that XFT needs missing. In fact, the AUR proggyfonts package downloads those very same PCF files.

What I did was what was recommended in the thread on www.donationcoder.com. I downloaded the Windows FON version, converted it to BDF format with fnt2bdf that I pulled from an old Wine RPM, fixed the font metadata with a Python script I wrote, and then converted the fixed BDF files to PCF with bdftopcf. I can now see my proggy fonts in XFT.  I would be glad to post the Python script if anyone is interested.

Regards,
j

Offline

#15 2008-04-14 17:59:52

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Yes, that would be very nice please post that script. I'd love to get an understanding on why some pcf fonts won't show in XFT. I never got my hands on that fnt2bdf program - good idea pulling it from a RPM.

Offline

#16 2008-04-14 18:54:39

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Well, it turns out that XFT can't use PCF files that are missing certain font header information. Apparently, the original sources of the Proggy fonts do not encode the information in the BDF file. It is, however, available through the X font designator.

Anyway, here is the fixbdf.py script. Enjoy, don't be too hard on it, in the tests I did on the Proggy fonts, everything worked fine. It's also been a long time since I've done any Python. It's kind of nice. To save you some trouble, the fnt2bdf I used is from here.

Regards,
j

Offline

#17 2008-04-14 19:56:55

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Thanks Jay. Your script looks very useful and nicely commented to boot. And thanks for the pointer to fnt2bdf, definitely easier to extract the program from a rpm than to compile from source.

Now, I have to find some FON's to play with.

Offline

#18 2008-04-14 20:36:23

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

It works very well. Just converted EnvyCodeA and looks really nice actually.

Offline

#19 2008-04-14 21:20:32

Gigamo
Member
Registered: 2008-01-19
Posts: 394

Re: Why can I not use Dina-font as a Xft font?(SOLVED)

Worked very well indeed! Thanks.

Offline

Board footer

Powered by FluxBB