GiovineItalia / Compose.jl

Declarative vector graphics
http://giovineitalia.github.io/Compose.jl/latest/
Other
248 stars 83 forks source link

how to use SVG attributes? #425

Open tbenst opened 2 years ago

tbenst commented 2 years ago

I would like to underline some text. From Text documentation, this would seem possible:

More general formatting for the SVG backend is documented here

which in turn describes the text-decoration="underline" property. However, I'm not sure how to do this syntactically.

pseudo-code:

fig = compose(context(), Compose.text(0,font_size,"example text"),
            Compose.fill("black"), fontsize(18pt), textdecoration("underline"))
fig |> SVG(joinpath(@__DIR__, "text_example.svg"))

Is this possible? Happy to help update Compose.jl documentation if so! Thank you