[Poppler-bugs] [Bug 64821] [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 11 09:24:07 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=64821

--- Comment #30 from Adrian Perez de Castro <aperez at igalia.com> ---
(In reply to comment #26)
> Comment on attachment 86684 [details] [review]
> [PATCH v8 11/15] glib: Expose inline attributes of structure elements
> 
> Review of attachment 86684 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: glib/poppler-structure-element.cc
> @@ +784,5 @@
> > +  GList *glist;
> > +  char buf[8];
> > +  Guint flags;
> > +  Guint color;
> > +};
> 
> I think this implementation could go to the core so that other frontends
> could use it. Using the goo types (or C++ ones) instead of glib ones.
> Frontends would only need to iterate a list to build their own list.

For the moment I am going to provide an updated patch for this, in a
later patch set I will move the SpanBuilder class to Poppler core.

> @@ +798,5 @@
> > + *
> > + * Return value: (transfer none) (element-type PopplerTextSpan): A #GList
> > + *    of #PopplerTextSpan structures.
> > + */
> > +GList*
> 
> GList* -> GList *. If we get a list from the core and we know its size
> beforehand, maybe we could return an array instead of a GList.

I will do this when moving SpanBuilder to Poppler core.

> @@ +819,5 @@
> > +
> > +/**
> > + * poppler_text_span_is_fixed_width:
> > + * @poppler_text_span: a #PopplerTextSpan
> > + */
> 
> This is missing a bried description, Return value and Since tags.

Also, I am renaming it to poppler_text_span_is_fixed_width_font(),
for coherency with poppler_text_span_is_serif_font().

> @@ +839,5 @@
> > +
> > +/**
> > + * poppler_text_span_is_bols:
> > + * @poppler_text_span: a #PopplerTextSpan
> > + */
> 
> Ditto.

Also, I am renaming it to poppler_text_span_is_bold_font(),
for coherency with poppler_text_span_is_serif_font().

> ::: glib/poppler-structure-element.h
> @@ +87,5 @@
> > +  gchar *text;
> > +  gchar *font_name;
> > +  gchar *link_target;
> > +  guint  flags;
> > +  guint  color; /* 0x00RRGGBB */
> 
> We could conver this to a PopplerColor when building the span to make it
> more convenient to use for users.
> 
> […]
> 
> Maybe we could make this private and add getters for all other members as
> well.

Sure thing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20131111/db29852f/attachment.html>


More information about the Poppler-bugs mailing list