The NEWTEXTMETRIC structure contains data that describes a physical font.
typedef struct tagNEWTEXTMETRIC { // ntm
LONG tmHeight;
LONG tmAscent;
LONG tmDescent;
LONG tmInternalLeading;
LONG tmExternalLeading;
LONG tmAveCharWidth;
LONG tmMaxCharWidth;
LONG tmWeight;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
BCHAR tmFirstChar;
BCHAR tmLastChar;
BCHAR tmDefaultChar;
BCHAR tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
BYTE tmPitchAndFamily;
BYTE tmCharSet;
DWORD ntmFlags;
UINT ntmSizeEM;
UINT ntmCellHeight;
UINT ntmAvgWidth;
} NEWTEXTMETRIC;
The tmOverhang member enables the application to determine how much of
the character width returned by a GetTextExtentPoint32
function call on a single character is the actual character width and how much
is the per-string extra width. The actual width is the extent minus the
overhang.
The four high-order bits designate the font family. The tmPitchAndFamily
member can be combined with the hexadecimal value 0xF0 by using the bitwise
AND operator and can then be compared with the font family names for an
identical match. For more information about the font families, see the LOGFONT
structure.
|
Bit |
Meaning |
|
0 |
Italic |
|
1 |
Underscore |
|
2 |
Negative |
|
3 |
Outline |
|
4 |
Strikeout |
|
5 |
Bold |
The last four members of the NEWTEXTMETRIC structure are not included in the TEXTMETRIC structure; in all other respects, the structures are identical.
The sizes in the NEWTEXTMETRIC structure are typically given in logical units; that is, they depend on the current mapping mode of the display context.
EnumFontFamilies, GetTextExtentPoint32, GetTextMetrics, LOGFONT
| file: /Techref/os/win/api/win32/struc/src/str12_18.htm, 8KB, , updated: 2000/4/7 12:20, local time: 2025/10/25 09:20,
216.73.216.22,10-3-83-201:LOG IN
|
| ©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/tecHREF/os/win/api/win32/struc/src/str12_18.htm"> NEWTEXTMETRIC</A> |
| Did you find what you needed? |
|
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
|
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! |
.