SystemFonts.GetFontByName(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回与指定的系统字体名称对应的字体对象。
public:
static System::Drawing::Font ^ GetFontByName(System::String ^ systemFontName);
public static System.Drawing.Font GetFontByName(string systemFontName);
static member GetFontByName : string -> System.Drawing.Font
Public Shared Function GetFontByName (systemFontName As String) As Font
参数
- systemFontName
- String
需要其字体对象的系统字体的名称。
返回
如果指定的名称与值SystemFonts匹配,则为 AFont;否则为 null。
注解
如果指定的名称与枚举中的SystemFonts字体不匹配,此方法GetFontByName将null返回。