Opened 8 years ago

Closed 2 years ago

#13361 closed bug (fixed)

Webkit: @font-face not working

Reported by: dsjonny Owned by: pulkomandy
Priority: normal Milestone: R1/beta5
Component: Kits/Web Kit Version: R1/Development
Keywords: Cc:
Blocked By: #16101 Blocking: #16287, #16326, #16717, #17967
Platform: All

Description

Hi!

I have tried some nightlies until hrev50967 and I found that the CSS @font-face support is not working.

For example please check this site: https://www.w3schools.com/howto/howto_google_fonts.asp

Change History (13)

comment:1 by pulkomandy, 8 years ago

To be precise, what doesn't work is downloading a font and using it. If you have the font installed in Haiku, then it will work. This is a limitation of the BeAPI: BFont does not allow to load a font from a file, only query already installed fonts. We should fix that on app_server side before WebKit can make use of the feature. For now, as a workaround, it is suggested to install the fonts manually to Haiku so you can see them on websites.

comment:2 by dsjonny, 8 years ago

There was a same ticket before, and it was fixed: #8950

comment:3 by achmafooma, 7 years ago

It's definitely not working...the site in the ticket description illustrates the problem nicely. I am running into the same problem on my website, which uses Bootstrap and the included Glyphicons font set. Items using the Glyphicons font do not display properly.

Not sure if we should reopen #8950 or move forward on this ticket, but this should probably be fixed since the use of webfonts is pretty widespread now.

comment:4 by pulkomandy, 7 years ago

That ticket was closed without reason, but let's use this new one. As stated, this need app_server changes, right now it is not possible to load fonts into app_server except by installing them in the appropriate directories. As a workaround we could package some often used fonts with haiku (for the beta, but not for the nightlies, I'd say)

comment:5 by waddlesplash, 5 years ago

Blocked By: 16101 added

comment:6 by diver, 5 years ago

Blocking: 16287 added

comment:7 by diver, 4 years ago

Blocking: 16326 added

comment:8 by pulkomandy, 4 years ago

Blocking: 16717 added

comment:9 by nephele, 4 years ago

Wekkit part of the code is in Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp

std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer& buffer, const String&)
{
    // FIXME: We need support in Haiku to read fonts from memory to implement this.
    return 0;
}

comment:10 by nephele, 4 years ago

Component: Applications/WebPositiveKits/Web Kit
Summary: WebPositive: @fonta-face not workingWebkit: @font-face not working

comment:11 by madmax, 2 years ago

Blocking: 17967 added

comment:12 by pulkomandy, 2 years ago

Status: newin-progress

comment:13 by pulkomandy, 2 years ago

Milestone: UnscheduledR1/beta5
Resolution: fixed
Status: in-progressclosed

Implemented in b6799d35f842d7bc5c1c1921177778dd3a2a0aff.

Note: See TracTickets for help on using tickets.