Skip to content

Commit 30bf114

Browse files
StartAutomatingStartAutomating
authored andcommitted
fix: Font.Glyph.get_SVG ( Fixes #18 )
Using bounding box
1 parent c6238f8 commit 30bf114

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Font.types.ps1xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ $this.d
8080
$fontFace = $this.ParentNode.'font-face'
8181
$descent = $fontFace.descent -as [double]
8282
$bbox = $fontFace.bbox -split '\s' -as [double[]]
83-
$viewbox = "0 $($bbox[-3] - $descent) $($bbox[-2]) $($bbox[-1])"
83+
$viewbox = $bbox
8484
@(
8585
"<svg xmlns='http://www.w3.org/2000/svg' viewBox='$viewbox' width='100%' height='100%' transform='scale(1 -1)'>"
86-
"<path fill='currentColor' d='$($this.PathData)' />"
86+
"<path fill='currentColor' d='$($this.PathData)' />"
8787
"</svg>"
8888
) -as [xml]
8989
</GetScriptBlock>

0 commit comments

Comments
 (0)