font: yeet usingns

This commit is contained in:
Mitchell Hashimoto
2024-08-16 10:47:15 -07:00
parent b660380b01
commit 14e3f43db2
4 changed files with 11 additions and 6 deletions

View File

@ -300,9 +300,6 @@ pub fn clear(self: *Atlas) void {
/// The wasm-compatible API. This lacks documentation unless the API differs
/// from the standard Zig API. To learn what a function does, just look one
/// level deeper to what Zig function is called and read the documentation there.
///
/// To export this from Zig, use `usingnamespace Wasm` in some top-level
/// space and it will be exported.
pub const Wasm = struct {
// If you're copying this file (Atlas.zig) out to a separate project,
// just replace this with the allocator you want to use.

View File

@ -2,6 +2,8 @@ const std = @import("std");
const builtin = @import("builtin");
const build_config = @import("../build_config.zig");
const library = @import("library.zig");
pub const Atlas = @import("Atlas.zig");
pub const discovery = @import("discovery.zig");
pub const face = @import("face.zig");
@ -23,7 +25,7 @@ pub const Sprite = sprite.Sprite;
pub const SpriteFace = sprite.Face;
pub const Descriptor = discovery.Descriptor;
pub const Discover = discovery.Discover;
pub usingnamespace @import("library.zig");
pub const Library = library.Library;
/// If we're targeting wasm then we export some wasm APIs.
pub usingnamespace if (builtin.target.isWasm()) struct {

View File

@ -1,11 +1,13 @@
const builtin = @import("builtin");
const options = @import("main.zig").options;
const run = @import("shaper/run.zig");
pub const noop = @import("shaper/noop.zig");
pub const harfbuzz = @import("shaper/harfbuzz.zig");
pub const coretext = @import("shaper/coretext.zig");
pub const web_canvas = @import("shaper/web_canvas.zig");
pub usingnamespace @import("shaper/run.zig");
pub const Cache = @import("shaper/Cache.zig");
pub const TextRun = run.TextRun;
pub const RunIterator = run.RunIterator;
/// Shaper implementation for our compile options.
pub const Shaper = switch (options.backend) {

View File

@ -1,7 +1,11 @@
const std = @import("std");
pub usingnamespace @import("sprite/canvas.zig");
const canvas = @import("sprite/canvas.zig");
pub const Face = @import("sprite/Face.zig");
pub const Box = canvas.Box;
pub const Canvas = canvas.Canvas;
pub const Color = canvas.Color;
/// Sprites are represented as special codepoints outside of the Unicode
/// codepoint range. Unicode maxes out at U+10FFFF (21 bits), and we use the
/// high 11 bits to hide our special characters.