mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
font: yeet usingns
This commit is contained in:
@ -300,9 +300,6 @@ pub fn clear(self: *Atlas) void {
|
|||||||
/// The wasm-compatible API. This lacks documentation unless the API differs
|
/// 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
|
/// 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.
|
/// 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 {
|
pub const Wasm = struct {
|
||||||
// If you're copying this file (Atlas.zig) out to a separate project,
|
// If you're copying this file (Atlas.zig) out to a separate project,
|
||||||
// just replace this with the allocator you want to use.
|
// just replace this with the allocator you want to use.
|
||||||
|
@ -2,6 +2,8 @@ const std = @import("std");
|
|||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
const build_config = @import("../build_config.zig");
|
const build_config = @import("../build_config.zig");
|
||||||
|
|
||||||
|
const library = @import("library.zig");
|
||||||
|
|
||||||
pub const Atlas = @import("Atlas.zig");
|
pub const Atlas = @import("Atlas.zig");
|
||||||
pub const discovery = @import("discovery.zig");
|
pub const discovery = @import("discovery.zig");
|
||||||
pub const face = @import("face.zig");
|
pub const face = @import("face.zig");
|
||||||
@ -23,7 +25,7 @@ pub const Sprite = sprite.Sprite;
|
|||||||
pub const SpriteFace = sprite.Face;
|
pub const SpriteFace = sprite.Face;
|
||||||
pub const Descriptor = discovery.Descriptor;
|
pub const Descriptor = discovery.Descriptor;
|
||||||
pub const Discover = discovery.Discover;
|
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.
|
/// If we're targeting wasm then we export some wasm APIs.
|
||||||
pub usingnamespace if (builtin.target.isWasm()) struct {
|
pub usingnamespace if (builtin.target.isWasm()) struct {
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
const options = @import("main.zig").options;
|
const options = @import("main.zig").options;
|
||||||
|
const run = @import("shaper/run.zig");
|
||||||
pub const noop = @import("shaper/noop.zig");
|
pub const noop = @import("shaper/noop.zig");
|
||||||
pub const harfbuzz = @import("shaper/harfbuzz.zig");
|
pub const harfbuzz = @import("shaper/harfbuzz.zig");
|
||||||
pub const coretext = @import("shaper/coretext.zig");
|
pub const coretext = @import("shaper/coretext.zig");
|
||||||
pub const web_canvas = @import("shaper/web_canvas.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 Cache = @import("shaper/Cache.zig");
|
||||||
|
pub const TextRun = run.TextRun;
|
||||||
|
pub const RunIterator = run.RunIterator;
|
||||||
|
|
||||||
/// Shaper implementation for our compile options.
|
/// Shaper implementation for our compile options.
|
||||||
pub const Shaper = switch (options.backend) {
|
pub const Shaper = switch (options.backend) {
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
const std = @import("std");
|
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 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
|
/// Sprites are represented as special codepoints outside of the Unicode
|
||||||
/// codepoint range. Unicode maxes out at U+10FFFF (21 bits), and we use the
|
/// codepoint range. Unicode maxes out at U+10FFFF (21 bits), and we use the
|
||||||
/// high 11 bits to hide our special characters.
|
/// high 11 bits to hide our special characters.
|
||||||
|
Reference in New Issue
Block a user