Bug 445674 - Okular: Typewriter cannot rendered non-Latin characters. (but the annotation created by other PDF reader can be rendered by Okular...)
Summary: Okular: Typewriter cannot rendered non-Latin characters. (but the annotation ...
Status: RESOLVED DUPLICATE of bug 305534
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: unspecified
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-18 04:57 UTC by ono
Modified: 2021-11-18 07:16 UTC (History)
2 users (show)

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


Attachments
This single PDF file contains both annotations created/edited by Okular and Xodo. They are rendered incorrectly in Okular, but can be rendered in Xodo correctly. (2.54 MB, application/pdf)
2021-11-18 04:57 UTC, ono
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ono 2021-11-18 04:57:45 UTC
Created attachment 143682 [details]
This single PDF file contains both annotations created/edited by Okular and Xodo. They are rendered incorrectly in Okular, but can be rendered in Xodo correctly.

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
***
(1.) In Typewriter input box, non-Latin characters can be entered though, but will not be rendered in document. Cyrillic alphabets and Japanese Kanji & Hiragana are all disappeared:

https://invent.kde.org/graphics/okular/uploads/71e69e3298defce8cd9d2163a11c1104/Screenshot_20211118_113122.png

(2.) Even though set font with `Noto Sans CJK JP` (Which should include Latin, Cyrillic, Greek, Japanese Kanji+Hiragana+Katakana), the characters still cannot be showed:

https://invent.kde.org/graphics/okular/uploads/bce8badba4985a8b6f03edce50843722/Screenshot_20211118_113837.png

(3.) The more interesting is, open the annotated file with another PDF reader (Xodo for Android), the annotation created by Okular can be read & rendered correctly:

https://invent.kde.org/graphics/okular/uploads/18c71a48ac48b81038c5dd1a80caaa2a/Screenshot_20211118-114739335.jpg

(4.) The most interesting is, if:
  (a) Create text annotation with some other proprietary PDF reader (for example, Xodo PDF Reader). **OR**
  (b) Process the Okular-annotated *.pdf file with `pdftk` (for example: `pdftk okular-annotated.pdf cat 1 output pdftk-processed-okular-annotated.pdf`)
The non-Latin text annotations are visible in Okular.

STEPS TO REPRODUCE
(In Okular)
1. Alt+5 to use Typewriter to create a text annotation.
2. Enter Latin & non-Latin characters into Typewriter.
3. The non-Latin characters will become invisible.
4. Save file.

(In Xodo PDF Reader)
5. Open the Okular-saved-file with Xodo PDF Reader, 
  (a) Create any text annotation, **OR** 
  (b) Edit the existed Typewriter annotations created by Okular 
6. Save file.

(In Okular)
7. Open the Xodo-saved-file with Okular, the non-Latin annotations are rendered CORRECTLY.
8. HOWEVER, if modifying these correct annotations via Okular, the non-Latin characters will become invisible again...

OBSERVED RESULT

I tested with Xodo and `pdftk`, as long as the PDF files containing Okular-created annotations are saved by them, all non-Latin characters are all rendered correctly.

EXPECTED RESULTS

Okular can **create or edit** Typewriter annotation & display all non-Latin characters.

SOFTWARE/OS VERSIONS
- Okular version: `21.08.2`
- Linux/KDE Plasma: Manjaro (rolling upgrade distro),
- KDE Plasma Version: `5.22.5`
- KDE Frameworks Version: `5.87.0`
- Qt Version: `5.15.2`


ADDITIONAL INFORMATION
Comment 1 Yuri Chornoivan 2021-11-18 07:16:21 UTC

*** This bug has been marked as a duplicate of bug 305534 ***