Bug 477108 - Font and text issues with Digitally Sign feature for non-english users
Summary: Font and text issues with Digitally Sign feature for non-english users
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 23.08.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-16 18:10 UTC by igor.machado@gmail.com
Modified: 2023-11-23 23:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Okular does not change language (79.96 KB, image/png)
2023-11-17 13:32 UTC, igor.machado@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description igor.machado@gmail.com 2023-11-16 18:10:24 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

The feature Digitally Sign on Okular by default writes a "Signed by" text, which is not configurable, not even its fonts. This configuration/personalization is important for government applications, where text must be different. Another bad thing is for  non-english users. My Okular with flatpak shows all of this in English, even when I configure translation for Portuguese:
$ flatpak info org.kde.okular.Locale 
            ID: org.kde.okular.Locale
           Ref: runtime/org.kde.okular.Locale/x86_64/stable
          Arch: x86_64
        Branch: stable
        Origin: flathub
    Collection: org.flathub.Stable
  Installation: user
     Installed: 336,9 kB

        Commit: f9e1df132a8c2a24eb88732d9426647ec0e6f59b6a34a36a236c2c997dd087ea
        Parent: c7920207b64284df7ef58c560be2093d39455e0a1f0b268dc5ed572aeee59cde
       Subject: Update 4 modules (7b47285c)
          Date: 2023-11-09 22:17:13 +0000
Subdirectories: /en,/pt

But still no hope to have it in Portuguese, or to configure its texts and fonts. Font is very big, and having font Helvetica                            CID Type 0C (OT)  Identity-H  (as per command $ pdffonts) breaks the signature rendering for windows users (I put an stamp on the back of the signature, with portuguese sayings, that sort of mitigate such issues... but still, it's part english and part portuguese, with giant strange fonts).



STEPS TO REPRODUCE
1.  Install okular on flatpack, ubuntu 22.04 on computer with english and portuguese languages
2. Check locale on flatpak (it displays /en and /pt)

OBSERVED RESULT
It continues in English. No personalization is possible for signature text.

EXPECTED RESULT
It would render in Portuguese the signature, or allow personalization for signature text.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu 22.04
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Sune Vuorela 2023-11-16 20:18:08 UTC
The signed by-text is marked as translated; I'm not sure how translations for flatpacks works.
https://invent.kde.org/graphics/okular/-/blob/master/generators/poppler/generator_pdf.cpp#L1378

I don't know if Albert has any knowledge here, else I think we should close it as downstream issue with the flatpacks

The visual appearance is already duplicated by 2-4 other issues, but not yet any coherent solutions have been found, and all suggestions pulls in different directions.
Comment 2 igor.machado@gmail.com 2023-11-17 02:43:07 UTC
Ok Sune, thanks for the feedback. I opened this issue because I couldn't find any other one, but I was imagining that others would exist somewhere else.
Regarding flatpak, that's strange indeed, and perhaps it's not related to okular itself... For me, on Ubuntu 22.04, I'm forced to use flatpak to have Stamps on digital signatures, otherwise the system version is too old. Maybe on system version the translation would work... I'll try to find a way to upgrade my native system one.
Thanks!
Comment 3 Sune Vuorela 2023-11-17 07:52:10 UTC
(In reply to igor.machado@gmail.com from comment #2)
> Ok Sune, thanks for the feedback. I opened this issue because I couldn't
> find any other one, but I was imagining that others would exist somewhere
> else.
> Regarding flatpak, that's strange indeed, and perhaps it's not related to
> okular itself... For me, on Ubuntu 22.04, I'm forced to use flatpak to have
> Stamps on digital signatures, otherwise the system version is too old. Maybe
> on system version the translation would work... I'll try to find a way to
> upgrade my native system one.
> Thanks!

https://bugs.kde.org/show_bug.cgi?id=443403 
https://bugs.kde.org/show_bug.cgi?id=474222
https://bugs.kde.org/show_bug.cgi?id=473433

and iirc a few more are variations of "visual representation of signature filed is ugly. please make it pretty."
Comment 4 Sune Vuorela 2023-11-17 11:43:32 UTC
(In reply to igor.machado@gmail.com from comment #2)
> Regarding flatpak, that's strange indeed, and perhaps it's not related to
> okular itself... For me, on Ubuntu 22.04, I'm forced to use flatpak to have
> Stamps on digital signatures, otherwise the system version is too old. Maybe
It is claimed to work.

Signed by: should be translated into Assinado Por: according to my reading of the translation data.
Comment 5 igor.machado@gmail.com 2023-11-17 13:32:59 UTC
Created attachment 163239 [details]
Okular does not change language
Comment 6 Albert Astals Cid 2023-11-20 23:04:28 UTC
(In reply to igor.machado@gmail.com from comment #5)
> Created attachment 163239 [details]
> Okular does not change language

What are you trying to show in that dialog and what does it have to do with your report?

Are you *not* running your system in portuguese and then trying to force okular to run in flatpak and in portuguese with that option?
Comment 7 igor.machado@gmail.com 2023-11-21 02:32:12 UTC
Exactly that. My impression of that box is that it was supposed to change the language of the software... perhaps I misunderstood that.
Indeed, for programmers, most use english based systems, to prevent bugs (for example, AppArmor has bugs  if system is run on portuguese) and also to make it easier to follow command line tutorials (some of them change commands in other languages, what breaks scripts).
So, for graphic interface, we mostly change the language of each application directly.
If that box is not supposed to change the language of okular, then it explains why I'm stuck at english "signed by" field.
Comment 8 igor.machado@gmail.com 2023-11-21 02:45:48 UTC
Thanks for the help @Sune and @Albert.
For me, this issue can be closed.
It's hard to replicate, and maybe it's something related to flatpak, I don't know... and I don't want to take more time of yours. The other issues will help me when fixed, as signature personalization is more of a problem to me than language, in the current moment.
I appreciate all the help! Best regards
Comment 9 Albert Astals Cid 2023-11-23 23:13:40 UTC
(In reply to igor.machado@gmail.com from comment #7)
> Exactly that. My impression of that box is that it was supposed to change
> the language of the software...

It should, and if it doesn't, that's a bug in the flatpak implementation, but you can't say "the signature is not working", it's just that the language didn't change.