TextRenderer
Resumo geral
TextRenderer é uma classe em Aspose.Font FOSS para Python.
Coloca texto usando as métricas de glifos e pares opcionais de núcleos.
Esta classe fornece 5 métodos para trabalhar com objetos TextRenderer em programas Python. Os métodos disponíveis incluem: layout, layout_glyphs, render_png, render_rgb, render_svg. Todos os membros do público são acessíveis a qualquer aplicação Python após instalar o pacote Aspose.Font FOSS for Python.
Métodos de avaliação
| Assinatura | Descrição: |
|---|---|
layout(font: Font, text: str, size: float, kern: bool) → TextLayout | Resolva texto para GlyphIds e depois chama layout_glyphs. |
layout_glyphs(font: Font, glyph_ids: list[GlyphId], size: float, kern: bool) → TextLayout | Colocar identificadores de glifos pré-resolvidos. |
| `render_rgb(font: Font, text: str, size: float, color: tuple[int, int, int], background: tuple[int, int, int], padding: int, antialias: bool, _fixed_canvas: tuple[int, int] | None, _fixed_baseline: float |
render_png(font: Font, text: str, size: float, color: tuple[int, int, int], background: tuple[int, int, int], padding: int, antialias: bool) → bytes | Render texto de linha única para bytes PNG via rasterização de software. |
render_svg(font: Font, text: str, size: float, color: tuple[int, int, int], background: tuple[int, int, int], padding: int) → bytes | Render texto de linha única em bytes SVG usando contornos vectoriais. |