Skip to content

Fix showing of characters which need new font in forms

Marek Kasik requested to merge mkasik/poppler:diacritics-in-forms into master

When entering some Czech characters into forms they are not shown correctly in Evince.

For example when entering "Česká Republika" into "W-8 BEN" form from https://www.irs.gov/forms-pubs/about-form-w-8-ben, the first character is not shown. This is caused by the fact that Form::ensureFontsForAllCharacters() assumes that input text has Unicode marker but it does not have it in this case.

Another issue is with "ščšč" and "čščš" after fixing the previous one (also before that but this time it is better). "ščšč" is shown as "šč□č" and "čščš" as "č□č□". This happens because font is not updated at CairoOutputDev in Q operator. So for the first case, "š" is shown with default font as it is in WinAnsi encoding, the "č" is shown with newly added font but next "š" shows the glyph for missing glyph as the font was not updated in Q operator which was added due to the extra font.

The 2 commits fixes these issues for me.

Thank you very much for adding support for the characters outside of standard encodings!

Merge request reports