3 allocsubfont, freesubfont, installsubfont, lookupsubfont, uninstallsubfont, subfontname, readsubfont, readsubfonti, writesubfont, stringsubfont, strsubfontwidth, mkfont \- subfont manipulation
13 Subfont* allocsubfont(char *name, int n, int height, int ascent,
16 Fontchar *info, Image *i)
19 void freesubfont(Subfont *f)
22 void installsubfont(char *name, Subfont *f)
25 Subfont* lookupsubfont(Subfont *f)
28 void uninstallsubfont(Subfont *f)
31 Subfont* readsubfont(Display *d, char *name, int fd, int dolock)
34 Subfont* readsubfonti(Display *d, char *name, int fd, Image *im,
40 int writesubfont(int fd, Subfont *f)
43 Point stringsubfont(Image *dst, Point p, Image *src,
46 Subfont *f, char *str)
49 Point strsubfontwidth(Subfont *f, char *s)
52 Font* mkfont(Subfont *f, Rune min)
54 Subfonts are the components of fonts that hold the character images.
55 A font comprises an array of subfonts; see
59 is allocated and initialized with
69 and the arrangement of characters in
74 is used to identify the subfont in the subfont cache; see the descriptions
79 The appropriate fields of the returned
82 the passed arguments, and the image is registered as a subfont
83 with the graphics device
89 frees a subfont and all its associated structure including the
101 it should be zeroed before calling
104 A number of subfonts are kept in external files.
105 The convention for naming subfont files is:
107 .B \*9/font/\fIname\fP/\fIclass\fP.\fIsize\fP.\fIdepth
112 is approximately the height in pixels of the lower case letters
113 (without ascenders or descenders).
114 If there is only one version of the subfont, the
118 describes the range of runes encoded in the subfont:
124 Subfonts are cached within the program, so a subfont shared between fonts will be loaded only once.
130 typically the file name from which it was read.
132 removes the subfont from the cache.
135 searches for a subfont with the given
137 in the cache and returns it, or nil if no such subfont exists.
140 is used to locate subfonts given their names within the fonts.
141 The default version constructs a name given the
143 its name within the font,
145 the name of the font, and the maximum depth suitable for this subfont.
146 This interface allows a partially specified name within a font to be resolved
147 at run-time to the name of a file holding a suitable subfont.
148 Although it is principally a routine internal to the library,
150 may be substituted by the application to provide a less file-oriented subfont naming scheme.
152 The format of a subfont file is described in
154 Briefly, it contains a image with all the characters in it,
155 followed by a subfont header, followed by character information.
157 reads a subfont from the file descriptor
161 is used to identify the font in the cache.
164 argument specifies whether the routine should synchronize
167 with other processes; for single-threaded applications it may
170 does the same for a subfont whose associated image is already in memory; it is passed as the
175 reads only the header and character information from the file descriptor.
180 the part of a subfont file that comes after the image. It should be preceded by
191 for subfonts. Rather than use the underlying font caching primitives,
195 It is intended for stand-alone environments such as operating system kernels.
197 returns the width of the string
200 as it would appear if drawn with
210 and returns a pointer to a
212 that maps the character images in
218 .IB min + s ->n-1\f1.
223 bitmap font file tree
234 All of the functions use the graphics error function (see