GLYPHS(5)
β¨ GLYPHS(5) β¨
okay bestie, so this is a page from the File Formats Manual, and it's all about .glyphs files π
πΈ NAME πΈ
glyphs β the format of .glyphs files, periodt.
π¦ DESCRIPTION π¦
Glyph files (they've got the ``.glyph'' extension) are where Magic stores its commonly-used bit patterns β aka glyphs. Right now Magic uses these bit patterns for two whole things. First up: they define the patterns for programmable cursors, so every cursor shape (think the arrow for the wiring tool π) gets read in as a glyph straight from a glyph file. Second: the window manager uses glyphs to draw the icons sitting at the ends of scroll bars. And btw, glyph file names normally have the .glyph extension, no cap.
Glyph files are stored in ASCII format. Any line starting with ``#'' is a comment and gets ignored, and blank lines are ignored too. The first non-comment line in a glyph file has to have this syntax:
size nGlyphs width height
Here's the breakdown, bestie:
nGlyphshas to be a number giving the total number of glyphs stored in the file.widthandheightgive the dimensions of each glyph in pixels.- Every single glyph in the same file has to have the same size. No mixing, no chaos π
After the size line comes a description for each of the glyphs. Each glyph is made of height lines, and each of those lines contains 2Γwidth characters. Every pair of characters maps to a bit position in the glyph, and the leftmost pair on the topmost line is the upper-left pixel of the glyph. iconic.
Now the first character of each pair tells you the color that shows up in that pixel. The color is a single character, and it has to be the short name of a display style in the current display style file. Some of the classic ones you'll see:
Kfor black π€Wfor white π€.for the background color β and when.shows up in a cursor, it means that pixel position is transparent, so the picture underneath peeks through the cursor β¨
Want more on that? Go read ``Magic Maintainer's Manual #3: Display Styles, Color Maps, and Glyphs'' β it's all in there.
The second character of each pair is normally blank, EXCEPT for one pixel per glyph which may contain a *'' in the second character. That '' is for programmable cursors and it marks the hot-spot: the pixel with the ``'' is the one the cursor is considered to be pointing at π―
fr fr, only one * per glyph β that's the whole point.
Wanna see an actual glyph file in the wild? Peep βΌcad/lib/magic/sys/color.glyphs π
π SEE ALSO π
and that's the whole page, bestie π«Ά this one came from the 4th Berkeley Distribution, and yes, it's GLYPHS(5) β slay π
β¨
π¦ where this page comes from
- debian bookworm: magic 8.3.105+ds.1-1.1 Β· BSD-style
- fedora 43: magic 8.3.552-1.fc43 Β· HPND-UC-export-US AND TCL AND HPND
- fedora 43: magic 8.3.651-1.fc43 Β· HPND-UC-export-US AND TCL AND HPND
- fedora 44: magic 8.3.623-1.fc44 Β· HPND-UC-export-US AND TCL AND HPND
- fedora 44: magic 8.3.684-1.fc44
- fedora 44: magic 8.3.685-1.fc44 Β· HPND-UC-export-US AND TCL AND HPND
- nixos 26.05: magic-vlsi 8.3.629
- nixpkgs unstable: magic-vlsi 8.3.689
- ubuntu jammy: magic 8.3.105+ds.1-1.1 Β· BSD-style
- ubuntu noble: magic 8.3.105+ds.1-1.1 Β· BSD-style
- ubuntu resolute: magic 8.3.105+ds.1-1.1 Β· BSD-style
- ubuntu stonking: magic 8.3.105+ds.1-1.1 Β· BSD-style
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms