Bug 86369 - [EFL] Try to use FontPango.cpp for international characters.
Summary: [EFL] Try to use FontPango.cpp for international characters.
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryuan Choi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-14 07:13 PDT by Ryuan Choi
Modified: 2012-08-03 00:03 PDT (History)
8 users (show)

See Also:


Attachments
first_suggestion (4.27 KB, patch)
2012-05-14 07:40 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff
first suggestion(updated) (3.72 KB, patch)
2012-05-31 00:50 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryuan Choi 2012-05-14 07:13:59 PDT
WebKit/Efl use freetype for default font backend like Gtk+.

But, FontPango.cpp can be used for international characters.
Comment 1 Ryuan Choi 2012-05-14 07:40:06 PDT
Created attachment 141725 [details]
first_suggestion
Comment 2 Raphael Kubo da Costa (:rakuco) 2012-05-14 10:25:36 PDT
Comment on attachment 141725 [details]
first_suggestion

View in context: https://bugs.webkit.org/attachment.cgi?id=141725&action=review

Mixing different backends that way looks weird, are you sure that's going to work. I also see some checks for freetype in FontPango.cpp itself -- does it make sense to switch to always using pango and simply enable or disable freetype support?

> Source/WebCore/ChangeLog:8
> +        Although freetype backend is choosed, FontPango.cpp can be used for

Nit: s/choosed/chosen. The description also sounds like the freetype backend is always chosen. I'd rephrase it to something like "Use FontPango.cpp even if the freetype backend is chosen, so that international characters can be rendered correctly".

> Source/cmake/OptionsEfl.cmake:107
> -  FIND_PACKAGE(Pango REQUIRED)
> -  SET(WTF_USE_PANGO 1)
> -  ADD_DEFINITIONS(-DWTF_USE_PANGO=1)
> +    FIND_PACKAGE(Pango REQUIRED)
> +    SET(WTF_USE_PANGO 1)
> +    ADD_DEFINITIONS(-DWTF_USE_PANGO=1)

Even though the current indentation is wrong, I don't think you should change it in this patch -- it just makes navigating through history slightly more difficult.
Comment 3 Raphael Kubo da Costa (:rakuco) 2012-05-14 10:27:58 PDT
CC'ing some of the GTK folks who might know better about whether it makes sense to mix freetype and pango.
Comment 4 Martin Robinson 2012-05-14 10:33:47 PDT
I don't think you want to default to the Pango backend even if it is present on the system. The Pango backend is missing a lot of features and once we get HarfBuzz support I'd like to just delete it.
Comment 5 Ryuan Choi 2012-05-14 18:56:54 PDT
(In reply to comment #2)
> (From update of attachment 141725 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=141725&action=review
> 
> Mixing different backends that way looks weird, are you sure that's going to work. I also see some checks for freetype in FontPango.cpp itself -- does it make sense to switch to always using pango and simply enable or disable freetype support?

Now, pango backend is poor to use and freetype can not render complex font.
So IIRC, WebKit/Gtk+ use freetype and FontPango.cpp.

But I agree that it looks something weird.
I think that we can always use freetype backend with FontPango.cpp, instead.

> 
> > Source/WebCore/ChangeLog:8
> > +        Although freetype backend is choosed, FontPango.cpp can be used for
> 
> Nit: s/choosed/chosen. The description also sounds like the freetype backend is always chosen. I'd rephrase it to something like "Use FontPango.cpp even if the freetype backend is chosen, so that international characters can be rendered correctly".

Thank you. I'll do that.

> 
> > Source/cmake/OptionsEfl.cmake:107
> > -  FIND_PACKAGE(Pango REQUIRED)
> > -  SET(WTF_USE_PANGO 1)
> > -  ADD_DEFINITIONS(-DWTF_USE_PANGO=1)
> > +    FIND_PACKAGE(Pango REQUIRED)
> > +    SET(WTF_USE_PANGO 1)
> > +    ADD_DEFINITIONS(-DWTF_USE_PANGO=1)
> 
> Even though the current indentation is wrong, I don't think you should change it in this patch -- it just makes navigating through history slightly more difficult.

OK, I'll let indentation like before.

(In reply to comment #4)
> I don't think you want to default to the Pango backend even if it is present on the system. The Pango backend is missing a lot of features and once we get HarfBuzz support I'd like to just delete it.

Yes, I was waiting harfbuzz.
But now, FontPango.cpp is usefull to solve complex font issues on WebKit/Efl until we can use harfbuzz.

I'll prepare second approach that removes pango backend of WebKit/Efl and uses FontPango.cpp if pango is available.

Thank you.
Comment 6 Dominik Röttsches (drott) 2012-05-15 00:11:08 PDT
(In reply to comment #4)
> I don't think you want to default to the Pango backend even if it is present on the system. The Pango backend is missing a lot of features and once we get HarfBuzz support I'd like to just delete it.

Is HarfBuzz support tracked in another bug? What's the status there - could we help with completing the implementation?
Comment 7 Ryuan Choi 2012-05-31 00:50:21 PDT
Created attachment 145008 [details]
first suggestion(updated)
Comment 8 Ryuan Choi 2012-05-31 00:53:03 PDT
(In reply to comment #7)
> Created an attachment (id=145008) [details]
> first suggestion(updated)

Updated rakuco's comment.

At least, tizen use this approach and it makes fast/text/international and some test cases unskipped.
Comment 9 Martin Robinson 2012-05-31 05:57:18 PDT
So, if Tizen is using Pango as the backend, I guess that means that web fonts are broken or is that fixed there as well?
Comment 10 Ryuan Choi 2012-05-31 16:41:33 PDT
(In reply to comment #9)
> So, if Tizen is using Pango as the backend, I guess that means that web fonts are broken or is that fixed there as well?

I did not receive any reports about it for a long time.

I will check and let you know.
Comment 11 Ryuan Choi 2012-08-03 00:03:53 PDT
After r123864, efl port uses harfbuzz so that it is not needed anymore.