[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Font Problems (TTF)
From:       Charles Samuels <charles () kde ! org>
Date:       2001-02-05 22:20:22
[Download RAW message or body]


I've seen many reports of people unable to use their True Type Fonts.  Today, 
I discovered why.

Notes: I use mandrake 7.1, XFree86 4 (although the X makes no difference)

the QT example "x-forms" works fine with all my true type fonts.  And why?  
The charset is the key

Font that works:
-adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1

Font that doesn't work:
-macromedia-distortia-medium-r-normal--0-0-0-0-p-0-ascii-0

The working font uses iso8859-1 (latin-1?), while distortia uses ascii-0 (a 
non-standard charset, possibly)

However, this is problematic, since KFontDialog cannot find 
distortia(iso8859-1), it resorts to Helvetica, causing Distortia to be 
unusable in all my KDE apps.  The KFontDialog should not only show standard 
and iso-8859-1, it should show all the charsets that are associated with the 
currently selected font.

Is this really a KDE bug?  Yes: These fonts work in plain QT (QFontDialog), 
and GTK (Gimp).

To prove that KFontDialog was to blame, I went further, I edited kcmfonts:

void FontUseItem::choose()
{
	bool ok;
	QFont f = QFontDialog::getFont(&ok, _font);
	if (ok)
	{
		_font = f;
		updateLabel();
		emit changed();
	}
}

And now, all of a sudden, the KControl's font selector works!

If someone that knows about KFontDialog doesn't volunteer to fix it, then I 
will-- and it won't be pretty :)

-Charles

-- 
Charles Samuels <charles@kde.org>
K Desktop Environment
"The people. Could you patent the sun?"
 -- Jonas E. Salk, when asked who owned the patent on his polio vaccine.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic