Skip to content

Commit c6238f8

Browse files
fix: Font.Glyph.get_SVG ( Fixes #18 )
Using bounding box
1 parent 5b2a5e4 commit c6238f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Types/Font.Glyph/get_SVG.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
$fontFace = $this.ParentNode.'font-face'
22
$descent = $fontFace.descent -as [double]
33
$bbox = $fontFace.bbox -split '\s' -as [double[]]
4-
$viewbox = "0 $($bbox[-3] - $descent) $($bbox[-2]) $($bbox[-1])"
4+
$viewbox = $bbox
55
@(
66
"<svg xmlns='http://www.w3.org/2000/svg' viewBox='$viewbox' width='100%' height='100%' transform='scale(1 -1)'>"
7-
"<path fill='currentColor' d='$($this.PathData)' />"
7+
"<path fill='currentColor' d='$($this.PathData)' />"
88
"</svg>"
99
) -as [xml]

0 commit comments

Comments
 (0)