⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 font.htm

📁 TrueType字库标准文档
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html><head><meta http-equiv="content-type" content="text/html; charset=gb2312"><title>inf</title><meta name="generator" content="microsoft frontpage 3.0"></head><body background="../jpg/di1.JPG"><p align="center"><font size="6" color="#0000ff">font-file format</font></p><div align="center"><center><table border="0" width="88%"><tr><td width="100%">inf: font-file format [p_winsdk]<br><br>3.00<br>windows<br>pssonly | windows 3 developer's notes summary enduser<br><br>summary:<br><br>note: this article is part of a set of seven articles, collectively<br>called the &quot;windows 3.00 developer's notes.&quot; more information about<br>the contents of the other articles, and procedures for ordering a<br>hard-copy set, can be found in the knowledge base article titled &quot;inf:<br>the windows 3.00 developer's notes&quot; (q65260).<br><br>this article can be found in the software/data library by searching on<br>the keyword fontfmt or s12687.<br><br>more information:<br><br>formats for microsoft windows font files are defined for both raster<br>and vector fonts. these formats can be used by smart text generators<br>in some gdi support modules. the vector formats, in particular, are<br>more frequently used by gdi itself than by support modules.<br><br><br>both raster and vector font files begin with information that is<br>common to both, and then continue with information that differs for<br>each type of file.<br><br>for windows 3.00, the font-file header includes six new fields:<br>dflags, dfaspace, dfbspace, dfcspace, dfcolorpointer, and dfreserved1.<br>these fields are not used in windows 3.00. to ensure compatibility<br>with future versions of windows, these fields should be set to zero.<br><br>all device drivers support the windows 2.x fonts. however, not all<br>device drivers support the windows 3.00 version.<br><br>windows 3.00 font files include the glyph table in dfchartable, which<br>consists of structures that describe the bits for characters in the<br>font file. this version enables fonts to exceed 64k in size, the size<br>limit of windows 2.x fonts. this is made possible by the use of 32-bit<br>offsets to the character glyphs in dfchartable.<br><br>because of the 32-bit offsets and their potentially large size, these<br>fonts are designed for use on systems that are running windows version<br>3.00 in protected (standard or 386 enhanced) mode with an 80386 (or<br>higher) processor where the processor's 32-bit registers can access<br>the character glyphs. typically, device drivers use the windows 3.00<br>version of a font only when both of these conditions are true.<br><br>font files are stored with an .fnt extension of the form name.fnt. the<br>information at the beginning of both raster and vector versions of<br>windows 3.00 font files is shown in the following list:<br><br>field description<br>----- -----------<br><br>dfversion 2 bytes specifying the version (0200h or 0300h) of<br>the file.<br><br>dfsize 4 bytes specifying the total size of the file in<br>bytes.<br><br>dfcopyright 60 bytes specifying copyright information.<br><br>dftype 2 bytes specifying the type of font file.<br><br>the low-order byte is exclusively for gdi use. if the<br>low-order bit of the word is zero, it is a bitmap<br>(raster) font file. if the low-order bit is 1, it is a<br>vector font file. the second bit is reserved and must<br>be zero. if no bits follow in the file and the bits are<br>located in memory at a fixed address specified in<br>dfbitsoffset, the third bit is set to 1; otherwise, the<br>bit is set to 0 (zero). the high-order bit of the low<br>byte is set if the font was realized by a device. the<br>remaining bits in the low byte are reserved and set to<br>zero.<br><br>the high byte is reserved for device use and will<br>always be set to zero for gdi-realized standard fonts.<br>physical fonts with the high-order bit of the low byte<br>set may use this byte to describe themselves. gdi will<br>never inspect the high byte.<br><br>dfpoints 2 bytes specifying the nominal point size at which<br>this character set looks best.<br><br>dfvertres 2 bytes specifying the nominal vertical resolution<br>(dots-per-inch) at which this character set was<br>digitized.<br><br>dfhorizres 2 bytes specifying the nominal horizontal resolution<br>(dots-per-inch) at which this character set was<br>digitized.<br><br>dfascent 2 bytes specifying the distance from the top of a<br>character definition cell to the baseline of the<br>typographical font. it is useful for aligning the<br>baselines of fonts of different heights.<br><br>dfinternalleading<br>specifies the amount of leading inside the bounds set<br>by dfpixheight. accent marks may occur in this area.<br>this may be zero at the designer's option.<br><br>dfexternalleading<br>specifies the amount of extra leading that the designer<br>requests the application add between rows. since this<br>area is outside of the font proper, it contains no<br>marks and will not be altered by text output calls in<br>either the opaque or transparent mode. this may be zero<br>at the designer's option.<br><br>dfitalic 1 (one) byte specifying whether or not the character<br>definition data represent an italic font. the low-order<br>bit is 1 if the flag is set. all the other bits are<br>zero.<br><br>dfunderline 1 byte specifying whether or not the character<br>definition data represent an underlined font. the<br>low-order bit is 1 if the flag is set. all the other<br>bits are 0 (zero).<br><br>dfstrikeout 1 byte specifying whether or not the character<br>definition data represent a struckout font. the low-<br>order bit is 1 if the flag is set. all the other bits<br>are zero.<br><br>dfweight 2 bytes specifying the weight of the characters in the<br>character definition data, on a scale of 1 to 1000. a<br>dfweight of 400 specifies a regular weight.<br><br>dfcharset 1 byte specifying the character set defined by this<br>font.<br><br>dfpixwidth 2 bytes. for vector fonts, specifies the width of the<br>grid on which the font was digitized. for raster fonts,<br>if dfpixwidth is nonzero, it represents the width for<br>all the characters in the bitmap; if it is zero, the<br>font has variable width characters whose widths are<br>specified in the dfchartable array.<br><br>dfpixheight 2 bytes specifying the height of the character bitmap<br>(raster fonts), or the height of the grid on which a<br>vector font was digitized.<br><br>dfpitchandfamily<br>specifies the pitch and font family. the low bit is set<br>if the font is variable pitch. the high four bits give<br>the family name of the font. font families describe in<br>a general way the look of a font. they are intended for<br>specifying fonts when the exact face name desired is<br>not available. the families are as follows:<br><br>family description<br>------ -----------<br>ff_dontcare (0&lt;&lt;4) don't care or don't know.<br>ff_roman (1&lt;&lt;4) proportionally spaced fonts<br>with serifs.<br>ff_swiss (2&lt;&lt;4) proportionally spaced fonts<br>without serifs.<br>ff_modern (3&lt;&lt;4) fixed-pitch fonts.<br>ff_script (4&lt;&lt;4)<br>ff_decorative (5&lt;&lt;4)<br><br><br>dfavgwidth 2 bytes specifying the width of characters in the font.<br>for fixed-pitch fonts, this is the same as dfpixwidth.<br>for variable-pitch fonts, this is the width of the<br>character &quot;x.&quot;<br><br>dfmaxwidth 2 bytes specifying the maximum pixel width of any<br>character in the font. for fixed-pitch fonts, this is<br>simply dfpixwidth.<br><br>dffirstchar 1 byte specifying the first character code defined by<br>this font. character definitions are stored only for<br>the characters actually present in a font. therefore,<br>use this field when calculating indexes into either<br>dfbits or dfcharoffset.<br><br>dflastchar 1 byte specifying the last character code defined by<br>this font. note that all the characters with codes<br>between dffirstchar and dflastchar must be present in<br>the font character definitions.<br><br>dfdefaultchar 1 byte specifying the character to substitute<br>whenever a string contains a character out of the<br>range. the character is given relative to dffirstchar<br>so that dfdefaultchar is the actual value of the<br>character, less dffirstchar. the dfdefaultchar should<br>indicate a special character that is not a space.<br><br>dfbreakchar 1 byte specifying the character that will define word<br>breaks. this character defines word breaks for word<br>wrapping and word spacing justification. the character<br>is given relative to dffirstchar so that dfbreakchar is<br>the actual value of the character, less that of<br>dffirstchar. the dfbreakchar is normally (32 -<br>dffirstchar), which is an ascii space.<br><br>dfwidthbytes 2 bytes specifying the number of bytes in each row of<br>the bitmap. this is always even, so that the rows start<br>on word boundaries. for vector fonts, this field has no<br>meaning.<br><br>dfdevice 4 bytes specifying the offset in the file to the string<br>giving the device name. for a generic font, this value<br>is zero.<br><br>dfface 4 bytes specifying the offset in the file to the<br>null-terminated string that names the face.<br><br>dfbitspointer 4 bytes specifying the absolute machine address of<br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -