|
|
|
fmenumerate(3w) -- enumerate the font faces available through the font manager.
|
|
fmenumerate accepts a callback routine as an argument. It calls the routine once for each font face file in the font directories in the font path, When fmenumerate calls the callback routine, it passes the callback routine a pointer to a character string that contains the name of a font file. For example, the following code prints the name of each "family" to the terminal: void printname(str) char *str; { printf("%s\n", str); } main() { fminit(); fmenumerate(printname); }... |
|
fmfindfont(3w) -- select a font face.
|
|
Before you can call fmfindfont, you must startup the Font Manager. (Call fminit.) Once you have initialized the Font Manager, you can call fmfindfont to get a font handle for a type face. The face argument expects a pointer to a character string that specifies a font family. The returned value of the function is the requested font handle. This font handle gives you access to a one point version of the font. Use fmfonthandle much as you would use the findfont operator of PostScript. If fmfindfont... |
|
|
fmfontin(3w) -- return information about the overall font
|
|
fmgetfontinfo writes information to the members of the fmfontinfo type structure pointed to by the info parameter. The information written pertains to the whole fh font. If fmgetfontinfo cannot find the fh font, its returned function value is -1. Otherwise the value of the function is 0. The members of fmfontinfo are declared to make it easy for FORTRAN programmers to access and interpret (hence the large number of long declarations). For a listing of the entire fmfontinfo type structure, see |
|
fmfontna(3w) -- return the name associated with a font
|
|
fmgetfontname gets the name of the font associated with the fonthandle in fh. fmgetfontname writes this information to the location (array) pointed to by str. Use slen to tell fmgetfontname the size of the array pointed to by str. fmgetfontname does not write more characters to str than specified by slen. Normally, the returned value of the fmgetfontname function is the length of the string written to str. But if the font does not have a name, or if fmgetfontname cannot find the font, the return... |
|
fmfontpath(3w) -- get the current font path.
|
|
fmfontpath returns a pointer to a string that describes the current search path for finding font files. The string contains a colonseparated list of directories. The default font path for bitmap fonts for the IRIS Font Manager is "/usr/lib/X11/fonts/100dpi:/usr/lib/X11/fonts/75dpi:/usr/lib/X11/fonts/misc". That font path can be changed by using the environment variable FONTPATH. The default font path for those outline fonts which are in the Type 1 format is "/usr/lib/DPS/outline/base". That ... |
|
fmfprstr(3w) -- render a character string in a specified font
|
|
fmfprstr sets the current font to a specified font, and then renders a specified character string by using that font. fmfprstr does not perform the subpixel positioning of characters. It returns the length of the rendered character string in pixels. This function can usually render a given character string faster than the function fmprstr. The return value of -1 indicates an error. |
|
fmfreefont(3w) -- free the storage for a font
|
|
fmfreefont frees the storage associated with a font in a given rotation and size (as specified in the font handle fh). Deleting a font also deletes its font handle. To ensure that fmfreefont frees the correct font/rotation/size instance, be sure that the same page matrix is in force as when you first queried or imaged from that font. Because normal usage of the font manager does not involve changing the page matrix, you seldom need to worry about it. But if you find that you cannot delete a font... |
|
fmgetcacheused(3w) -- return the number of bytes used by the font cache
|
|
This function was made obsolete by changes to the IRIS Font Manager. The function was replaced by a stub that does not do anything. What follows is a description of what this function did under the NeWS windowing system. This routine returns the exact number of bytes used by the font cache. There are no implied multipliers. |
|
fminit(3w) -- initialize the Font Manager
|
|
Call fminit to initialize the Font Manager. You must call fminit before you can call any other routine in the Font Manager library. It sets the default page matrix that the font scaling and transformation routines use. |
|
fmmakefont(3w) -- associate a transformation matrix with a font
|
|
fmmakefont concatenates the provided matrix to the matrix associated with this instance of the font, returning a new handle. When the font is imaged, this matrix is inspected to determine the proper scaling, shearing, rotation, or combination of these, for the imaging. This operator is more general than fmscalefont, which applies uniform scaling only. |
|
fmmatrix(3w) -- font manager page matrix operations
|
|
The argument m points to a 3x2 matrix of doubles, of which you need fill in only the first two rows when loading values. (The third row is reserved for future development and is currently ignored.) This matrix is a two dimensional transformation matrix that you can multiply against the page matrix. (The page matrix is independent of the hardware matrix stack.) You can use this multiplication of the page matrix to scale and rotate text. For more information on two-dimensional transformation matri... |
|
fmoutchar(3w) -- render a single glyph.
|
|
fmoutchar renders a single glyph from the given font. It does not change the current font. If the glyph doesn't exist, it spaces forward the width of a space; if a space doesn't exist, it spaces forward the width of the font. The width used is returned. Note that 'ch' is declared as 'unsigned int' so that characters with code > 256 can be displayed. |
|
fmprintermatch(3w) -- toggle printer matching
|
|
fmprintermatch sets a state variable that controls printer font matching. fmprintermatch(0) disables printer font matching, fmprintermatch(1) enables printer font matching. When a font is rendered (imaged), the Font Manager check the state of this variable. If enabled, the Font Manager looks for a printer widths file that corresponds to the font. If the file exists, and the font has not yet been sized, the Font Manager creates a new font and inserts it into the font handle that has widths that c... |
|
fmprstr(3w) -- render a string in the current font
|
|
fmprstr renders a string using the current font, as set by fmsetfont. It uses subpixel-positioning to assure that rounding errors do not cause aberrant spacing. It also renders rotated characters by inspecting and concatenating the page matrix with the font matrix, then rendering in the resulting coordinate system. If the string is null, or the font does not exist, fmprstr returns -1. Otherwise, it returns 0.... |
|
fmscalefont(3w) -- scale a font face.
|
|
fmfindfont returns a handle to a 1-point-high font in the face specified. fmscalefont applies the provided scale factor to the matrix associated with this instance of the font, returning a new handle. Later, when the font is imaged, this value is used to determine the size of characters to use. Its default coordinate system is in points, so passing a scale of "12" creates a specification of a 12-point font. This is displayresolution independent. Its functionality parallels the scalefont operat... |