HC_Begin_Font_Search
-
void
HC_Begin_Font_Search(char const *display, char const *filter) - void HC_Begin_Font_Search(char const display, char const filter)
Finds the names of all the fonts available on a particular device.
Begin_Font_Search() initiates and defines the search. Only the types specified in filter are searched for.
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 ()
If the device is not operating, Begin_Font_Search() might force a call to Update_Display() to get it started. See the note at the bottom of Show_Device_Info() for more information.
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.
HC_Define_Font, HC_Show_Font, HC_Show_Font_Info, HC_Set_Text_Font, HC_Show_Device_Info.Parameters
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.