Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#2966 closed defect (fixed)

Under Vista, Hebrew does not work in most places in the UI

Reported by: kopo Owned by: datallah
Milestone: Component: winpidgin (gtk)
Version: 2.1.1 Keywords: windows vista hebrew ui fonts segoe
Cc:

Description

In Windows Vista, trying to type in Hebrew (UTF8) anywhere in the winpidgin UI results in box characters (with the Unicode value in the box). This includes the status entry box, all entry boxes in the preferences, as well as the message entry in conversation windows. Changing the font face of the outgoing font in a conversation to one that supports Hebrew does fix this, but only for the specific text formatted in the font.

I suspect that this has to do with the Segoe UI font in windows, which does not have Hebrew built in (Vista uses the Gisha font for Hebrew in the interface, instead). So somewhere along the line, GTK isn't using the fonts specified by the OS for non-Latin text.

Change History (22)

comment:1 follow-up: Changed 11 years ago by datallah

  • pending changed from 0 to 1

You've gotten it exactly right; GTK+ has no idea which fonts to use unless it is told. The MS-Windows GTK+ theme will use the default Windows font, but there is no capability to use Windows' fallback mechanism when there are missing glyphs.

The way to fix this is to edit the pango.aliases file and to include the necessary fonts in the alias lists there.

Instead of editing the global pango.aliases file which will be replaced when the GTK+ Runtime is upgraded, you should copy it to your home directory and edit it there:

  • %USERPROFILE%.pango.aliases NOTE the leading '.' as it is necessary; Windows Explorer will not let you create a file with that name - you'll need to rename it from a cmd prompt or through a text editor.

Let me know which font(s) you need to add and I'll include them in the distributed pango.aliases file.

comment:2 in reply to: ↑ 1 Changed 11 years ago by okravetz

I'm having this same issue, but I have a question: where can I find the pango.aliases file in Windows Vista? Or do I just have to wait till the issue is fixed in some future version of Pidgin?

Replying to datallah:

You've gotten it exactly right; GTK+ has no idea which fonts to use unless it is told. The MS-Windows GTK+ theme will use the default Windows font, but there is no capability to use Windows' fallback mechanism when there are missing glyphs.

The way to fix this is to edit the pango.aliases file and to include the necessary fonts in the alias lists there.

Instead of editing the global pango.aliases file which will be replaced when the GTK+ Runtime is upgraded, you should copy it to your home directory and edit it there:

  • %USERPROFILE%.pango.aliases NOTE the leading '.' as it is necessary; Windows Explorer will not let you create a file with that name - you'll need to rename it from a cmd prompt or through a text editor.

Let me know which font(s) you need to add and I'll include them in the distributed pango.aliases file.

comment:3 Changed 11 years ago by datallah

The file location should be the same in Vista.

The global pango.aliases will be in C:\Program Files\Common Files\GTK\2.0\etc\pango.

