Closed Bug 370045 Opened 17 years ago Closed 13 years ago

ENABLE_XFT_FAST_PATH_ALWAYS does not works with cyrillic content

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: romaxa, Assigned: romaxa)

References

()

Details

(Whiteboard: WONTFIX?)

Attachments

(1 file)

Uncomment define ENABLE_XFT_FAST_PATH_ALWAYS if gfxPangoFonts.h and rebuild seamonkey.

Open URL:
data:text/html,<html lang=ru><META http-equiv="Content-Type" content="text/html; charset=KOI8-R"><body>%D0</body></html>

This should show Cyrillic P letter "П", but instead it show empty rectangle equals glyph->index=0.

Problem somewhere here:
XftCharIndex (font, 1055) return 0.
with font "Bitstream Vera Serif", which appears in gfxPangoFont::RealizeXftFont
..............
   PangoFcFont *fcfont = PANGO_FC_FONT(GetPangoFont());
   mXftFont = pango_xft_font_get_font(PANGO_FONT(fcfont));
..............

I have checked the same URL with old gtk/xft build, there are xftfont="DejaVu Serif" and XftCharIndex return 859 for 1055

I tried to set force
mXftFont = XftFontOpenName(GDK_DISPLAY(), 0, "DejaVu Serif");
after that XftCharIndex return 859 (proper value).. but glyph not showed... :(
Attached file TestCase
Blocks: 368182
No longer blocks: 368182
Depends on: 368182
I tried to insert small hack for checking font...
in begin of gfxPangoFontGroup::FontCallback

if (!fontName.EqualsLiteral("DejaVu Serif"))
      return PR_FALSE;

After that begins to work www.ya.ru, wwwlinux.org.ru pages...

Probably we miss choosing proper font when XFT_ALWAYS defined.
This hack work more better... ;)

--- pango_font_description_set_family(mPangoFontDesc, NS_ConvertUTF16toUTF8(mName).get());
+++ pango_font_description_set_family(mPangoFontDesc, "Arial");

......
The Xft path does not do font substitution. If you want to add font substitution to that path, fine, but I'm not going to do it because we won't be turning on ENABLE_XFT_FAST_PATH_ALWAYS.
Component: GFX: Gtk → GFX: Thebes
QA Contact: gtk → thebes
Whiteboard: WONTFIX?
Ok, probably I need to implement this substitution...
Status: NEW → ASSIGNED
Assignee: nobody → romaxa
Status: ASSIGNED → NEW
Oleg, what's the status of this bug?
I think I just don't care about this bug anymore....
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: