Aspose.Barcode for Python via Java Generation and Recognition API docs
FontUnit Class Reference

Defines a particular format for text, including font face, size, and style attributes where size in Unit value property. More...

Inherits _MwWrapper.

Public Member Functions

None __init__ (self, Union[FontUnit, Any] source)
 
str __str__ (self)
 String representation of the FontUnit object. More...
 
str family_name (self)
 Gets the face name of this Font. More...
 
None family_name (self, str value)
 Sets the face name of this Font. More...
 
Optional[Unitsize (self)
 Gets size of this FontUnit in Unit value. More...
 
None size (self, Unit value)
 Sets size of this FontUnit in Unit value. More...
 
FontStyle style (self)
 Gets style information for this FontUnit. More...
 
None style (self, FontStyle value)
 Sets style information for this FontUnit. More...
 

Detailed Description

Defines a particular format for text, including font face, size, and style attributes where size in Unit value property.

This sample shows how to create and save a BarCode image.

generator = BarcodeGenerator(EncodeTypes.CODE_128, "123456789012345678")
generator.parameters.caption_above.text = "CAPTION ABOVE"
generator.parameters.caption_above.visible = True
generator.parameters.caption_above.font.style = FontStyle.ITALIC
generator.parameters.caption_above.font.size.point = 25

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self,
Union[FontUnit, Any]  source 
)

Member Function Documentation

◆ __str__()

str __str__ (   self)

String representation of the FontUnit object.

◆ family_name() [1/2]

str family_name (   self)

Gets the face name of this Font.

◆ family_name() [2/2]

None family_name (   self,
str  value 
)

Sets the face name of this Font.

◆ size() [1/2]

Optional[Unit] size (   self)

Gets size of this FontUnit in Unit value.

Raises: IllegalArgumentException: if the Size parameter value is less than or equal to 0.

◆ size() [2/2]

None size (   self,
Unit  value 
)

Sets size of this FontUnit in Unit value.

Raises: IllegalArgumentException: if the Size parameter value is less than or equal to 0.

◆ style() [1/2]

FontStyle style (   self)

Gets style information for this FontUnit.

◆ style() [2/2]

None style (   self,
FontStyle  value 
)

Sets style information for this FontUnit.