Bug 61538 - gedit does not like unicode fonts
gedit does not like unicode fonts
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: gedit (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Havoc Pennington
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-21 02:07 EST by Bill Nottingham
Modified: 2014-03-16 22:26 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-21 10:40:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2002-03-21 02:07:38 EST
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 10:16:12 EST
Owen may correct me, but I believe this is expected with GTK 1.2.
Comment 2 Bill Nottingham 2002-03-21 10:18:08 EST
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 10:40:04 EST
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 15:53:14 EST
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 15:58:14 EST
I'm still bafffled. gnome-terminal works *perfectly* with iso10646 fonts.
Comment 6 Havoc Pennington 2002-03-21 16:09:04 EST
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 16:12:56 EST
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 16:46:55 EST
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.