GSoC :: Coding Period – Phase Three (July 8th to August 6th): Create and parse DA string in poppler-core and font family implementation

Hi everyone,

The coding period phase three is now completed. After the second evaluation, Poppler’s maintainer Albert Astals Cid commented on my bug report stating that the current parsing and creation of DA string is handled by Qt5 frontend whereas the API should be changed and the creation and parsing of the DA string and font color should be the concern of poppler-core.

So I needed to shift my plans for the font family implementation in Poppler and I began to work on correcting the creation and parsing of DA. Both the Qt5 frontend and the Core were modified and after a series of reviews, I finally submitted the patch co-authored by my mentor Tobias Deiminger

Meanwhile, my mentor was sending me the emails and was pushing his researched results into the scratch repo regarding the font family implementation in Poppler. In the last days when I completed with the font color and DA creation and parsing patch, I began to hack into the font family. I have written the full post about my own understanding and experiment here: FreeText Annotation :: Font family implementation in Poppler. My experimental patch can be found here.

After incorporating D13203 and both the patches, this is how it finally works:

[gif unavailable]

  1. It adds the typewriter tool to the annotation toolbar
  2. You can select a font color for the annotation’s text
  3. You should choose a Base-14 font and it would be correctly displayed

As you can see in the above image that you are able to make the different base-14 font for the different typewriter annotations text within the same document when loaded but neither it writes the font dictionary into the PDF document nor you will get the same fonts on reloading the document. It falls to the default font “Helvetica”.

But this experimental patch is very promising for the intuition of accurate solution and the support for the embedded fonts.