// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! Draws glyphs from fonts decoded by zig-font onto z2d surfaces. //! //! What goes in is positioned glyphs — a `Run`: one `Face` at one size and a //! list of glyph IDs with where each goes — which is what a shaper //! produces. The renderer does no shaping and no I/O: finding fonts is the //! `font_loader` module's job, and turning text into glyphs a shaper's, with //! `simple_layout` standing in for one until there is one. //! //! ```zig //! var f = try font.Font.parse(gpa, bytes, .{}); //! defer f.deinit(); //! var face = try renderer.Face.init(gpa, &f, .{}); //! defer face.deinit(gpa); //! //! var placed = try renderer.simple_layout.layout(gpa, &face, 32, "Hello"); //! defer placed.deinit(gpa); //! //! var cache: renderer.GlyphCache = .init(gpa, renderer.GlyphCache.default_budget); //! defer cache.deinit(); //! try renderer.drawRun(gpa, &surface, .{ .face = &face, .size = 32, .glyphs = placed.glyphs }, 10, 40, .{ //! .cache = &cache, //! }); //! ``` pub const Face = @import("Face.zig"); pub const GlyphCache = @import("GlyphCache.zig"); pub const bitmap = @import("bitmap.zig"); pub const colr = @import("colr.zig"); pub const color_bitmap = @import("color_bitmap.zig"); pub const draw = @import("draw.zig"); pub const hint = @import("hint.zig"); pub const outline = @import("outline.zig"); pub const raster = @import("raster.zig"); pub const resample = @import("resample.zig"); pub const run = @import("run.zig"); pub const simple_layout = @import("simple_layout.zig"); pub const svg = @import("svg.zig"); pub const Run = run.Run; pub const Glyph = run.Glyph; pub const Position = run.Position; pub const Image = raster.Image; pub const drawRun = draw.drawRun; pub const DrawOptions = draw.Options; test { // Every file with tests has to be named here or its tests never run. _ = Face; _ = GlyphCache; _ = bitmap; _ = colr; _ = color_bitmap; _ = draw; _ = hint; _ = outline; _ = raster; _ = resample; _ = run; _ = simple_layout; _ = svg; }