We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Font.Glyph.get_SVG
1 parent 5b2a5e4 commit c6238f8Copy full SHA for c6238f8
Types/Font.Glyph/get_SVG.ps1
@@ -1,9 +1,9 @@
1
$fontFace = $this.ParentNode.'font-face'
2
$descent = $fontFace.descent -as [double]
3
$bbox = $fontFace.bbox -split '\s' -as [double[]]
4
-$viewbox = "0 $($bbox[-3] - $descent) $($bbox[-2]) $($bbox[-1])"
+$viewbox = $bbox
5
@(
6
"<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)' />"
+ "<path fill='currentColor' d='$($this.PathData)' />"
8
"</svg>"
9
) -as [xml]
0 commit comments