diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-07 19:02:56 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-07 19:02:56 +0100 |
commit | 31162225df672187e4b73423ac2f4bc25937fd3f (patch) | |
tree | 7c52d54677897b4eaa258592bfa96d3b7b303505 /src/render | |
parent | eb61a176754a565a5c53562993897388fa2d260c (diff) | |
download | chawan-31162225df672187e4b73423ac2f4bc25937fd3f.tar.gz |
Add multiple text-decoration, overline emulation
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/renderdocument.nim | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim index 0315f6b7..2a938acc 100644 --- a/src/render/renderdocument.nim +++ b/src/render/renderdocument.nim @@ -19,14 +19,13 @@ func formatFromWord(computed: ComputedFormat): Format = result.italic = true if computed.fontweight > 500: result.bold = true - case computed.textdecoration - of TEXT_DECORATION_UNDERLINE: + if TEXT_DECORATION_UNDERLINE in computed.textdecoration: result.underline = true - of TEXT_DECORATION_OVERLINE: + if TEXT_DECORATION_OVERLINE in computed.textdecoration: result.overline = true - of TEXT_DECORATION_LINE_THROUGH: + if TEXT_DECORATION_LINE_THROUGH in computed.textdecoration: result.strike = true - of TEXT_DECORATION_BLINK: + if TEXT_DECORATION_BLINK in computed.textdecoration: result.blink = true else: discard |