网站首页  词典首页

请输入您要查询的函数:

 

术语 getfontdata
释义 GetFontData
语法:
DWORD GetFontData(
__in HDC hdc,
__in DWORD dwTable,
__in DWORD dwOffset,
__out LPVOID lpvBuffer,
__in DWORD cbData
);
GetFontData功能
该GetFontData函数检索的TrueType字体的字体度量数据。
参数
hdc [in]
一个句柄,设备上下文。
dwTable [in]
字体的度量表,字体资料,可检索的名称。此参数可确定的TrueType字体文件由微软公司公布的规范中的度量表之一。如果此参数为0,信息检索在为TrueType字体文件或从该文件的TrueType集合当前选定字体的数据文件的开头开始启动。要检索从为TrueType集合文件指定'ttcf'(0x66637474)的数据文件的开头。
dwOffset [in]
The offset from the beginning of the font metric table to the location where the function should begin retrieving information.如果此参数为0,信息检索在由dwTable参数指定的表从头开始。如果此值大于或等于表的大小,就会出现错误。
lpvBuffer [out]
阿一个缓冲区,它接收字体信息的指针。如果该参数为NULL,则函数返回的字体数据所需的缓冲区大小。
cbData [in]
的长度,以字节的信息的检索。如果此参数为0,GetFontData返回在dwTable参数中指定的数据的大小。
返回值
如果函数成功,返回值是字节数返回。
如果函数失败,返回值是GDI_ERROR。
备注
这个功能主要是为了用于检索由字体,字体文件操作应用信息直接TrueType字体。有关嵌入字体的信息,请参阅字体嵌入参考。
应用程序有时可以使用GetFontData功能保存的文件TrueType字体。要做到这一点,应用程序确定是否字体可以通过检查的OUTLINETEXTMETRIC结构otmfsType成员嵌入。如果otmfsType 1位被设置,不允许嵌入的字体。如果位1是明确的,该字体可以嵌入。如果第2位被设置,嵌入是只读的。如果允许嵌入的应用程序可以检索整个字体文件,指定该dwTable,dwOffset,并cbData参数为零。
如果一个应用程序试图使用此功能来检索信息的非- TrueType字体,就会出现错误。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
字体和文字概述
字体和文本函数
GetTextMetrics
OUTLINETEXTMETRIC
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetFontData Function
The GetFontData function retrieves font metric data for a TrueType font.
Syntax
DWORD GetFontData(
__in HDC hdc,
__in DWORD dwTable,
__in DWORD dwOffset,
__out LPVOID lpvBuffer,
__in DWORD cbData
);
Parameters
hdc [in]
A handle to the device context.
dwTable [in]
The name of a font metric table from which the font data is to be retrieved. This parameter can identify one of the metric tables documented in the TrueType Font Files specification published by Microsoft Corporation. If this parameter is zero, the information is retrieved starting at the beginning of the file for TrueType font files or from the beginning of the data for the currently selected font for TrueType Collection files. To retrieve the data from the beginning of the file for TrueType Collection files specify 'ttcf' (0x66637474).
dwOffset [in]
The offset from the beginning of the font metric table to the location where the function should begin retrieving information. If this parameter is zero, the information is retrieved starting at the beginning of the table specified by the dwTable parameter. If this value is greater than or equal to the size of the table, an error occurs.
lpvBuffer [out]
A pointer to a buffer that receives the font information. If this parameter is NULL, the function returns the size of the buffer required for the font data.
cbData [in]
The length, in bytes, of the information to be retrieved. If this parameter is zero, GetFontData returns the size of the data specified in the dwTable parameter.
Return Value
If the function succeeds, the return value is the number of bytes returned.
If the function fails, the return value is GDI_ERROR.
Remarks
This function is intended to be used to retrieve TrueType font information directly from the font file by font-manipulation applications. For information about embedding fonts see the Font Embedding Reference .
An application can sometimes use the GetFontData function to save a TrueType font with a document. To do this, the application determines whether the font can be embedded by checking the otmfsType member of the OUTLINETEXTMETRIC structure. If bit 1 of otmfsType is set, embedding is not permitted for the font. If bit 1 is clear, the font can be embedded. If bit 2 is set, the embedding is read-only. If embedding is permitted, the application can retrieve the entire font file, specifying zero for the dwTable, dwOffset, and cbData parameters.
If an application attempts to use this function to retrieve information for a non-TrueType font, an error occurs.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Fonts and Text Overview
Font and Text Functions
GetTextMetrics
OUTLINETEXTMETRIC
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144885(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:26:47