# Function Reference

# _WinAPI_CreateFontEx

Creates a logical font with the specified characteristics

#include <WinAPIGdi.au3>
_WinAPI_CreateFontEx ( $iHeight [, $iWidth = 0 [, $iEscapement = 0 [, $iOrientation = 0 [, $iWeight = $FW_NORMAL [, $bItalic = False [, $bUnderline = False [, $bStrikeOut = False [, $iCharSet = $DEFAULT_CHARSET [, $iOutPrecision = $OUT_DEFAULT_PRECIS [, $iClipPrecision = $CLIP_DEFAULT_PRECIS [, $iQuality = $DEFAULT_QUALITY [, $iPitchAndFamily = $DEFAULT_PITCH [, $sFaceName = '' [, $iStyle = 0]]]]]]]]]]]]]] )

## Parameters

$iHeight | The height of the font's character cell or character, in logical units.
$iWidth | [optional] The average width, in logical units. Default is 0.
$iEscapement | [optional] The angle, in tenths of degrees, between the escapement vector and the x-axis of the device. Default is 0
$iOrientation | [optional] The angle, in tenths of degrees, between each character's base line and the x-axis of the device. Default is 0
$iWeight | [optional] The weight of the font in the range 0 through 1000, or one of the following values. $FW_DONTCARE $FW_THIN $FW_EXTRALIGHT $FW_ULTRALIGHT $FW_LIGHT $FW_NORMAL (Default) $FW_REGULAR $FW_MEDIUM $FW_SEMIBOLD $FW_DEMIBOLD $FW_BOLD $FW_EXTRABOLD $FW_ULTRABOLD $FW_HEAVY $FW_BLACK
$bItalic | [optional] Specifies whether to set italic font attribute, valid values: True - The attribute is set. False - The attribute is not set (Default).
$bUnderline | [optional] Specifies whether to set underlined font attribute, valid values: True - The attribute is set. False - The attribute is not set (Default).
$bStrikeOut | [optional] Specifies whether to set strikeout font attribute, valid values: True - The attribute is set. False - The attribute is not set (Default).
$iCharSet | [optional] The character set. It can be one of the following values. $ANSI_CHARSET $BALTIC_CHARSET $CHINESEBIG5_CHARSET $DEFAULT_CHARSET (Default) $EASTEUROPE_CHARSET $GB2312_CHARSET $GREEK_CHARSET $HANGEUL_CHARSET $MAC_CHARSET $OEM_CHARSET $RUSSIAN_CHARSET $SHIFTJIS_CHARSET $SYMBOL_CHARSET $TURKISH_CHARSET $VIETNAMESE_CHARSET Korean language edition of Windows: $JOHAB_CHARSET Middle East language edition of Windows: $ARABIC_CHARSET $HEBREW_CHARSET Thai language edition of Windows: $THAI_CHARSET
$iOutPrecision | [optional] The output precision. It can be one of the following values. $OUT_CHARACTER_PRECIS $OUT_DEFAULT_PRECIS (Default) $OUT_DEVICE_PRECIS $OUT_OUTLINE_PRECIS $OUT_PS_ONLY_PRECIS $OUT_RASTER_PRECIS $OUT_STRING_PRECIS $OUT_STROKE_PRECIS $OUT_TT_ONLY_PRECIS $OUT_TT_PRECIS
$iClipPrecision | [optional] The clipping precision. It can be one or more of the following values. $CLIP_CHARACTER_PRECIS $CLIP_DEFAULT_PRECIS (Default) $CLIP_DFA_DISABLE $CLIP_EMBEDDED $CLIP_LH_ANGLES $CLIP_DFA_OVERRIDE $CLIP_STROKE_PRECIS
$iQuality | [optional] The output quality. It can be one of the following values. $ANTIALIASED_QUALITY $CLEARTYPE_QUALITY $DEFAULT_QUALITY (Default) $DRAFT_QUALITY $NONANTIALIASED_QUALITY $PROOF_QUALITY
$iPitchAndFamily | [optional] The pitch and family of the font. The two low-order bits specify the pitch of the font and can be one of the following values. $DEFAULT_PITCH (Default $FIXED_PITCH $VARIABLE_PITCH The four high-order bits specify the font family and can be one of the following values. $FF_DECORATIVE $FF_DONTCARE $FF_MODERN $FF_ROMAN $FF_SCRIPT $FF_SWISS
$sFaceName | [optional] The typeface name of the font (not including style). For example, "Arial", "Tahoma", etc.
$iStyle | [optional] The style of the font. It can be one or more of the following values. $FS_REGULAR (Default) $FS_BOLD $FS_ITALIC

## Return Value

Success: | A handle to a logical font.
Failure: | 0.

## Remarks

If you request a font name that is not available on the system, the font mapper will substitute a font that has similar attributes but a different name.
When you no longer need the font, call the _WinAPI_DeleteObject() function to delete it.

## Related

_WinAPI_DeleteObject

## See Also

Search CreateFont in MSDN Library.