Skip to content

Commit 951493d

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

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Types/Font.Glyph/get_Motion.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
$fontFace = $this.ParentNode.'font-face'
22
$descent = $fontFace.descent -as [double]
3-
$bbox = $fontFace.bbox -split '\s' -as [double[]]
4-
$viewbox = "0 $($bbox[-3] - $descent) $($bbox[-2]) $($bbox[-1])"
3+
$viewbox = $fontFace.bbox -split '\s' -as [double[]]
54
$PathData = $this.PathData
65
@(
76
"<svg xmlns='http://www.w3.org/2000/svg' viewBox='$viewbox' width='100%' height='100%' transform='scale(1 -1)'>"

Types/Font.Glyph/get_Outline.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
$fontFace = $this.ParentNode.'font-face'
22
$descent = $fontFace.descent -as [double]
3-
$bbox = $fontFace.bbox -split '\s' -as [double[]]
4-
$viewbox = "0 $($bbox[-3] - $descent) $($bbox[-2]) $($bbox[-1])"
3+
$viewbox = $fontFace.bbox -split '\s' -as [double[]]
54
@("<svg xmlns='http://www.w3.org/2000/svg' viewBox='$viewbox' width='100%' height='100%' transform='scale(1 -1)'>"
65

76
"<path stroke='currentColor' fill='transparent' d='$($this.PathData)' />"

0 commit comments

Comments
 (0)