Purpose |
Create a new font for use with GRAPHIC PRINT, XPRINT, etc. | ||||||||||||||||||||||||||||||||||||
Syntax |
FONT NEW fontname$ [,points!, style&, charset&, pitch&, escapement&] TO fhndl | ||||||||||||||||||||||||||||||||||||
fontname$ |
Name of the font. | ||||||||||||||||||||||||||||||||||||
points! |
Size of the font, in points. This may be specified
as a
| ||||||||||||||||||||||||||||||||||||
style& |
Font style attribute. Any of the following values can be combined or used alone:
Some fonts specify "external leading" in their definition. In some cases, it only applies to certain point sizes of a font. External Leading specifies that one or more blank pixels are added to the bottom of each character when displayed. This has an impact on character position and should be considered when creating a font. Normally, the font is created without regard to external leading. That is, it's created so that the visible character face fills the requested point size. However, if the Leading Option is used, the font will be created so that the visible character face plus the external leading (if any) fills the point size. In these cases, the character may appear slightly smaller. | ||||||||||||||||||||||||||||||||||||
charset& |
CharSet identifier.
| ||||||||||||||||||||||||||||||||||||
pitch& |
Pitch and Font Family attribute. One of each group of values can be combined or used alone:
| ||||||||||||||||||||||||||||||||||||
escapement& |
Specifies the angle, in tenths of degrees, between the character base line and the x axis. Allows printing of text on an angle. | ||||||||||||||||||||||||||||||||||||
fhndl |
Upon successful creation of a new font, a unique PowerBASIC handle is assigned to this Long Integer or DWord variable. This handle is used with other statements and functions to specify the created font. If the font creation fails, the value zero (0) is assigned to fhndl. | ||||||||||||||||||||||||||||||||||||
Remarks |
This is the preferred method of creating and specifying fonts in PowerBASIC. Using FONT NEW, you can create a group of fonts, in advance, and switch between them easily using GRAPHIC SET FONT and XPRINT SET FONT. If the requested font is not available on the computer, Windows will search for a substitute font, which is similar to the attributes specified (CharSet, Font Family, etc.). You may use the value zero (0) for any of the numeric parameters to designate that the compiler should use the default for that item. If parameters are missing, the compiler substitutes the default value for all remaining parameters. | ||||||||||||||||||||||||||||||||||||
See also |
FONT END, GRAPHIC PRINT, GRAPHIC SET FONT, XPRINT, XPRINT SET FONT |