Bug 61538 - gedit does not like unicode fonts
Summary: gedit does not like unicode fonts
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gedit
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Havoc Pennington
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-21 07:07 UTC by Bill Nottingham
Modified: 2014-03-17 02:26 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-03-21 15:40:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2002-03-21 07:07:38 UTC
Steps to Reproduce:
1. run gedit
2. set default font to something unicode (iso10646-1)
3. type in some text

Actual Results:
Your text looks fubar

Expected Results:
Your text should not look fubar.

Comment 1 Havoc Pennington 2002-03-21 15:16:12 UTC
Owen may correct me, but I believe this is expected with GTK 1.2.

Comment 2 Bill Nottingham 2002-03-21 15:18:08 UTC
Huh? Why whould switching the font charset from iso8859-1 to iso10646-1 change
text that is *only* in iso8859-1 characters to boxes?

Comment 3 Owen Taylor 2002-03-21 15:40:04 UTC
Well, that's the way it is.... you have to have a font that matches the
encoding of the locale. Some things can just truncate an iso-10646-1 font and
get a iso-8859-1 font by luck, GTK+ doesn't support that.

(Without looking at the gedit source code, I don't know the full details,
but it appears that it is using gdk_font_load() rather than gdk_fontset_load(),
since otherwise it would be replacing the iso10646-1 with iso8859-1 and
probably get a useable font.)

Comment 4 Havoc Pennington 2002-03-21 20:53:14 UTC
This bug was in all of 7.x, gnome-terminal has the same issue, I don't think 
it's something we want to fool with for hampton. Switching to fontset might
break other stuff.

Comment 5 Bill Nottingham 2002-03-21 20:58:14 UTC
I'm still bafffled. gnome-terminal works *perfectly* with iso10646 fonts.

Comment 6 Havoc Pennington 2002-03-21 21:09:04 UTC
It works if you have "enable multibyte support" but not if you don't. which is
essentially gdk_font_load() vs. gdk_fontset_load()

Comment 7 Havoc Pennington 2002-03-21 21:12:56 UTC
Oops, it's the other way around, it works if you _don't_ enable multibyte support.
But we enable it by default.

But that's inconsistent with what Owen said since multibyte support means fontsets.

Comment 8 Havoc Pennington 2002-03-21 21:46:55 UTC
Owen says the unknown chars are caused by gdk_font_load() in combination with 
gdk_draw_string() which expects the string to be in a 16-bit encoding.
gnome-terminal uses gdk_draw_char() or XDrawString() or something so 
doesn't have this issue with gdk_font_load().


Note You need to log in before you can comment on or make changes to this bug.