Begin_Font_Search

Functions

void Begin_Font_Search (const char *display, const char *filter)
 Finds the names of all the fonts available on a particular device. More...
 
void End_Font_Search (void)
 Terminates the font search sequence and frees any involved memory. More...
 
HC_BOOLEAN Find_Font (char *name)
 Retrieves the font names, one at a time. The function returns false when all aliases have been returned. More...
 
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. More...
 

Detailed Description

Function Documentation

◆ Begin_Font_Search()

void Begin_Font_Search ( const char *  display,
const char *  filter 
)

Finds the names of all the fonts available on a particular device.

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.

DETAILS

A Font Search allows you to find out what fonts are available on a given display.
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 () 

NOTES

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.

RESTRICTIONS

See also
Define_Font, Show_Font, Show_Font_Info, Set_Text_Font, Show_Device_Info.

◆ End_Font_Search()

void End_Font_Search ( void  )

Terminates the font search sequence and frees any involved memory.

DETAILS

No additional details. See Begin_Font_Search()

◆ Find_Font()

HC_BOOLEAN Find_Font ( char *  name)

Retrieves the font names, one at a time. The function returns false when all aliases have been returned.

Parameters
name- The nameof one available font. Returned to user. Passed by reference always.
Returns
flag

DETAILS

No additional details. See Begin_Font_Search()

◆ Show_Font_Count()

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.

Parameters
count- The total number of font names returned by Find_Font() . Returned to user. Passed by reference always.

DETAILS

No additional details. See Begin_Font_Search()