Summary: | fontName in Poppler::TextBox | ||
---|---|---|---|
Product: | poppler | Reporter: | couronne <olivier.couronne> |
Component: | qt4 frontend | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | CC: | luke-jr+freedesktopbugs, olivier.couronne |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
couronne
2010-03-19 07:17:04 UTC
What is your use case? Would you be able to contribute a patch? (In reply to comment #1) > What is your use case? > > Would you be able to contribute a patch? > In qt4/src/poppler-page.cc, in QList<TextBox*> Page::textList(Rotation rotate) const, in for (int i = 0; i < word_list->getLength(); i++) { after text_box->m_data->charBBoxes.reserve(word->getLength()); put : text_box->fontName=QString(word->getFontName()->getCString()); ***************************************** In poppler-qt4.h in the TextBox class add private: QString fontName; public: QString getFontName(); *************************************** Use Case: I want to parse scientific pdf articles, and the font would be a useful information. That patch is obviously a no go for a lot of reasons, moreover if we are going to give that info i'd prefer to return a Poppler::FontInfo instead of a string with the font name. The problem is that extracting this info is a bit slow and the font info is probably not used by lots of people so i wonder if you'd be happy enough if we added a new class TextBoxFont (or something like that) and a new method that returned a list of them in Poppler::Page (In reply to comment #3) > That patch is obviously a no go for a lot of reasons, moreover if we are going > to give that info i'd prefer to return a Poppler::FontInfo instead of a string > with the font name. The problem is that extracting this info is a bit slow and > the font info is probably not used by lots of people so i wonder if you'd be > happy enough if we added a new class TextBoxFont (or something like that) and a > new method that returned a list of them in Poppler::Page Yes it would be great having a new class TextBoxFont as you said and the new method returning a list of them. With this feature I would compile my application for Windows :) Is there a way to get this information yet? I'd like to detect italic and bold... -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/8. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.