ImageGear .NET v25.1 - Updated
fontName Property

ImageGear.Web.UI Library > ImageGear.Web.UI Namespace > Mark class : fontName Property
Specifies the font to use for text marks.
Syntax
ASP.NET Ajax Javascript (Specification) 
function get_fontName() : String
function set_fontName(value : String)
ASP.NET Ajax Javascript (Usage) 
var resultVar = instanceOfMark.get_fontName();
Example

This JavaScript code will create the mark shown in the image on this page.

// Create a new text mark.
var mark = new ImageGear.Web.UI.Mark(ImageGear.Web.UI.MarkType.Text);

// Set various properties.
mark.set_rectangle({ x: 100, y: 150, width: 275, height: 75 });
mark.set_text('This is a text mark.\nIt has two lines of text.');
mark.set_fontName('Arial');
mark.set_fontSize(14);
mark.set_fontStyle(ImageGear.Web.UI.FontStyle.Underline | ImageGear.Web.UI.FontStyle.Italic);
mark.set_textHorizontalAlignment(ImageGear.Web.UI.HorizontalAlignment.Center);
mark.set_textColor('#7070ff');

// Add the mark to the page.
// Adding it after setting the properties avoids a lot of needless markChanged events.
$find('PageView1').get_artPage().addMark(mark);
Remarks

This property specifies the font to use for text marks. The normal HTML and CSS rules regarding substitution for unavailable fonts apply to this property. If you change the value of this property, this object will raise its propertyChanged event.

This figure shows a text mark whose text is drawn in an Arial font.

Mark types: This property is valid for Text marks.
Valid values: Any CSS Font name.
Default value: 'Arial'

ImageGear for .NET name: FontName
NotateXpress (version 10) name: TextFont

See Also

Reference

Mark class
Mark Members