WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
98251
[EFL][WK2] Setting the standard font familiy to "sans"
https://bugs.webkit.org/show_bug.cgi?id=98251
Summary
[EFL][WK2] Setting the standard font familiy to "sans"
Zoltan Nyul
Reported
2012-10-03 03:17:19 PDT
Setting the standard font family to "sans" like it's done in wk1 efl makes some translate-transformation test pass because the transformation relies on the font's xHeight.
Attachments
Work in progress patch
(798 bytes, patch)
2012-10-03 03:26 PDT
,
Zoltan Nyul
no flags
Details
Formatted Diff
Diff
Patch
(2.10 KB, patch)
2012-10-04 01:17 PDT
,
Zoltan Nyul
no flags
Details
Formatted Diff
Diff
Work in progress
(1.41 KB, patch)
2012-10-04 05:54 PDT
,
Zoltan Nyul
no flags
Details
Formatted Diff
Diff
patch
(2.17 KB, patch)
2012-10-05 01:02 PDT
,
Zoltan Nyul
no flags
Details
Formatted Diff
Diff
patch
(18.51 KB, patch)
2012-10-15 00:40 PDT
,
Zoltan Nyul
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Zoltan Nyul
Comment 1
2012-10-03 03:26:39 PDT
Created
attachment 166845
[details]
Work in progress patch
Chris Dumez
Comment 2
2012-10-03 03:37:39 PDT
Comment on
attachment 166845
[details]
Work in progress patch View in context:
https://bugs.webkit.org/attachment.cgi?id=166845&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:787 > + WKPreferencesSetStandardFontFamily(pref, wkFontSans.get());
Could we maybe move this to the Ewk_Settings constructor?
Chris Dumez
Comment 3
2012-10-03 03:38:56 PDT
Comment on
attachment 166845
[details]
Work in progress patch View in context:
https://bugs.webkit.org/attachment.cgi?id=166845&action=review
>> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:787 >> + WKPreferencesSetStandardFontFamily(pref, wkFontSans.get()); > > Could we maybe move this to the Ewk_Settings constructor?
WebKit1 also sets SansSerifFontFamily to "sans", why not add it in WK2 as well?
Zoltan Nyul
Comment 4
2012-10-03 06:24:51 PDT
(In reply to
comment #3
)
> (From update of
attachment 166845
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=166845&action=review
> > >> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:787 > >> + WKPreferencesSetStandardFontFamily(pref, wkFontSans.get()); > > > > Could we maybe move this to the Ewk_Settings constructor? > > WebKit1 also sets SansSerifFontFamily to "sans", why not add it in WK2 as well?
Indeed, i added the Serif and Fixed font settings too as in the WebKit1.
Zoltan Nyul
Comment 5
2012-10-04 01:17:12 PDT
Created
attachment 167046
[details]
Patch It's in the Ewk_Settings's constructor now.
Chris Dumez
Comment 6
2012-10-04 01:23:33 PDT
Comment on
attachment 167046
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=167046&action=review
LGTM with a few nits.
> Source/WebKit2/ChangeLog:8 > + Setting the standard font family to "sans" like it's done in wk1 efl
"Setting the" <- extra space. "WK1 EFL"
Chris Dumez
Comment 7
2012-10-04 01:34:31 PDT
Hmm. It seems other ports are initializing this in Source/WebKit2/Shared/WebPreferencesStore.h
Zoltan Nyul
Comment 8
2012-10-04 05:54:36 PDT
Created
attachment 167089
[details]
Work in progress
Chris Dumez
Comment 9
2012-10-04 06:53:23 PDT
Comment on
attachment 167089
[details]
Work in progress Why WIP? Please add changelog.
Zoltan Nyul
Comment 10
2012-10-05 01:02:12 PDT
Created
attachment 167274
[details]
patch
Jussi Kukkonen (jku)
Comment 11
2012-10-05 07:21:43 PDT
Comment on
attachment 167274
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=167274&action=review
> Source/WebKit2/ChangeLog:10 > + transformation relies on the font's xHeight.
If this change alone makes tests pass, you should remove them from TestExpectations. If not, the comment here could probably be reworded.
Kenneth Rohde Christiansen
Comment 12
2012-10-05 09:05:25 PDT
Comment on
attachment 167274
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=167274&action=review
> Source/WebKit2/ChangeLog:3 > + [EFL][WK2] Setting the standard font familiy to "sans"
Spelling issue. Anyway this is weird, default fonts are supposed to be non-sans, ie something like times.
> Source/WebKit2/Shared/WebPreferencesStore.h:214 > +#elif PLATFORM(EFL) > + > +#define FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \ > + macro(StandardFontFamily, standardFontFamily, String, String, "Sans") \ > + macro(CursiveFontFamily, cursiveFontFamily, String, String, "Comic Sans MS") \ > + macro(FantasyFontFamily, fantasyFontFamily, String, String, "Impact") \ > + macro(FixedFontFamily, fixedFontFamily, String, String, "Courier New") \ > + macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica") \ > + macro(SerifFontFamily, serifFontFamily, String, String, "Times") \ > + macro(PictographFontFamily, pictographFontFamily, String, String, "Times") \ > + \ > + > + > #endif
I dont really think it is nice deverging from other ports, especially this way
Zoltan Nyul
Comment 13
2012-10-15 00:40:06 PDT
Created
attachment 168640
[details]
patch I've made some api for the font settings in Ewk_Settings and moved the setting into MiniBrowser.
Kenneth Rohde Christiansen
Comment 14
2012-10-15 02:12:18 PDT
Comment on
attachment 168640
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168640&action=review
> Tools/ChangeLog:9 > + > + Set the standard font to "sans" in the MiniBrowser. > +
Missing reasoning!
Gyuyoung Kim
Comment 15
2012-10-15 03:38:51 PDT
Comment on
attachment 168640
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168640&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:158 > + WKRetainPtr<WKStringRef> wkFont = adoptWK(WKStringCreateWithUTF8CString(font));
It seems WK2 EFL port prefers to use below style for this. WKRetainPtr<WKStringRef> wkFont(AdoptWK, WKStringCreateWithUTF8CString(font));
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:234 > +EAPI Eina_Bool ewk_settings_standard_font_family_set(Ewk_Settings* settings, const char* font);
Wrong '*' place.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:257 > +EAPI Eina_Bool ewk_settings_fixed_font_family_set(Ewk_Settings* settings, const char* font);
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:280 > +EAPI Eina_Bool ewk_settings_serif_font_family_set(Ewk_Settings* settings, const char* font);
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:297 > + * @param font Font family to set.
Font -> font ?
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:303 > +EAPI Eina_Bool ewk_settings_sans_serif_font_family_set(Ewk_Settings* settings, const char* font);
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:326 > +EAPI Eina_Bool ewk_settings_cursive_font_family_set(Ewk_Settings* settings, const char* font);
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:343 > + * @param font Font family to set.
We don't use . @param.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:349 > +EAPI Eina_Bool ewk_settings_fantasy_font_family_set(Ewk_Settings* settings, const char* font);
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:358 > +EAPI const char* ewk_settings_fantasy_font_family_get(const Ewk_Settings *settings);
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:366 > + * @param font Font family to set.
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:372 > +EAPI Eina_Bool ewk_settings_pictograph_font_family_set(Ewk_Settings* settings, const char* font);
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:381 > +EAPI const char* ewk_settings_pictograph_font_family_get(const Ewk_Settings *settings);
ditto.
Zoltan Nyul
Comment 16
2012-10-19 00:25:11 PDT
I was wrong, it turned out that this issue was caused by cairo, the cairo_scaled_font_text_extents calucated wrong height for some fonts like Times, but it was ok with sans and some others. The cairo update has solved it.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug