         let baselineOffset = (textContainer.layoutOrientation == .vertical)
             ? baselineOffset - (self.textFont.ascender - self.textFont.capHeight) / 2  // adjust to center symbols
             : baselineOffset
-        var pathCache: [Invisible: CGPath] = [:]
+        var pathCache: [Unicode.UTF16.CodeUnit: CGPath] = [:]
         
         // setup drawing parameters
         NSGraphicsContext.saveGraphicsState()

                    case .noBreakSpace:
                        // -> `boundingRect(forGlyphRange:in)` can occasionally not calculate the width of no-break space properly.
                        glyphWidth = self.textFont.width(of: "\u{00A0}")
                    default:
                        let glyphRange = NSRange(location: glyphIndex, length: 1)
                        let boundingRect = self.boundingRect(forGlyphRange: glyphRange, in: textContainer)

            let glyphIndex = self.glyphIndexForCharacter(at: charIndex)
            
            let path: CGPath
            if let cache = pathCache[codeUnit] {
                path = cache
            } else {
                let glyphWidth: CGFloat
