summaryrefslogtreecommitdiff
path: root/cpp/poppler-private.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/poppler-private.h')
-rw-r--r--cpp/poppler-private.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/cpp/poppler-private.h b/cpp/poppler-private.h
index 83e46319..4ec159a8 100644
--- a/cpp/poppler-private.h
+++ b/cpp/poppler-private.h
@@ -73,23 +73,17 @@ void delete_all(const Collection &c)
}
class font_info;
-struct text_box_data
+struct text_box_font_info_data
{
- ~text_box_data();
-
- ustring text;
- rectf bbox;
- int rotation;
- std::vector<rectf> char_bboxes;
- bool has_space_after;
+ ~text_box_font_info_data();
- std::vector<text_box::writing_mode_enum> wmodes;
double font_size;
+ std::vector<text_box::writing_mode_enum> wmodes;
/*
* a duplication of the font_info_cache created by the
* poppler::font_iterator and owned by the poppler::page
- * object. Its lifetime might differ from that of text_box
+ * object. Its lifetime might differ from that of text_box
* object (think about collecting all text_box objects
* from all pages), so we have to duplicate it into all
* text_box instances.
@@ -97,7 +91,7 @@ struct text_box_data
std::vector<font_info> font_info_cache;
/*
- * a std::vector from the glyph index in the current
+ * a std::vector from the glyph index in the owner
* text_box to the font_info index in font_info_cache.
* The "-1" means no corresponding fonts found in the
* cache.
@@ -105,6 +99,20 @@ struct text_box_data
std::vector<int> glyph_to_cache_index;
};
+class font_info;
+struct text_box_data
+{
+ ~text_box_data();
+
+ ustring text;
+ rectf bbox;
+ int rotation;
+ std::vector<rectf> char_bboxes;
+ bool has_space_after;
+
+ std::unique_ptr<text_box_font_info_data> text_box_font;
+};
+
}
#endif