WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
16089
[GTK] Support custom fonts, CachedFont::platformDataFromCustomData()
https://bugs.webkit.org/show_bug.cgi?id=16089
Summary
[GTK] Support custom fonts, CachedFont::platformDataFromCustomData()
Alp Toker
Reported
2007-11-21 19:51:08 PST
CachedFont.cpp currently supports custom fonts for the CG and QT ports. We need to add support for this too.
Attachments
Add support for downloadable fonts
(12.56 KB, patch)
2008-01-10 10:36 PST
,
Alp Toker
hyatt
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alp Toker
Comment 1
2008-01-04 03:11:12 PST
This is easy enough to do with FreeType but I heard Pango doesn't provide appropriate API.
Alp Toker
Comment 2
2008-01-07 16:49:10 PST
The relevant commit adding support to WebCore:
http://trac.webkit.org/projects/webkit/changeset/26484
Some code I wrote about a year ago in another project to load TTFs straight from memory with FreeType:
http://git.ndesk.org/?p=ndesk-xps;a=blob;f=src/FreeType.cs;h=f84f067c466843521b9548aa58496e2fa7ac12e6;hb=HEAD
Alp Toker
Comment 3
2008-01-10 10:36:30 PST
Created
attachment 18367
[details]
Add support for downloadable fonts
Sylvain Pasche
Comment 4
2008-01-10 11:54:24 PST
>+ // We force antialiasing and disable hinting to provide consistent >+ // typographic qualities for custom fonts on all platforms. >+ cairo_font_options_set_hint_style(options, CAIRO_HINT_STYLE_NONE); >+ cairo_font_options_set_antialias(options, CAIRO_ANTIALIAS_GRAY);
Is this what other ports do for antialiasing? I'm wondering if with a lcd screen and subpixel aliasing active, having gray antialiased webfonts side by side with subpixel antialiased ones may look odd.
Alp Toker
Comment 5
2008-01-10 14:38:44 PST
(In reply to
comment #4
)
> >+ // We force antialiasing and disable hinting to provide consistent > >+ // typographic qualities for custom fonts on all platforms. > >+ cairo_font_options_set_hint_style(options, CAIRO_HINT_STYLE_NONE); > >+ cairo_font_options_set_antialias(options, CAIRO_ANTIALIAS_GRAY); > > Is this what other ports do for antialiasing? > I'm wondering if with a lcd screen and subpixel aliasing active, having gray > antialiased webfonts side by side with subpixel antialiased ones may look odd. >
I can't see any easy way to do this with the current font code. It's a good point though and is related to
bug #16715
, so we can add a TODO here.
Dave Hyatt
Comment 6
2008-01-11 12:14:19 PST
Comment on
attachment 18367
[details]
Add support for downloadable fonts This looks good to me. Can we just remove those ifdefs now that Mac, Win, CG and GTK all support custom fonts? I think we can...
Alp Toker
Comment 7
2008-01-11 14:00:36 PST
(In reply to
comment #6
)
> (From update of
attachment 18367
[details]
[edit]) > This looks good to me. Can we just remove those ifdefs now that Mac, Win, CG > and GTK all support custom fonts? I think we can... >
There's still WX I think. Might be an idea to make the feature opt-out though. Best done separately. Patch landed in
r29418
(with a leak-fix spotted by bdash).
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