Your local .pango.aliases should go in %USERPROFILE% (you can type that in the explorer address bar to take you to the right place.

comment:4 Changed 11 years ago by kopo

  • pending changed from 1 to 0

To which line in .pango.aliases should the font names be added, and in what position? By the way, there is a list of new UI fonts for various languages in Windows Vista here: http://msdn2.microsoft.com/en-us/library/aa511295.aspx

It would probably be helpful if they were referenced in future distributions of pango.aliases.

comment:5 Changed 11 years ago by datallah

  • pending changed from 0 to 1

Does something like: "segoe ui" = "segoe ui,meiryo,malgun gothic,microsoft jhenghei,microsoft yahei,gisha,leelawadee" work?

If not, what about without the quotes in the left side ( segoe ui = "...")?

comment:1 follow-up: Changed 11 years ago by trac-robot

  • pending changed from 1 to 0
  • Status changed from new to closed

This ticket was closed automatically by the system. It was previously set to a Pending status and hasn't been updated within 14 days.

comment:2 Changed 11 years ago by bleachercreature

Any update on this? Is "Gisha" the right vista language?

comment:3 Changed 11 years ago by datallah

Nobody let me know if the suggested change worked, so i never made it in the distributed GTK+ runtime.

comment:4 Changed 11 years ago by kopo

Neither of the suggested changes worked:

"segoe ui" = "segoe ui,meiryo,malgun gothic,microsoft jhenghei,microsoft yahei,gisha,leelawadee"

segoe ui = "segoe ui,meiryo,malgun gothic,microsoft jhenghei,microsoft yahei,gisha,leelawadee"

comment:5 Changed 11 years ago by datallah

I guess that makes me wonder if "segoe ui" is the font that is actually being used (because if it were, the fallbacks in the list should work).

comment:6 Changed 11 years ago by idangazit

Some guidance here would really be appreciated -- even if it's in the form of instructions how to divine the magic incantation necessary to make the fonts work.

I've tried pretty much every permutation of quotes and font names, in both the user-specific .pango.aliases and the global one -- no joy.

If the current suspicion is that Segoe isn't being used -- how can I figure out what font is being used? It certainly seems that Segoe is being used from a visual perspective, but I don't have any hard information to back that up with.

How can I help solve this issue?

comment:7 Changed 11 years ago by idangazit

Reopening this wouldn't go poorly either -- it's certainly not yet solved.

comment:8 Changed 10 years ago by kostiak

Please reopen this, becouse it isnt solved yet... i would realy like to use it, and hebrew support is common these days.. so please reopen it

comment:9 Changed 10 years ago by datallah

  • Status changed from closed to reopened

I've reopened this, but I have nothing further to add - I've already included all the information that I can. Someone with access to Vista is going to have to figure out how to get the appropriate aliasing to work.

comment:10 Changed 10 years ago by idangazit

Applied some google-elbow-grease to this issue, looks like it's a problem with how pango works in win32... :( Tor Lillqvist (Win32 GTK maintainer and hacker extraordinaire) ran into this issue and also suggested the pango.aliases fix, except he realized it doesn't work:

Unfortuntely, the above won't work, as Pango doesn't like spaces in the aliased (left-hand side) font name in pango.aliases... Putting doublequotes around it doesn't work either...

So sadly, if Segoe UI is used as the system font then the pango.aliases trick will not work. In the rest of the posting he suggests changing the system font to something without a space in the name (like Tahoma) and then the pango.aliases approach will work.

I have found that using GtkThemeSelector? and choosing a non MS-Windows GTK theme also works -- but results in a non-ms-windows-look-and-feel. :(

Another useful tip: under vista, to change the global theme engine used, you must run GtkThemeSelector?.exe as administrator.

So for now this is an upstream issue. I filed a ticket on pango, #515545

comment:11 Changed 10 years ago by idangazit

This issue is fixed in pango 1.18.4, which allows alias names to be a double-quoted string so as to allow spaces (for fonts like "segoe ui").

I downloaded pango 1.18.4 from Tor's site and copied over the existing pango 1.18.3 libs. Added the following line to my pango.aliases in %userprofile%:

"segoe ui" = "segoe ui,dejavu sans,arial,lucida sans unicode"

Works like a charm! I think the solution is twofold:

  1. Package a new release of the GTK runtime with the updated Pango
  2. Add a line in pango.aliases for commonly "missing" glyphs in segoe such as hebrew, CJK, etc -- so users have a good experience out of the box on platforms like vista.

comment:12 Changed 10 years ago by datallah

idangazit: Thanks for your persistence in getting to the bottom of this.

I'll update the pango.aliases file that is distributed in our installer for the next release.

comment:13 Changed 10 years ago by idangazit

My pleasure. Thanks for pidgin! :)

comment:14 Changed 10 years ago by datallah

  • Resolution set to fixed
  • Status changed from reopened to closed

The next GTK+ runtime that we release (probably 2.12.8 if that doesn't have any surprises) will contain the updated pango and the following additional line in the pango.aliases file. If someone can verify that this works, that would be great.

"segoe ui" = "segoe ui,meiryo,malgun gothic,microsoft jhenghei,microsoft yahei,gisha,leelawadee"

comment:15 Changed 10 years ago by idangazit

I checked it out, it works great!

comment:16 Changed 10 years ago by idangazit

Caveat: I only checked out the hebrew script -- I don't really have a good way of testing the other fallback scripts...

comment:17 Changed 10 years ago by okravetz

Just downloaded and installed 2.4.0 with GTK 2.12.18 on Vista x86 and it works. Yay!

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!