Opened 7 years ago

Closed 5 years ago

#8950 closed enhancement (fixed)

CSS3 custom font support (@font-face)

Reported by: dsjonny Owned by: leavengood
Priority: high Milestone: R1
Component: Applications/WebPositive Version: R1/Development
Keywords: custom font css css3 @font-face Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

WebPositive currently cannot use custom font defined in CSS. Now these fonts are replaced by an installed font. If I have install the custom .ttf font used by my site, than the WebPositive can use it, and displays the site perfect. Please implement this future.

Thank you!

Current status (if the custom fonts are not installed):

After fonts installed:

Attachments (3)

current.png (22.5 KB ) - added by dsjonny 7 years ago.
installed.png (32.0 KB ) - added by dsjonny 7 years ago.
wp.1.2.png (40.1 KB ) - added by dsjonny 6 years ago.

Download all attachments as: .zip

Change History (13)

by dsjonny, 7 years ago

Attachment: current.png added

by dsjonny, 7 years ago

Attachment: installed.png added

comment:1 by mmadia, 7 years ago

Version: R1/alpha4R1/Development

comment:2 by aldeck, 7 years ago

Keywords: custom font css css3 @font-face added
Priority: normalhigh
Summary: User defined css font supportCSS3 custom font support (@font-face)

Thanks for the report, it's a known missing feature. Functionality in Haiku is missing so that WebPositive supports this feature. The app server needs to be able to load a font from memory (in this case, streamed from the net) instead of the file system.

Moving priority to high, since a lot of sites rely on this feature these days.

comment:3 by axeld, 7 years ago

That sounds like another good reason to support client side rendering.

comment:4 by leavengood, 7 years ago

I'm very interested in getting this working right. I don't know if I would go about fixing it by adding client-side rendering support, but I think adding support for loading fonts into app_server from memory should be doable (though potentially dangerous as it could crash app_server if invalid fonts were provided, in which case maybe the client-side rendering support is better.)

Either way I won't be able to work on this until after the alpha4 release. If someone else is motivated in the meantime, go for it ;)

comment:5 by axeld, 7 years ago

The security aspect was what I was getting at. However, the font parser should really be robust enough to deal with anything anyway.

comment:6 by waddlesplash, 6 years ago

Somehow, BePDF does this for built in PDF fonts. That is, FreeType does it. Perhaps you should just integrate FreeType?

comment:7 by dsjonny, 6 years ago

Status: WebPositive/1.2 @font-face are working, but there is some problem with hungarian characters.

by dsjonny, 6 years ago

Attachment: wp.1.2.png added

comment:8 by waddlesplash, 5 years ago

Still an issue?

comment:9 by dsjonny, 5 years ago

The problem solved. Check out the demo page: http://www.d-rendszer.hu/demo.php The ticket can be closed.

comment:10 by waddlesplash, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.