|
TextSetFontThe function sets the font for displaying the text using drawing methods and returns the result of that operation. Arial font with the size -120 (12 pt) is used by default.
Parameters name [in] Font name in the system or the name of the resource containing the font or the path to font file on the disk. size [in] The font size that can be set using positive and negative values. In case of positive values, the size of a displayed text does not depend on the operating system's font size settings. In case of negative values, the value is set in tenths of a point and the text size depends on the operating system settings ("standard scale" or "large scale"). See the Note below for more information about the differences between the modes. flags=0 [in] Combination of flags describing font style. orientation=0 [in] Text's horizontal inclination to X axis, the unit of measurement is 0.1 degrees. It means that orientation=450 stands for inclination equal to 45 degrees. Returned value Returns true if the current font is successfully installed, otherwise false. Possible code errors:
Note If "::" is used in font name, the font is downloaded from EX4 resource. If name font name is specified with an extension, the font is downloaded from the file, if the path starts from "\" or "/", the file is searched relative to MQL4 directory. Otherwise, it is searched relative to the path of EX4 file which called TextSetFont() function. The font size is set using positive or negative values. This fact defines the dependence of the text size from the operating system settings (size scale).
The flags can be used as the combination of style flags with one of the flags specifying the font width. Flag names are shown below. Flags for specifying font style
Flags for specifying font width
See also Resources, ResourceCreate(), ResourceSave(), TextOut() |