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 BaseJavaClass.

Public Member Functions

None __init__ (self, Union[FontUnit, Any] source)
 
str getFamilyName (self)
 Gets the face name of this Font. More...
 
Optional[UnitgetSize (self)
 Gets size of this FontUnit in Unit value. More...
 
FontStyle getStyle (self)
 Gets style information for this FontUnit. More...
 
None init (self)
 
None setFamilyName (self, str value)
 Sets the face name of this Font. More...
 
None setStyle (self, FontStyle value)
 Sets style information for this FontUnit. More...
 
- Public Member Functions inherited from BaseJavaClass
None __init__ (self, javaClass)
 
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Additional Inherited Members

- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

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 = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128,"123456789012345678")
generator.getParameters().getCaptionAbove().setText("CAPTION ABOOVE")
generator.getParameters().getCaptionAbove().setVisible(True)
generator.getParameters().getCaptionAbove().getFont().setStyle(Generation.FontStyle.ITALIC)
generator.getParameters().getCaptionAbove().getFont().getSize().setPoint(25)

Constructor & Destructor Documentation

◆ __init__()

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

Member Function Documentation

◆ getFamilyName()

str getFamilyName (   self)

Gets the face name of this Font.

◆ getSize()

Optional[Unit] getSize (   self)

Gets size of this FontUnit in Unit value.

Exceptions
IllegalArgumentExceptionThe Size parameter value is less than or equal to 0.

◆ getStyle()

FontStyle getStyle (   self)

Gets style information for this FontUnit.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

◆ setFamilyName()

None setFamilyName (   self,
str  value 
)

Sets the face name of this Font.

◆ setStyle()

None setStyle (   self,
FontStyle  value 
)

Sets style information for this FontUnit.