Skip to content

Commit 6f4e057

Browse files
feat: Font.Glyph.get_Outline ( Fixes #20 )
1 parent a392f6e commit 6f4e057

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Types/Font.Glyph/get_Outline.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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])"
5+
@("<svg xmlns='http://www.w3.org/2000/svg' viewBox='$viewbox' width='100%' height='100%' transform='scale(1 -1)'>"
6+
7+
"<path stroke='currentColor' d='$($this.PathData)' />"
8+
@"
9+
<circle r="5" fill="red">
10+
<animateMotion
11+
dur="10s"
12+
repeatCount="indefinite"
13+
path="$($pathData)" />
14+
</circle>
15+
"@
16+
"</svg>") -as [xml]

0 commit comments

Comments
 (0)