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