Text shadow ignores spread_radius in WebRender GitHub example code
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
People
(Reporter: felix.schuett, Unassigned)
References
(Blocks 2 open bugs)
Details
Steps to reproduce:
Right now I am trying to implement simple text-shadow rendering for Azul (https://azulrs/). I have problems with rendering the spread_radius correctly, because the display_list::Shadow item does not have any field for it.
if let Some(azul_css::StyleBoxShadow { offset, color, blur_radius, spread_radius, clip_mode }) = text_shadow.as_ref() {
use webrender::api::{
FilterOp as WrFilterOp,
RasterSpace as WrRasterSpace,
StackingContextFlags as WrStackingContextFlags,
Shadow as WrShadow,
};
builder.push_stacking_context(
WrLayoutPoint::zero(),
normal_info.spatial_id,
WrPrimitiveFlags::empty(),
None,
WrTransformStyle::Flat,
WrMixBlendMode::Normal,
&[WrFilterOp::DropShadow(WrShadow {
offset: WrLayoutVector2D::new(offset[0].to_pixels(), offset[1].to_pixels()),
color: wr_translate_color_f(color.clone().into()),
blur_radius: blur_radius.to_pixels(),
})],
&[],
&[],
WrRasterSpace::Screen,
WrStackingContextFlags::empty(),
);
}
text::push_text(builder, &text_info, glyphs, *font_instance_key, *color, *glyph_options);
if text_shadow.is_some() {
builder.pop_stacking_context();
}
How am I supposed to implement the spread_radius
of the text-shadow property? The "box shadow" has this property, however, that just renders a box, not an outline around the text.
Actual results:
Text shadow shows, but I can't set the spread radius.
Expected results:
The official WebRender repo has no documentation or hints on how to set the spread for a text shadow.
Comment 1•8 months ago
|
||
Hi Felix
Is there a reduced standalone testcase you can attach to this bug?
Updated•6 months ago
|
Comment 2•2 months ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:gw, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 months ago
|
Description
•