LOGFONT
Members
_Colour
desc: The colour of the controls text in BGR format.
type: number
default: 0
CharSet
ClipPrecision
desc: How characters that are partially outside the bounds of the font are handled. See link for details.
type: number
default: 0
link: link
Colour
desc: The colour of the controls text in RGB format as a hex string.
type: string
default: ""
Escapement
desc: The angle between the text direction and the x-axis of the screen in 1/10 degree. See link for details.
type: number
default: 0
link: link
FaceName
desc: The name of the font that was applied to the control. See the link for common fonts.
type: string
link: link
guiHwnd
desc: The hwnd of the parent window of the control associated with this instance.
type: hwnd|false
default: false
Height
desc: The height of the characters in the font. See link for details.
type: number
default: 0
link: link
HFONT
desc: The handle to the font associated with the control.
type: HFONT
default: 0
Hwnd
desc: The hwnd of the control that is associated with this instance.
type: hwnd
Italic
desc: Whether or not the font is italic.
type: bool
default: false
Orientation
desc: The angle between the bottom of the charats and the x-axis of the screen in 1/10 degree.
type: number
default: 0
OutPrecision
desc: How precisely the drawn characters most match the set font characteristics. See link for details.
type: number
default: 0
link: link
PitchAndFamily
desc: The two low-order bits specify the pitch of the font and the last four bits specify the family. See link for details.
type: number
default: 0
meta: [composite]
link: link
Quality
StrikeOut
desc: Whether or not the font is drawn with a line through it.
type: bool
default: false
Underline
desc: Whether or not the font is drawn with a line underneath it.
type: bool
default: false
Weight
Width
desc: The average width of characters in the font. See link for details.
type: number
default: 0
link: link
Methods
__GetColour
__GetColour()
Retrives the colour that the parent window would paint the text as returned by WM_CTLCOLORSTATIC
.
__GetDC
__GetDC()
Retrives the DC handle of the associated control.
return value
desc: The DC handle of the associated control.
type: HDC
__New
__New(Hwnd, guiHwnd := false)
Constructor.
parameters
name: Hwnd
desc: The hwnd of the control that will be associated with this instance.
type: hwnd
name: guiHwnd
desc: The hwnd of the parent window.
type: hwnd|false
default: false
return value
desc: A new GridGUI.LOGFONT
instance.
type: GridGUI.LOGFONT
__ReleaseDC
__ReleaseDC(hDC)
Releases a device context.
parameters
name: hDC
desc: The handle to the device context that will be released.
type: HDC
GetData
GetData(ByRef buff)
Retrieves the font characteristics from the LOGFONT structure.
parameters
GetDimensionsInPixels
GetDimensionsInPixels(str)
Returns the bounding box of a string when written using the current font and style.
parameters
name: str
desc: The string to calculate the bounding box of.
type: string
return value
desc: The bounding box of str
.
type: GridGUI.Position
PixelHeight
PixelHeight(str)
Returns the needed height in pixels of a string using the current font and style.
parameters
name: str
desc: The string to calculate the height of.
type: string
return value
desc: The needed height of str
.
type: number
PixelWidth
PixelWidth(str)
Returns the needed width in pixels of a string using the current font and style.
parameters
name: str
desc: The string to calculate the width of.
type: string
return value
desc: The needed width of str
.
type: number
ToOptions
ToOptions()
Converts the font characteristics to a string that can be used in Gui, Font
.
return value
desc: The font characteristics as an ahk font option string.
type: string
ToStr
ToStr()
Converts the object to a string.
return value
desc: A string representing this GridGUI.LOGFONT
.
type: string
UpdateFont
UpdateFont()
Retrieves the font from the control and the colour for the parent window.