raygeo.geo.shape.text
FontConfig
bold
bold: bool
extra
extra: dict
family
family: str
font_family
font_family: str
font_size
font_size: float
italic
italic: bool
size
size: float
copy()
copy() -> FontConfig
| Parameter | Type | Description |
|---|---|---|
| Returns | FontConfig |
from_dict()
from_dict(data: Optional[dict]) -> FontConfig
| Parameter | Type | Description |
|---|---|---|
data | Optional[dict] | |
| Returns | FontConfig |
get_font_metrics()
get_font_metrics() -> tuple[float, float, float]
| Parameter | Type | Description |
|---|---|---|
| Returns | tuple[float, float, float] |

Ascent, descent, and height above the baseline
get_text_position()
get_text_position(text: str, index: int) -> float
| Parameter | Type | Description |
|---|---|---|
text | str | |
index | int | |
| Returns | float |
get_text_width()
get_text_width(text: str) -> float
| Parameter | Type | Description |
|---|---|---|
text | str | |
| Returns | float |

Text advance width and cursor position markers
to_dict()
to_dict() -> dict
| Parameter | Type | Description |
|---|---|---|
| Returns | dict |
Functions
text_to_geometry()
text_to_geometry(
text: str,
font_config: geo.shape.text.FontConfig,
) -> geo.Geometry
Convert a text string to a Geometry containing the glyph outlines.
| Parameter | Type | Description |
|---|---|---|
text | str | |
font_config | geo.shape.text.FontConfig | |
| Returns | geo.Geometry |

Glyph outlines rendered as vector geometry