Font(Mode, Value)

Changes the current font. For best results, use TrueType fonts. To apply changes, use the TextOut(X, Y, Text, transparent=True/False) method.

Parameters
  • Mode. Specifies changes to apply to the font. This parameter can take one of the following WideString values:
    • Name. Changes the current font. Use the Value parameter to specify the name of the font to use.
    • Size. Changes the font size. Use the Value parameter to specify the font size.
    • Color. Changes the font color. Use the Value parameter to specify the font color.
    • Bold. Toggles between bold and normal font. Use the Value parameter to apply bold (true) or normal (false) font.
    • Italic. Toggles between italic and normal font. Use the Value parameter to apply italic (true) or normal (false) font.
    • Underline. Toggles between underlined and normal font. Use the Value parameter to apply underlined (true) or normal (false) font.
    • Strikeout. Adds or removes a line through the middle of characters. Use the Value parameter to add a line (true) or remove the line (false).
    • Rotate. Rotates the font. This parameter may not work for some fonts.
  • Value. Specifies the value for the Mode parameter. This parameter accepts a WideString value.
Examples
Copy
Graphic.Font('Name','Times New Roman');
Graphic.Font('Color','Blue');
Graphic.Font('Size','24');
Graphic.Font('Bold','True');
Graphic.Font('StrikeOut','True');
Graphic.Font('Rotate','45');
<%
Graphic = CRM.GetBlock("graphic");
Graphic.LoadImage("go.gif");
Graphic.ImageWidth = 130;
Graphic.ImageHeight = 50;
Graphic.vSpace = 30;
Graphic.hSpace = 30;
Graphic.Border = 3;
Graphic.Font('Name','Times New Roman');
Graphic.Font('Color','Blue');
Graphic.Font('Size','24');
Graphic.Font('Bold','True');
Graphic.Font('StrikeOut','True');
CRM.AddContent(Graphic.execute());
Response.Write(CRM.GetPage());
%>