Field SetFont Function. Sets the font and font size to be used for text. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

Sets the font and font size to be used for text

 

   
Syntax  

[C#]
vitual void SetFont(FontObject font, double size)

[Visual Basic]
Sub SetFont(font As FontObject, size As Double)

 

   

Params
 
Name Description
font The font to be assigned to the field.
size The font size to be assigned to the field.

 

   

Notes
 

Sets the font and font size to be used for text.

This function works by changing the DefaultAppearance for the field using the specified FontObject and size.

Properties such ase the TextFont and TextSize get the effective value which may be inherited. Calling this funtion sets the value on this item itself which will override any inherited value.

Passing a font value of null will remove both the font and size from the item itself though a value may be still be present if it is inherited from a parent field or from document defaults.

A zero size font indicates that the font should scale so that it fits the size of the field. Negative font heights appear the same as positive ones but are best avoided as they are likely to cause confusion.

The appearance of the field is not updated until you change the Value or call UpdateAppearance.

 

   

Example
 

None.