Some more CSS features and font fixes

154 views
Skip to first unread message

Jan

unread,
Dec 14, 2012, 7:51:33 PM12/14/12
to flying-s...@googlegroups.com
Hi everyone,

It would be great if my pull-request would get merged here: https://github.com/flyingsaucerproject/flyingsaucer/pull/22

I added a fix regarding font-weight and font-style rules when using custom fonts.
I added support for the CSS property opacity
I added the CSS parser functionality for a possible border-radius implementation

I tested the opacity stuff and it seems to work pretty well now.
All other changes don't break anything. I'm using my fork in an application already without troubles.


I am happy to further improve this.
Please someone take a look and merge...or tell me what needs to be done for this to get merged.

Thanks,
Sincerely 

Jan

Peter Brant

unread,
Dec 15, 2012, 10:29:02 AM12/15/12
to flying-s...@googlegroups.com
Hi Jan,

Parser changes aren't generally merged until the functionality implied is implemented (i.e. it's better the user gets an error [if they have logging turned on] in the log vs. thinking they're doing something wrong).

The opacity changes are definitely a good first effort, but they're not quite what they need to be to be applied.  Specifically according to the spec, an opacity value of less than one means that the element creates a new stacking context (see http://www.w3.org/TR/css3-color/#transparency ).  At the PDF level, the graphics state isn't being saved and restored properly. If they're layed out and drawn as a new stacking context, you'll get most of this for free.  The nested opacity calculation becomes unnecessary in this case too. 

I'll take a look at the font related commits.

Pete

Jan

unread,
Dec 18, 2012, 10:38:34 AM12/18/12
to flying-s...@googlegroups.com
Thanks for your reply.
I see...i will try to improve this stuff, so it can be merged some day.

The parser changes around border-radius...would there be a way to have these changes available, but make the parser ignore them for now?
That way the user won't think they're doing something wrong...and we at least have the parsing available and it can be easily turned on once somebody gets serious about implementing the consequences? 

I probably should start splitting my pull request.
Because i think the font stuff, as well as the word-wrap stuff is a nice addition.

Jan
Reply all
Reply to author
Forward
0 new messages