         internalState.font = font
     }
     
-    public func show(text: String) {
+    /// Uses the Cairo toy text API.
+    public func show(toyText text: String) {
         
         let oldPoint = internalContext.currentPoint
         

    }
}



    
    public func show(glyphs: [FontIndex]) {
        
        let advances = self.advances(for: glyphs)
        
        var glyphAdvances = [(glyph: FontIndex, advance: Size)](repeating: (FontIndex(), Size()), count: glyphs.count)
        
        for (index, glyph) in glyphs.enumerated() {
            
            glyphAdvances[index].glyph = glyph
            glyphAdvances[index].advance = advances[index]
        }
        
        show(glyphs: glyphAdvances)
    }
    
    public func show(glyphs: [(glyph: FontIndex, advance: Size)]) {
        
        let advances = glyphs.map { $0.advance }
        let positions = self.positions(for: advances)
        
        var glyphPositions = [(glyph: FontIndex, position: Point)](repeating: (FontIndex(), Point()), count: glyphs.count)
        for (index, glyphAdvance) in glyphs.enumerated() {
            
            glyphPositions[index].glyph = glyphAdvance.glyph
            glyphPositions[index].position = positions[index]
        }
        
        // render
        show(glyphs: glyphPositions)
        
        // advance text position
        advances.forEach {
            textPosition.x += $0.width
            textPosition.y += $0.height
        }
    }
    
    public func show(glyphs: [(glyph: FontIndex, position: Point)]) {
        
        // actual rendering
        
    }
    
    public func advances(for glyphs: [FontIndex]) -> [Size] {
        
        guard let font = internalState.font?.scaledFont
            else { return [Size](repeating: Size(), count: glyphs.count) /* zeroed array */ }
        
        // only horizontal layout is supported
        
        // calculate advances
        let glyphSpaceToTextSpace = internalState.fontSize / Double(font.unitsPerEm)
        
        return font.advances(for: glyphs).map { Size(width: (Double($0) * glyphSpaceToTextSpace) + characterSpacing, height: 0).applied(transform: textMatrix) }
    }
    
    public func positions(for advances: [Size]) -> [Point] {
        
        var glyphPositions = [Point](repeating: Point(), count: advances.count)
        
        // first position is {0, 0}
        for i in 1 ..< glyphPositions.count {
            
            let textSpaceAdvance = advances[i-1].applied(transform: textMatrix)
            
            glyphPositions[i] = Point(x: glyphPositions[i-1].x + textSpaceAdvance.width,
                                      y: glyphPositions[i-1].y + textSpaceAdvance.height)
        }
        
        return glyphPositions
    }
    
    // MARK: - Private Functions
