mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00

This is a fairly large rework of how we handle the sprite font drawing. Drawing routines are now context-less, provided only a canvas and some metrics. There is now a separate file per unicode block / PUA area. Sprites are now drawn on canvases with an extra quarter-cell of padding on each edge, and automatically cropped when sent to the atlas, this allows sprites to extend past cell boundaries which makes it possible to have, for example, diagonal box drawing characters that connect across cell diagonals instead of being pinched in. Most of the sprites the code is just directly ported from the old code, but I've rewritten a handful. Moving forward, I'd like to rewrite more of these since the way they're currently written isn't ideal. This rework, in addition to improving the packing efficiency of sprites on the atlas, and allowing for out-of-cell drawing, will make it a lot easier to add new sprites in the future, since all it takes now is to add a single function and an import (if it's a new file). I reworked the regression/change testing to be more robust as well, it now covers all sprite glyphs (except non-codepoint ones) and does so at 4 different sizes. Addition/removal of glyphs will no longer create diff noise in the generated diff image, since the position in the image of each glyph is now fixed.
63 lines
1.0 KiB
TOML
63 lines
1.0 KiB
TOML
[files]
|
|
extend-exclude = [
|
|
# Build
|
|
"build.zig.zon",
|
|
"build.zig.zon.nix",
|
|
"build.zig.zon.txt",
|
|
"build.zig.zon.json",
|
|
# vendored code
|
|
"vendor/*",
|
|
"pkg/*",
|
|
"src/stb/*",
|
|
# "grey" color names are valid
|
|
"src/terminal/res/rgb.txt",
|
|
# Do not self-check
|
|
"typos.toml",
|
|
# Fonts
|
|
"*.ttf",
|
|
"*.otf",
|
|
# Images
|
|
"*.png",
|
|
"*.ico",
|
|
"*.icns",
|
|
# Other
|
|
"*.pdf",
|
|
"*.data",
|
|
"*.xib",
|
|
"src/cli/lorem_ipsum.txt",
|
|
]
|
|
|
|
[default]
|
|
extend-ignore-re = [
|
|
# Ignore typos in test expectations
|
|
"testing\\.expect[^;]*;",
|
|
"kHOM\\d*",
|
|
# Ignore "typos" in sprite font draw fn names
|
|
"draw[0-9A-F]+(_[0-9A-F]+)?\\(",
|
|
]
|
|
|
|
[default.extend-words]
|
|
Pn = "Pn"
|
|
thr = "thr"
|
|
# Should be "halves", but for now skip it as it would make diff huge
|
|
halfs = "halfs"
|
|
# Swift oddities
|
|
Requestor = "Requestor"
|
|
iterm = "iterm"
|
|
ACCES = "ACCES"
|
|
wdth = "wdth"
|
|
Strat = "Strat"
|
|
grey = "gray"
|
|
greyscale = "grayscale"
|
|
DECID = "DECID"
|
|
flate = "flate"
|
|
typ = "typ"
|
|
kend = "kend"
|
|
|
|
[type.po]
|
|
extend-glob = ["*.po"]
|
|
check-file = false
|
|
|
|
[type.swift.extend-words]
|
|
inout = "inout"
|