Skip to content

Commit 960a669

Browse files
StartAutomatingStartAutomating
authored andcommitted
fix: Font.Glyph.get_Motion/Outline ( Fixes #20, Fixes #21 )
Using bounding box
1 parent 951493d commit 960a669

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Font.types.ps1xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
<GetScriptBlock>
2828
$fontFace = $this.ParentNode.'font-face'
2929
$descent = $fontFace.descent -as [double]
30-
$bbox = $fontFace.bbox -split '\s' -as [double[]]
31-
$viewbox = "0 $($bbox[-3] - $descent) $($bbox[-2]) $($bbox[-1])"
30+
$viewbox = $fontFace.bbox -split '\s' -as [double[]]
3231
$PathData = $this.PathData
3332
@(
3433
"&lt;svg xmlns='http://www.w3.org/2000/svg' viewBox='$viewbox' width='100%' height='100%' transform='scale(1 -1)'&gt;"
@@ -52,8 +51,7 @@ $PathData = $this.PathData
5251
<GetScriptBlock>
5352
$fontFace = $this.ParentNode.'font-face'
5453
$descent = $fontFace.descent -as [double]
55-
$bbox = $fontFace.bbox -split '\s' -as [double[]]
56-
$viewbox = "0 $($bbox[-3] - $descent) $($bbox[-2]) $($bbox[-1])"
54+
$viewbox = $fontFace.bbox -split '\s' -as [double[]]
5755
@("&lt;svg xmlns='http://www.w3.org/2000/svg' viewBox='$viewbox' width='100%' height='100%' transform='scale(1 -1)'&gt;"
5856

5957
"&lt;path stroke='currentColor' fill='transparent' d='$($this.PathData)' /&gt;"

0 commit comments

Comments
 (0)