[librsvg: 1/5] Note on Pango internals for emitting text to PDF
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/5] Note on Pango internals for emitting text to PDF
- Date: Wed, 27 Oct 2021 00:07:40 +0000 (UTC)
commit c9d3265890c6fcd4737ee10e3745c7d1563a7135
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Oct 26 17:56:23 2021 -0500
Note on Pango internals for emitting text to PDF
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/623>
devel-docs/text-layout.md | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
---
diff --git a/devel-docs/text-layout.md b/devel-docs/text-layout.md
index 5e999c7c2..6f0f52c0d 100644
--- a/devel-docs/text-layout.md
+++ b/devel-docs/text-layout.md
@@ -182,6 +182,32 @@ Although currently Pango deals with underlining, it may be necessary to do that
instead - I am not sure yet how `textPath` or individually-positioned `x/y/dx/dy/rotate`
interact with underlining.
+### Pango internals
+
+```
+/**
+ * pango_renderer_draw_glyph_item:
+ * @renderer: a `PangoRenderer`
+ * @text: (nullable): the UTF-8 text that @glyph_item refers to
+ * @glyph_item: a `PangoGlyphItem`
+ * @x: X position of left edge of baseline, in user space coordinates
+ * in Pango units
+ * @y: Y position of left edge of baseline, in user space coordinates
+ * in Pango units
+ *
+ * Draws the glyphs in @glyph_item with the specified `PangoRenderer`,
+ * embedding the text associated with the glyphs in the output if the
+ * output format supports it.
+ *
+ * This is useful for rendering text in PDF.
+ * ...
+ */
+```
+
+Note that embedding text in PDF to make it selectable involves passing
+a non-null `text` to pango_renderer_draw_glyph_item(). We'll have to
+implement this by hand, probably.
+
### Wrapped text in a content area
This roadmap does not consider the implementation fo wrapped text yet.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]