topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 8:23 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Dina programming font for X11 use  (Read 23780 times)

bpcw001

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Dina programming font for X11 use
« on: March 12, 2007, 07:36 AM »
Hi,

recently came across the Dina programming font and for me it's the best font
for coding ever.
It is perfect for Windows, however, I'm using Linux and would like to to ask
if there is any way to make this beautiful font work in X11 and KDE/Gnome.

AFAIK, X11 does not handle Windows .FON files.
Could you point me in some direction as to how to make Dina available on X11/KDE/Gnome?

Thank you

bpcw

bpcw001

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Re: Dina programming font for X11 use
« Reply #1 on: March 13, 2007, 04:29 AM »
Hi,

just wanted to share with you that I've started messing around with Dina.FON in Linux.
With fnt2bdf (from Wine) I was able to create the .BDF files corresponding to each size and weight provided by Dina.FON

After that, I converted the BDF files with bdftopcf to obtain .PCF files for use with X.

However, something goes awry here since, while I can see the .PCF font in X itself, it does not show up font selection
dialogs of KDE or Gnome. And this is the case because fontconfig does not pick those fonts up.

I read somewhere that fontconfig will pick up bitmapped fonts only if they are encoded either iso8859 or iso10646.

Well, Dina has Windows encoding, so I tried to reencode the .BDFs to iso8859 with fontforge before converting them to .PCF, but fontconfig still doesn't pick up Dina.

I also tried to let fontconfig just pick up the .BDF file. Then, Dina shows up in Gnome's or KDE's font selection dialogs, but the font that is then actually chosen
is not Dina, but some monospace substitute.


I can use other bitmapped fonts (like Clean) in X, KDE and Gnome without any problems.

Anybody has an idea ??

Thanks

bpcw001


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dina programming font for X11 use
« Reply #2 on: March 13, 2007, 04:40 AM »
I don't have any idea to help, but i am very interested in any solution you find.. Please keep us informed.
Jibz is a very nice guy, maybe send him an email and ask him for some help -- it's been too long since he stopped by!

bpcw001

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Re: Dina programming font for X11 use
« Reply #3 on: March 13, 2007, 08:40 AM »
Hi,

thanks for your response.
I'll definitely post a solution to using Dina with Linux if I ever manage to find one, but the situation looks pretty bleak right now  :(
Unfortunately, my knowledge of font internals in general and Linux font specials (X font system, fontconfig etc) is quite limited.

So, I might actually contact Jibz in order to get some qualified input.

bpcw001



Jibz

  • Moderator
  • Joined in 2005
  • *****
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: Dina programming font for X11 use
« Reply #4 on: March 13, 2007, 12:41 PM »
A while back I received the attached conversions for X11 and Mac, kindly contributed by Jamie Burns.

I was planning on including them in the package, but was hoping to find a reliable way to perform the conversion myself to make future updates easier -- but like you without much luck.

bpcw001

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Re: Dina programming font for X11 use
« Reply #5 on: March 14, 2007, 04:28 AM »
Hi Jibz,

thanks for your input and the link to the files.
The .BDF files are exactly the ones you get when taking apart the Windows Dina.FON file with fnt2bdf.

Both .BDF and the bdftopcf-converted .pcf and .pcf.gz files will work in X itself. That's the good news.

Bad news is that fontconfig (which is responsible for serving fonts to Desktop Environments like Gnome or KDE)

- picks up the .BDF file and hence Dina displays as choosable font in KDE/Gnome font selection dialogs, but upon choosing
  Dina, a different substitute font is actually used instead

- does not pick up the .pcf or .pcf.gz file at all

Those fontconfig issues are quite known amongst those still willing to use bitmapped fonts in Linux.
The creators of fontconfig apparently decided to no longer give bitmap fonts an appropriate treatment in their software.
They seem to think that nobody uses them any more and everyone wants a blurred, antialiased TrueType desktop (ugh!)

Maybe I can figure out an appropriate configuration of fontconfig, but I'm slowly giving up on this one.

Thanks for your help anyway

bpcw001



f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Dina programming font for X11 use
« Reply #6 on: March 14, 2007, 05:05 AM »
Perhaps google and some manual font strings could help, I found some reference to VIM font config (perhaps googling linux+vim+dina might help?). But I've never really messed with that myself, it seems too messy and I don't use GUI linux anyway.

I've never really understood the whole cleartype/antialiased fonts thing, it looks smudgy and annoying. Even when done "right". And this applies to both CRT and TFT monitors... strains my eyes rather than relieve them.
- carpe noctem

bpcw001

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Re: Dina programming font for X11 use
« Reply #7 on: March 14, 2007, 11:53 AM »
Hi f0dder,

thanks for your input.

However, the remaining problems are of different nature. So let me reiterate:

Dina can be made to work in X. Hence any application that uses X's font system or an own font customization mechanism can be configured to use Dina.
This is the case with VIM, EMACS and the genuine XTerm.

Unfortunately, not everything running in X uses X's own font system. There is an application called "fontconfig", which sits on top of X and has its own mechanism to
serve fonts to applications which don't use raw X or their own font customization mechanism, but rely on GTK or QT, such as the popular desktop environments
GNOME and KDE and all applications based on their libraries.

The problem is with the "fontconfig" application which does not pick up Dina properly or even doesn't pick Dina up at all.
Thus, if fontconfig does not "see" Dina, GNOME and KDE applications will not be able to use Dina.

Hence, all this boils down to finding a proper configuration for the application "fontconfig" and/or finding out how a bitmapped font must be
crafted in order to be accepted by fontconfig.

Thanks for your attention.

bpcw001