TextRenderer
TextRenderer
अवलोकन
TextRenderer यह एक क्लास है Aspose.Font FOSS के लिए Python।.
एक फ़ॉन्ट के ग्लिफ मीट्रिक और वैकल्पिक कोर जोड़े का उपयोग करके पाठ निकालता है।.
इस कक्षा में पायथन प्रोग्रामों में TextRenderer वस्तुओं के साथ काम करने के लिए 5 तरीके प्रदान किए जाते हैं।. उपलब्ध तरीकों में शामिल हैं: layout, layout_glyphs, render_png, render_rgb, render_svg. सभी सार्वजनिक सदस्य किसी भी Python अनुप्रयोग के लिए उपलब्ध हैं Aspose.Font FOSS को स्थापित करने के बाद Python पैकेज।.
विधियाँ
| Signature | Description |
|---|---|
layout(font: Font, text: str, size: float, kern: bool) → TextLayout | पाठ को GlyphIds में हल करें और फिर layout_glyphs कॉल करें।. |
layout_glyphs(font: Font, glyph_ids: list[GlyphId], size: float, kern: bool) → TextLayout | पहले से हल ग्लिफ आईडी को हटा दें।. |
| `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 | एकल-लाइन पाठ को सॉफ्टवेयर रस्टर के माध्यम से PNG बाइट्स में रिंड करें।. |
render_svg(font: Font, text: str, size: float, color: tuple[int, int, int], background: tuple[int, int, int], padding: int) → bytes | एकल-लाइन पाठ को SVG बाइट्स में रेंडर करें, वेक्टर आउटलिंग का उपयोग करके।. |