File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 </ScriptProperty >
2020 </Members >
2121 </Type >
22+ <Type >
23+ <Name >Font.Glyph</Name >
24+ <Members >
25+ <ScriptProperty >
26+ <Name >PathData</Name >
27+ <GetScriptBlock >
28+ < #
29+ .SYNOPSIS
30+ Gets the glyph path data
31+ .DESCRIPTION
32+ Gets the glyph path data.
33+
34+ Glyph paths are drawn upside down by default.
35+ #>
36+ $this.d
37+ </GetScriptBlock >
38+ </ScriptProperty >
39+ </Members >
40+ </Type >
2241 <Type >
2342 <Name >Font.svg</Name >
2443 <Members >
4160[PSObject]$value
4261)
4362
63+ filter toGlyph {
64+ $_.Node.pstypenames.add('Font.glyph')
65+ $_.Node
66+ }
4467if ($value -is [string] -and $value.Length -le 2) {
45- $this.SVG |
46- Select-Xml -Namespace @{s='http://www.w3.org/2000/svg'} -XPath "//s:glyph[@unicode='$($value -replace "'", "''")']" |
47- Select-Object -ExpandProperty Node
68+ $escapedValue = $($value -replace "'","''")
69+ $this.XML |
70+ Select-Xml -Namespace @{s='http://www.w3.org/2000/svg'} -XPath "//s:glyph[@unicode='$escapedValue'] | //s:glyph[@glyph-name='$escapedValue']" |
71+ toGlyph
72+ }
73+
74+ if ($null -eq $value) {
75+ $this.XML |
76+ Select-Xml -Namespace @{s='http://www.w3.org/2000/svg'} -XPath "//s:glyph" |
77+ toGlyph
4878}
4979
5080 </Script >
You can’t perform that action at this time.
0 commit comments