LOGFONT:: Inside windows, the font is represented by a structure called LOGFONT.

Source: Internet
Author: User

Structure prototype:typedef struct taglogfont{//LF LONG lfheight; LONG Lfwidth; LONG lfescapement; LONG lforientation; LONG Lfweight; BYTE Lfitalic; BYTE Lfunderline; BYTE lfstrikeout; BYTE lfCharSet; BYTE lfoutprecision; BYTE lfclipprecision; BYTE lfquality; BYTE lfpitchandfamily; TCHAR lffacename[lf_facesize];} LOGFONT;1 Members
lfheight:Specifies the height of the font character OFDM (character cell) or character in logical units. The character height value is the OFDM height value minus the internal line spacing (internal-leading) value. When Lfheight is greater than 0 o'clock, the font mapper converts the value to device unit and matches it to the character OFDM height of the available font, and when this parameter is 0 o'clock, the font mapping level uses a matching default height value, and if the value of the parameter is less than 0, it is converted to device unit. and matches its absolute value to the character height of the available font. In either case, the font-mapping degree ultimately results in a font height value that does not exceed the specified value. In Mm_text mapping mode, the font height and point values are converted into the following formulas: Lfheight=-muldiv (pointsize, GetDeviceCaps (HDC, Logpixelsy), 72);Lfwidth:Specifies the average width of the font characters in logical units. If the value of Lfwidth is 0, the closest matching value is selected from the number conversion aspect of the available font based on the aspect ratio of the device, which is derived by comparing the absolute value of the difference between the two.lfescapement:Specifies the angle at the bottom of the page for each line of text output, in One-tenth-degree units.I, Lforientation:Specifies the angle of the word's baseline line relative to the bottom of the page in One-tenth-degree units.Lfweight:Specifies the weight of the font. In Windows, the term font weight is used to refer to how thick the font is. The Lfweight range is 0 to 1000, and the normal font weight is 400, and the bold is 700. If Lfweight is 0, the default font weight is used.Lfitalic:Use italic when Lfitalic is TrueLfunderline:Underline font when Lfunderline is Truelfstrikeout:Add strikethrough to Font when Lfstrikeout is TruelfCharSet:Specifies the character set. You can use the following predefined values: Ansi_charset, Baltic_charset, Chinesebig5_charset, Default_charset, Easteurope_charset, GB2312_CHARSET, Greek_charset, Hangul_charset, Mac_charset, Oem_charset, Russian_charset, Shiftjis_charset, SYMBOL_CHARSET, TURKISH_ CHARSET. Where Oem_charset indicates that the character set relies on the local operating system. Default_charset indicates that the character set is based on the local operating system. For example, the system location is Chinese (states) and the character set will be ansi_charset.lfoutprecision:Specifies the output precision. The output precision defines how close the output is to the required font height, width, character orientation, and so on. It can be one of the following values: Out_character_precis, Out_default_precis, Out_string_precis, Out_stroke_precis.lfclipprecision:Specifies the clip precision. Clip precision defines how a character is clipped when part of a character exceeds the clipping region, which can be one of the following: Clip_character_precis, Clip_default_precis, Clip_stroke_precis.lfquality:Defines the output quality. The output quality defines the way that the graphics device interface matches the logical font properties to the actual physical font, which can be one of the following values: default_quality (Default quality), Draft_quality (draft quality), Proof_quality (positive draft quality).lfpitchandfamily:Specifies the character spacing and family of the font. Minimum two bits the character spacing for the specified font is one of the following: Default_pitch, Fixed_pitch, Variable_pitch 4th to 7th specifies that the font family is one of the following values: Ff_decorative, Ff_dontcare, ff_ Modern, Ff_roman, Ff_script, ff_swiss the specific meanings of these values can be referenced in Visual C + + for structural logfont documentation. Character spacing and font families can be combined using the logical OR (or) operator.Lffacename:A null-terminated string that specifies the name of the font used. The length of the string must not exceed 32 characters, and if Lffacename is null, the graphics device interface will use the default font name.

LOGFONT:: Inside windows, the font is represented by a structure called LOGFONT.

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.