Files
playdate-kit/Sources/PlaydateKit/Graphics/Structures/Glyph.swift
T

15 lines
452 B
Swift
Raw Normal View History

internal import CPlaydate
extension Graphics {
2026-09-18 13:15:08 +00:00
/// A glyph in a font. Wraps `LCDFontGlyph`. Retains its font.
public struct Glyph {
let pointer: OpaquePointer
let font: Font
2026-09-18 13:15:08 +00:00
/// Kerning adjustment between `glyphCode` and `nextCode`.
public func kerning(glyphCode: UInt32, nextCode: UInt32) -> Int {
Int(gfx.pointee.getGlyphKerning.unsafelyUnwrapped(pointer, glyphCode, nextCode))
}
}
}