The coding period phase three is now completed. After the second evaluation, Poppler’s maintainer Albert Astals Cid commented on my bug report https://bugs.freedesktop.org/show_bug.cgi?id=107151#c3 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: https://bugs.freedesktop.org/attachment.cgi?id=140963.
Meanwhile, my mentor was sending me the mails 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, DA creation and parsing patches, 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:
- You can select a font color for the annotation’s text
- You should choose a Base-14 font and it will be correctly displayed
As you can see in the above image that you are able to use Times New Roman Regular font within the annotation but neither this patch writes the font dictionary into the PDF document nor you will get the same font on reloading the document. It falls back to the default Noto Sans in this case.
This experimental patch is very promising for the intuition of accurate solution and supporting the embedded fonts.