fabricjs / fabric.js

Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
http://fabricjs.com
Other
28.75k stars 3.49k forks source link

fabric.iIext or fabric.Text shadow,Can you support this operation,Multi-layer shadow #5986

Open gaowenzhen opened 4 years ago

gaowenzhen commented 4 years ago

my css text-shadow:red 2px 2px 1px, blue -2px -2px 1px;

fabric.js

` let text = new fabric.Text('Multi-layer shadow ', { left: 50, top: 150, fill: 'red', strokeWidth: 2, stroke: 'black', shadow: '#000000 2px 2px 1px, #000000 -2px -2px 1px' })

`

I want to implement more than one border effect, or other simple way to achieve 2 borders

asturur commented 4 years ago

there is no easy way to implement multi borders as today. you can either make a group with 2 layered text, but you loose editing abilities.

asturur commented 4 years ago

a multi fill, multi stroke is a possible feature, but is a big change, both in syntax and code and support and i m not sure when and if we are tackling it.

gaowenzhen commented 4 years ago

Thanks answer,I saw that in your help document, there is a prompt like this, saying that it is a static method, but it has no effect after I set it.

shadow: '#000000 2px 2px 1px, #000000 -2px -2px 1px