ImageFontSize
ClassEnumSource
ImageFontSize.h1 = "h1"
ImageFontSize.h2 = "h2"
ImageFontSize.h3 = "h3"
ImageFontSize.h4 = "h4"
Size of the text in the image.
This font size is high-level. When renderin the text, the pixel size of the text will be determined by this size and the number of characters.
Enums
| Name | Type | Value |
|---|---|---|
h1 | str | "h1" |
h2 | str | "h2" |
h3 | str | "h3" |
h4 | str | "h4" |
Methods
from_str
v_1: Self = ImageFontSize.from_str(val: str | Self)
Use a str to define this size.
Requires
| Name | Type | Required | |
|---|---|---|---|
val | str | Self | Should be h1-h4. |
Returns
| Name | Type | |
|---|---|---|
v_1 | Self | The size defined from val. |
get_line_size
(v_1: int, v_2: int) = self.get_line_size(n_text: int)
Get the sizes of the text.
Requires
| Name | Type | Required | |
|---|---|---|---|
n_text | int | The length of the text to be rendered. |
Returns
| Name | Type | |
|---|---|---|
v_1 | int | The number of characters for each line. |
v_2 | int | The pixel font size. |