font/coretext: clarify buggy coretext shaper

This commit is contained in:
Mitchell Hashimoto
2023-12-11 21:42:49 -08:00
parent 489ed57e2f
commit 34cdb871f5

View File

@ -17,6 +17,14 @@ const terminal = @import("../../terminal/main.zig");
const log = std.log.scoped(.font_shaper); const log = std.log.scoped(.font_shaper);
/// Shaper that uses CoreText. /// Shaper that uses CoreText.
///
/// WARNING: This is not ready for production usage. This is why this shaper
/// can't be configured at build-time without modifying the source. There are
/// a couple major missing features (quirks mode, font features) and I haven't
/// very carefully audited all my memory management.
///
/// The purpose of this shaper is to keep us honest with our other shapers
/// and to help us find bugs in our other shapers.
pub const Shaper = struct { pub const Shaper = struct {
/// The allocated used for the feature list and cell buf. /// The allocated used for the feature list and cell buf.
alloc: Allocator, alloc: Allocator,
@ -118,6 +126,7 @@ pub const Shaper = struct {
pub fn shape(self: *Shaper, run: font.shape.TextRun) ![]const font.shape.Cell { pub fn shape(self: *Shaper, run: font.shape.TextRun) ![]const font.shape.Cell {
// TODO: quirks fonts // TODO: quirks fonts
// TODO: font features
// Special fonts aren't shaped and their codepoint == glyph so we // Special fonts aren't shaped and their codepoint == glyph so we
// can just return the codepoints as-is. // can just return the codepoints as-is.