Functions | |
void | Begin_Font_Search (const char *display, const char *filter) |
void | Show_Font_Count (int *count) |
HC_BOOLEAN | Find_Font (char *name) |
void | End_Font_Search (void) |
void Begin_Font_Search | ( | const char * | display, | |
const char * | filter | |||
) |
Finds the names of all the fonts available on a particular device.
display | - Name of the segment connected to the display of interest. Often "?Picture" or "?Hardcopy". | |
filter | - A list of restrictions on the fonts of interest. |
Begin_Font_Search() initiates and defines the search. Only the types specified in filter are searched for (see below).
Show_Font_Count() determines the number of font names returned. This is useful for determining the size of a data structure needed to store the incoming items.
Find_Font() returns names, one at a time, from the selected display. The return value becomes false when all items have been returned.
End_Font_Search() terminates the search sequence. As with the other search routines, the Begin_Font_Search() operations can be nested.
The following choices are available for filter:
"Generic" tells you which of the generic font names (see Set_Text_Font() ) are available---in at least one size.
"Specific" tells you which individual fonts are available, with the names coming back in the style of the local system (for example, the operating system).
"Defined" tells you which user defined fonts are available, with the names coming back in the previously defined form.
"Family" or "families" tells you which name the system, or HOOPS, has picked to refer to the available sizes of a single typeface.
Any combination of choices can be given. Separate by commas. Uppercase versus lowercase is not important.
If you need more than the name of a font, call Show_Font_Info() to get additional details.
A simple coding example is
Begin_Font_Search ("?Picture", "generic") while (Find_Font (name)) print ("Yes,?Picture has: ", name) End_Font_Search ()
Show_Font_Count() is only valid between Begin_Font_Search() and End_Font_Search() . It will always return the total number of items, not the remaining number of items.
void Show_Font_Count | ( | int * | count | ) |
Finds out how many font names will be returned. This is useful for determining the size of a data structure needed to store incoming items.
count | - The total number of font names returned by Find_Font() . Returned to user. Passed by reference always. |
HC_BOOLEAN Find_Font | ( | char * | name | ) |
Retrieves the font names, one at a time. The function returns false when all aliases have been returned.
name | - The nameof one available font. Returned to user. Passed by reference always. |
void End_Font_Search | ( | void | ) |
Terminates the font search sequence and frees any involved memory.