网站首页  词典首页

请输入您要查询的函数:

 

术语 createscalablefontresource
释义 CreateScalableFontResource
语法:
BOOL CreateScalableFontResource(
__in DWORD fdwHidden,
__in LPCTSTR lpszFontRes,
__in LPCTSTR lpszFontFile,
__in LPCTSTR lpszCurrentPath
);
CreateScalableFontResource功能
该CreateScalableFontResource函数创建一个可伸缩字体的字体资源文件。
参数
fdwHidden [in]
指定的字体是否是只读的字体。此参数可以是下列值之一。
ValueMeaning
0The字体具有读写权限。
1The字体具有只读权限,应该从系统的其他应用程序隐藏。当此标志设置,字体不是由EnumFonts或EnumFontFamilies枚举函数。
lpszFontRes [in]
一个指向 null 结尾的字符串指针指定的字体资源文件的名称来创建。如果此参数指定一个现有的字体资源文件,该功能失败。
lpszFontFile [in]
一个指向 null 结尾的字符串指针指定的可缩放字体文件,这个函数用来创建字体资源文件的名称。
lpszCurrentPath [in]
一个指向 null 结尾的字符串指针指定的路径,可缩放字体文件。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
如果lpszFontRes指定一个现有的字体文件,GetLastError返回ERROR_FILE_EXISTS
备注
该CreateScalableFontResource函数使用的应用程序安装的TrueType字体。应用程序使用CreateScalableFontResource函数来创建一种字体(通常用。收发器的文件扩展名)资源文件,然后使用AddFontResource函数以安装该字体。将TrueType(通常用。ttf文件扩展名)字体文件必须在Windows目录的System子目录由AddFontResource函数使用。
该CreateScalableFontResource功能目前仅支持TrueType字体技术可缩放的字体。
当lpszFontFile参数指定只有一个文件名和扩展名,lpszCurrentPath参数必须指定一个路径。当lpszFontFile参数指定完整的路径,lpszCurrentPath参数必须为NULL或一个NULL指针。
当只有一个文件名和扩展名中指定lpszFontFile参数和路径是在lpszCurrentPath参数中指定,在lpszFontFile字符串复制到。作为。ttf文件,属于这一资源光纤收发文件。当AddFontResource函数被调用时,操作系统假定。ttf文件已到系统目录中复制(或到主视窗中的网络安装案件目录)。的。ttf文件不一定要当CreateScalableFontResource函数被调用这个目录,因为lpszCurrentPath参数包含目录信息。以这种方式创建不包含绝对路径信息的资源,可以在任何安装。
当路径中指定的lpszFontFile参数和NULL是在lpszCurrentPath参数中指定,在lpszFontFile字符串复制到。光纤收发文件。在这种情况下,当AddFontResource函数被调用的。ttf文件,必须在当CreateScalableFontResource函数被称为lpszFontFile参数指定的位置;的lpszCurrentPath参数是没有必要的。以这种方式创建的资源包含驱动器的路径和绝对引用和不起作用如果。ttf文件移动到不同的位置。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesCreateScalableFontResourceW(Unicode)和CreateScalableFontResourceA(ANSI)的
参见
字体和文字概述
字体和文本函数
AddFontResource
EnumFonts
EnumFontFamilies
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==CreateScalableFontResource Function
The CreateScalableFontResource function creates a font resource file for a scalable font.
Syntax
BOOL CreateScalableFontResource(
__in DWORD fdwHidden,
__in LPCTSTR lpszFontRes,
__in LPCTSTR lpszFontFile,
__in LPCTSTR lpszCurrentPath
);
Parameters
fdwHidden [in]
Specifies whether the font is a read-only font. This parameter can be one of the following values.
ValueMeaning
0The font has read-write permission.
1The font has read-only permission and should be hidden from other applications in the system. When this flag is set, the font is not enumerated by the EnumFonts or EnumFontFamilies function.

lpszFontRes [in]
A pointer to a null-terminated string specifying the name of the font resource file to create. If this parameter specifies an existing font resource file, the function fails.
lpszFontFile [in]
A pointer to a null-terminated string specifying the name of the scalable font file that this function uses to create the font resource file.
lpszCurrentPath [in]
A pointer to a null-terminated string specifying the path to the scalable font file.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
If lpszFontRes specifies an existing font file, GetLastError returns ERROR_FILE_EXISTS
Remarks
The CreateScalableFontResource function is used by applications that install TrueType fonts. An application uses the CreateScalableFontResource function to create a font resource file (typically with a .fot file name extension) and then uses the AddFontResource function to install the font. The TrueType font file (typically with a .ttf file name extension) must be in the System subdirectory of the Windows directory to be used by the AddFontResource function.
The CreateScalableFontResource function currently supports only TrueType-technology scalable fonts.
When the lpszFontFile parameter specifies only a file name and extension, the lpszCurrentPath parameter must specify a path. When the lpszFontFile parameter specifies a full path, the lpszCurrentPath parameter must be NULL or a pointer to NULL.
When only a file name and extension are specified in the lpszFontFile parameter and a path is specified in the lpszCurrentPath parameter, the string in lpszFontFile is copied into the .fot file as the .ttf file that belongs to this resource. When the AddFontResource function is called, the operating system assumes that the .ttf file has been copied into the System directory (or into the main Windows directory in the case of a network installation). The .ttf file need not be in this directory when the CreateScalableFontResource function is called, because the lpszCurrentPath parameter contains the directory information. A resource created in this manner does not contain absolute path information and can be used in any installation.
When a path is specified in the lpszFontFile parameter and NULL is specified in the lpszCurrentPath parameter, the string in lpszFontFile is copied into the .fot file. In this case, when the AddFontResource function is called, the .ttf file must be at the location specified in the lpszFontFile parameter when the CreateScalableFontResource function was called; the lpszCurrentPath parameter is not needed. A resource created in this manner contains absolute references to paths and drives and does not work if the .ttf file is moved to a different location.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesCreateScalableFontResourceW (Unicode) and CreateScalableFontResourceA (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
AddFontResource
EnumFonts
EnumFontFamilies
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183517(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 13:15:30