1GLYPHS(5) File Formats Manual GLYPHS(5)
2
3
4
6 glyphs - format of .glyphs files
7
8
10 Glyph files (``.glyph'' extension) are used to store commonly-used bit
11 patterns (glyphs) for Magic. Right now, the bit patterns are used for
12 two purposes in Magic. First, they specify patterns for programmable
13 cursors: each cursor shape (e.g. the arrow used for the wiring tool)
14 is read in as a glyph from a glyph file. Second, glyphs are used by
15 the window manager to represent the icons displayed at the ends of
16 scroll bars. Glyph file names normally have the extension .glyph.
17
18 Glyph files are stored in ASCII format. Lines beginning with ``#'' are
19 considered to be comments and are ignored. Blank lines are also
20 ignored. The first non-comment line in a glyph file must have the syn‐
21 tax size nGlyphs width height The nGlyphs field must be a number giving
22 the total number of glyphs stored in the file. The width and height
23 fields give the dimensions of each glyph in pixels. All glyphs in the
24 same file must have the same size.
25
26 The size line is followed by a description for each of the glyphs.
27 Each glyph consists of height lines each containing 2×width characters.
28 Each pair of characters corresponds to a bit position in the glyph,
29 with the leftmost pair on the topmost line corresponding to the upper-
30 left pixel in the glyph.
31
32 The first character of each pair specifies the color to appear in that
33 pixel. The color is represented as as a single character, which must
34 be the short name of a display style in the current display style file.
35 Some commonly-used characters are K for black, W for white, and . for
36 the background color (when . is used in a cursor, it means that that
37 pixel position is transparent: the underlying picture appears through
38 the cursor). See ``Magic Maintainer's Manual #3: Display Styles, Color
39 Maps, and Glyphs'' for more information.
40
41 The second character of each pair is normally blank, except for one
42 pixel per glyph which may contain a ``*'' in the second character. The
43 ``*'' is used for programmable cursors to indicate the hot-spot: the
44 pixel corresponding to the ``*'' is the one that the cursor is consid‐
45 ered to point to.
46
47 For an example of a glyph file, see ∼cad/lib/magic/sys/color.glyphs.
48
49
51 magic(1), dstyle(5)
52
53
54
554th Berkeley Distribution GLYPHS(5)