---
title: "TextModule"
description: "API documentation for TextModule"
url: https://developer.disguise.one/python-api/docs/textmodule/
---

# TextModule

Base class (inherits properties and methods): _[Module](/python-api/docs/module#module)_

## Properties

#### **font** : _[TextFont](/python-api/docs/textfont#textfont)_

Use default font or load .ttf font file in /objects/textfonts

_UserName: Font_

#### **fontSize** : _int_

Size of the text (in pixel)

_UserName: Font size_

#### **hAlignment** : _int_

Horizontal alignment for text

_Options: {0: ‘Left’, 1: ‘Center’, 2: ‘Right’}  
UserName: Horizontal alignment_

#### **text** : _str_

Text to display

_UserName: Text_

#### **vAlignment** : _int_

Vertical alignment for text

_Options: {0: ‘Top’, 1: ‘Center’, 2: ‘Bottom’}  
UserName: Vertical alignment_

#### **xPosition** : _int_

Horizontal position offset from alignment (in pixel)

_UserName: Position X_

#### **yPosition** : _int_

Vertical position offset from alignment (in pixel)

_UserName: Position Y_

## Constructors

#### **\_\_init\_\_**(self)
