Callback Function enumfontfamproc

Source: Internet
Author: User

Function:
This function is a callback function defined by the application and used together with the enumfontfamilies function.
Collect data for description and available fonts. Type fontenumproc defines a pointer to this callback function, Enum
Fontfamproc is a placeholder for the name of the function defined by the application.
Function prototype: int callback enumfontfamproc (enumlogfont far * lpelf, newtextmetric far * lpntm, int fonttype, lparam );

Parameters:
Lpelf: pointer to the structure enumlogfont, which contains the logical attributes of the font. This structure is partially defined.
Lpntm: pointer to the newtextmetric structure, which contains the physical properties of the TrueType font. If the font is not a TrueType font, this parameter is a pointer to the structure textmetric.
Fonttype: Specifies the font type. This parameter can be a combination of the following values:
Device_fonttype, raster_fonttype, and truetype_fonttype.
Lparam: a pointer to the data defined by an application sent from the enumfontfamilies function.
Return Value: To continue listing, the return value must be a non-zero value. To stop listing, the return value must be 0.

Note:
The application must pass the callback function address to enumfontfamilies to register the function.
Raster_fonttype, device_fonttype, truetype_fonttype, and other constants can be connected by the and operator.
To determine the font type. If the raster_fonttype bit is set, the font is a grating font. If the truetype_fonttype bit is set,
This font is a TrueType font. If neither of the preceding two parameters is set, the font
Is a vector font. When a device (such as a laser printer) supports downloading TrueType fonts or the fonts are resident
Device_fonttype is set when the device is a display device, dot matrix printer, or other Grating
Device, the value is 0. The application can also use device_fonttype to differentiate the grating provided by the graphic device interface (GDI ).
Font and the font provided by the device. GDI can simulate bold, italic, underline, and strikethrough (
Strikeout), but does not support fonts provided by devices.
Windows CE: the physical properties of fonts are always stored in the textmetric structure.
TrueType fonts are not supported in Windows CE 1.0. In this version, the value of the fonttype parameter is always raster_fonttype.
In Windows CE 2.0, the fonttype can depend on the Windows CE platform for raster_fonttype or truetype_fonttype,
Any given Windows CE platform only supports one of the grating fonts and TrueType fonts.
The body type (grating or TrueType) is selected during system design and cannot be modified by the application.

Callback Function enumfontfamproc

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.