remove width/height from svg output

This commit is contained in:
Rhiannon Morris 2024-11-28 17:38:00 +01:00
parent 89270a82fb
commit a2fc6c9f28
4 changed files with 13 additions and 8 deletions

View file

@ -104,9 +104,8 @@ doGlyphsNoDoctype gs e = wrap $ run act e where
Fill_ <<- "none"]
g_ gattrs . mconcat <$> traverse placeWord gs <* newline
wrap (content, T {width, height}) =
let w = toPx width; h = toPx height
viewBox = Text.unwords ["0", "0", toNoDim width, toNoDim height] in
svg11_ content `with` [Width_ <<- w, Height_ <<- h, ViewBox_ <<- viewBox]
let viewBox = Text.unwords ["0", "0", toNoDim width, toNoDim height] in
svg11_ content `with` [ViewBox_ <<- viewBox]
doGlyphs :: [Word] -> Env -> Element
doGlyphs gs e = doctype <> doGlyphsNoDoctype gs e