Text SetFontName: Difference between revisions
From MultiCharts
(Created page with "Assigns the specified font to a text object with the specified ID number; returns a value of -2 if the specified object ID number is invalid. Any font in the Fonts folde...") |
No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Assigns the specified font to a text object with the specified ID number | Assigns the specified font to a text object with the specified ID number. | ||
Any font in the | Text_SetFontName returns a value of -2 if the specified object ID number is invalid. | ||
Any font in the ''Fonts'' folder can be used; the folder is accessible from the ''Control Panel'' in Windows operating system. | |||
== Usage == | |||
<syntaxhighlight>Text_SetFontName(ObjectID,"FontName")</syntaxhighlight> | <syntaxhighlight>Text_SetFontName(ObjectID, "FontName")</syntaxhighlight> | ||
Where: | |||
:'''ObjectID''' - a numerical expression specifying the object ID number. | |||
:'''FontName''' - a string expression specifying the font name. | |||
== Notes == | |||
An object-specific ID number is returned by [[Text_New]] when the text object is created. | * An object-specific ID number is returned by [[Text_New]] when the text object is created. | ||
* Use [[Text_GetFontName]] to get the font name for a specific text object. | |||
== Example == | |||
Assign font Verdana to the text object with the ID number of 3: | Assign font Verdana to the text object with the ID number of 3: | ||
<syntaxhighlight>Value1=Text_SetFontName(3,"Verdana");</syntaxhighlight> | <syntaxhighlight>Value1=Text_SetFontName(3, "Verdana");</syntaxhighlight> | ||
[[Category:Text Drawing]] | [[Category:Text Drawing]] |
Latest revision as of 10:41, 22 January 2018
Assigns the specified font to a text object with the specified ID number.
Text_SetFontName returns a value of -2 if the specified object ID number is invalid.
Any font in the Fonts folder can be used; the folder is accessible from the Control Panel in Windows operating system.
Usage
Text_SetFontName(ObjectID, "FontName")
Where:
- ObjectID - a numerical expression specifying the object ID number.
- FontName - a string expression specifying the font name.
Notes
- An object-specific ID number is returned by Text_New when the text object is created.
- Use Text_GetFontName to get the font name for a specific text object.
Example
Assign font Verdana to the text object with the ID number of 3:
Value1=Text_SetFontName(3, "Verdana");