Bug 54530 - [GTK] [Windows] pango clashed with freetype when freetype backend used
Summary: [GTK] [Windows] pango clashed with freetype when freetype backend used
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-15 22:09 PST by Bakhtiar Hasmanan
Modified: 2011-05-30 19:09 PDT (History)
1 user (show)

See Also:


Attachments
facebook languages selection [freetype backend] (48.46 KB, image/png)
2011-02-15 22:09 PST, Bakhtiar Hasmanan
no flags Details
facebook languages selection [pango backend] (29.40 KB, image/png)
2011-02-15 22:10 PST, Bakhtiar Hasmanan
no flags Details
freetype backend with tahoma override in fonts.conf and updated pango.aliases (159.30 KB, image/png)
2011-03-20 21:02 PDT, Bakhtiar Hasmanan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bakhtiar Hasmanan 2011-02-15 22:09:18 PST
Created attachment 82590 [details]
facebook languages selection [freetype backend]

In Windows freetype can display CJK properly when Pango fail. But in return Freetype fails on Hindi and Arabic when Pango thrive. Arrgh..
Is this happened to Linux? if not what can I do?
Comment 1 Bakhtiar Hasmanan 2011-02-15 22:10:28 PST
Created attachment 82591 [details]
facebook languages selection [pango backend]
Comment 2 Bakhtiar Hasmanan 2011-02-15 22:12:56 PST
version: webkitgtk+ 1.2.7 with glib unicode backend
Comment 3 Bakhtiar Hasmanan 2011-02-16 05:51:51 PST
I think it is just font selection matter as not all arabic pages failed. This one works: ayaspell.sourceforge.net
Comment 4 Bakhtiar Hasmanan 2011-02-16 06:41:30 PST
google.co.jp which failed to render on Pango can be fixed if in the font-family css prepended by japanese font "MS PGothic"

How this achieved from inside webkitgtk?
Comment 5 Bakhtiar Hasmanan 2011-02-16 18:17:28 PST
My guess is fontconfig or webkitgtk in Windows didn't match the meta lang id with system's fonts. For ex. it would pick Verdana which don't have lang=ar over Arial which have when rendering arabic pages (clearly defined lang=ar). I thought that what fontconfig have to deal with? or not?

Why would I even need to override the preference from fonts.conf? Is there another good browser with fontconfig/freetype backend on Windows? 
I have Mplayer that use fontconfig to pick which font to render subtitle but also come with fairly standard fonts.conf so I doubt this is fontconfig fault...

In other hand, how to make pango works without doing my previous comment#4? Pango lack of CJK (Korean is displayed but with wrong hint) in Windows.
Comment 6 Bakhtiar Hasmanan 2011-03-06 00:58:41 PST
Setting alias override in fonts.conf like this solve arabic and some indics:
<alias>
<family>sans-serif</family>
<prefer>
<family>Tahoma</family>
</prefer>
</alias>

remaining failed fonts are:
Kannada
Gujarati
Telugu
Bengali
Sinhala
Myanmar
Laos
probably more

those still failed even when Windows XP has the fonts (showing numbered matrices rectangle).

Any idea is this fontconfig or webkitgtk issue?
Comment 7 Bakhtiar Hasmanan 2011-03-20 20:56:56 PDT
apparently the mismatch is because pango's builtin_aliases in pango-utils.c use obsolete unicode fontlist. Here is my pango.aliases to display all supported indic languages (with freetype as backend):

tahoma = "arabic typesetting,arabic transparent,tahoma,lucida sans unicode,browallia new,dokchampa,daunpenh,mingliu,simhei,gulimche,ms gothic,mongolian baiti,microsoft phagspa,microsoft tai le,kalinga,iskoola pota,vrinda,raavi,mv boli,gautami,tunga,shruti,kartika,latha,mangal,nyala,plantagenet cherokee"

tohoma here refer to tahoma override in fonts.conf file previously

new in XP SP3: 
indic: vrinda,raavi,mv boli,gautami,tunga,shruti

new in Win7/Vista
indic: iskoola pota (sinhala) and kalinga (oriya)
america: plantagenet cherokee
ethiopian : nyala
SE asia: dokchampa (Laos), daunpenh (Cambodia)
arabic: arabic typesetting
central asia: mongolian baiti,microsoft phagspa,microsoft tai le

my question now: which used by webkitgtk actually? pango, fontconfig or both?
also if I add additional font search path (for other missing unicode fonts) in fonts.conf, pango didn't respect this like they were work independently and clashed each other.

To prove this: I add other search path (which contain only sinhala font) in fonts.conf and remove WINDOWSFONTDIR. I can see wikipedia page still display arabic which prove pango used here. However if I remove all search path webkitgtk refuse to run.
Comment 8 Bakhtiar Hasmanan 2011-03-20 21:02:53 PDT
Created attachment 86292 [details]
freetype backend with tahoma override in fonts.conf and updated pango.aliases
Comment 9 Bakhtiar Hasmanan 2011-05-30 19:09:56 PDT
It's the obsolete pango.aliases issue