diff --git a/Samples.bundle/cjk-fallback.svg b/Samples.bundle/cjk-fallback.svg
new file mode 100644
index 0000000..8b2adfb
--- /dev/null
+++ b/Samples.bundle/cjk-fallback.svg
@@ -0,0 +1,6 @@
+
diff --git a/SwiftDraw/Sources/Utilities/CGPath+Segment.swift b/SwiftDraw/Sources/Utilities/CGPath+Segment.swift
index a200e3c..3da65ee 100644
--- a/SwiftDraw/Sources/Utilities/CGPath+Segment.swift
+++ b/SwiftDraw/Sources/Utilities/CGPath+Segment.swift
@@ -134,6 +134,8 @@ extension String {
for idx in 0.. CTFont {
+ guard let value = attributes[kCTFontAttributeName] else {
+ return fallback
+ }
+ // CoreFoundation type bridging: ensure it's a CTFont before use.
+ if CFGetTypeID(value as CFTypeRef) == CTFontGetTypeID() {
+ return unsafeDowncast(value as AnyObject, to: CTFont.self)
+ }
+ return fallback
+ }
}
#endif