File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ extension SFSymbolRenderer {
6767 fill: LayerTree . FillAttributes ) -> LayerTree . Path ? {
6868 guard case . path( let p) = shape else { return nil }
6969
70+ if fill. fill != . none && fill. opacity > 0 {
71+ return p
72+ }
73+
7074 if stoke. color != . none && stoke. width > 0 {
7175 #if canImport(CoreGraphics)
7276 return expandOutlines ( for: p, stroke: stoke)
@@ -76,10 +80,6 @@ extension SFSymbolRenderer {
7680 #endif
7781 }
7882
79- if fill. fill != . none && fill. opacity > 0 {
80- return p
81- }
82-
8383 return nil
8484 }
8585
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ final class RendererSFSymbolTests: XCTestCase {
3939 }
4040
4141 func testSymbol( ) throws {
42- let url = try Bundle . test. url ( forResource: " key .svg" )
42+ let url = try Bundle . test. url ( forResource: " chart .svg" )
4343 let svg = try SFSymbolRenderer . render ( fileURL: url, options: [ ] )
4444 XCTAssertTrue ( svg. contains ( " Ultralight-S " ) )
4545 XCTAssertTrue ( svg. contains ( " Regular-S " ) )
You can’t perform that action at this time.
0 commit comments