@@ -126,7 +126,6 @@ extension SFSymbolRenderer {
126126 case black
127127 }
128128
129-
130129 func getInsets( for variant: Variant ) -> CommandLine . Insets {
131130 switch variant {
132131 case . regular:
@@ -177,7 +176,8 @@ extension SFSymbolRenderer {
177176 static func getSymbolPaths( for layer: LayerTree . Layer ,
178177 ctm: LayerTree . Transform . Matrix = . identity) -> [ SymbolPath ] {
179178
180- guard layer. opacity > 0 else { return [ ] }
179+ let isSFSymbolLayer = containsAcceptedName ( layer. class)
180+ guard isSFSymbolLayer || layer. opacity > 0 else { return [ ] }
181181 guard layer. clip. isEmpty else {
182182 print ( " Warning: " , " clip-path unsupported in SF Symbols. " , to: & . standardError)
183183 return [ ]
@@ -190,17 +190,22 @@ extension SFSymbolRenderer {
190190 let ctm = ctm. concatenated ( layer. transform. toMatrix ( ) )
191191 var paths = [ SymbolPath] ( )
192192
193- let symbolClass = containsAcceptedName ( layer . class ) ? layer. class : nil
193+ let symbolClass = isSFSymbolLayer ? layer. class : nil
194194
195195 for c in layer. contents {
196196 switch c {
197197 case let . shape( shape, stroke, fill) :
198- if let path = makePath ( for: shape, stoke: stroke, fill: fill) ? . applying ( matrix: ctm) {
198+ if let path = makePath ( for: shape,
199+ stoke: stroke,
200+ fill: fill,
201+ preserve: isSFSymbolLayer) ? . applying ( matrix: ctm) {
199202 if fill. rule == . evenodd {
200203 paths. append ( SymbolPath ( class: symbolClass, path: path. makeNonZero ( ) ) )
201204 } else {
202205 paths. append ( SymbolPath ( class: symbolClass, path: path) )
203206 }
207+ } else {
208+ print ( " skippibng " )
204209 }
205210 case let . text( text, point, attributes) :
206211 if let path = makePath ( for: text, at: point, with: attributes) {
@@ -218,13 +223,14 @@ extension SFSymbolRenderer {
218223
219224 static func makePath( for shape: LayerTree . Shape ,
220225 stoke: LayerTree . StrokeAttributes ,
221- fill: LayerTree . FillAttributes ) -> LayerTree . Path ? {
226+ fill: LayerTree . FillAttributes ,
227+ preserve: Bool ) -> LayerTree . Path ? {
222228
223- if fill. fill != . none && fill. opacity > 0 {
229+ if preserve || ( fill. fill != . none && fill. opacity > 0 ) {
224230 return shape. path
225231 }
226232
227- if stoke. color != . none && stoke. width > 0 {
233+ if preserve || ( stoke. color != . none && stoke. width > 0 ) {
228234#if canImport(CoreGraphics)
229235 return expandOutlines ( for: shape. path, stroke: stoke)
230236#else
0 commit comments