Bug 402033 - Okular "typewriter" annotation tool - can't change text font or colour
Summary: Okular "typewriter" annotation tool - can't change text font or colour
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Manjaro Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-12 01:23 UTC by Paul Brown
Modified: 2023-02-04 18:59 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Typewriter annotation tool colour bug (1.59 MB, image/gif)
2019-02-04 12:10 UTC, Rajeesh K V
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Brown 2018-12-12 01:23:53 UTC
SUMMARY

You cannot change the font or colour of text in the text boxes created by the "typewriter" annotation tool.

STEPS TO REPRODUCE
1. Open a  PDF dcocument
2. Click on "Tools" and mark the "Review" checkbox
3. Select "Typewriter" from the annotation menu
4. Select a region where you want your text to go and fill in the pop-up dialog
5. Select the text box and right click on the text
6. From the pop up menu, pick "Properties"
7. In the  dialog, change the font, colour and size of the text

OBSERVED RESULT

Only the size of the text changes (not the font or the colour)

EXPECTED RESULT

Font, size and colour to change

SOFTWARE/OS VERSIONS

Okular version: 1.5.90
Linux/KDE Plasma: 
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53.0
Qt Version: 5.11.2
Comment 1 Burkhard Lück 2018-12-12 02:27:22 UTC
Confirmed in master build from sources
Okular 1.6.70
KDE Frameworks 5.53.0
Qt 5.11.1 (built against 5.11.1)
The xcb windowing system
Comment 2 Albert Astals Cid 2018-12-12 08:07:20 UTC
Do you have poppler 0.69?
Comment 3 Burkhard Lück 2018-12-12 08:17:43 UTC
libpoppler-qt5-1:
  Installiert:           0.68.0-0ubuntu1.3
  Installationskandidat: 0.68.0-0ubuntu1.3
Comment 4 Tobias Deiminger 2018-12-12 08:20:03 UTC
As Albert said, changing color depends on poppler >= 0.69. And, regarding font family: It can't be changed at all. It's a missing feature in poppler, inline notes suffer from it too. Best solution would be to implement embedding fonts into PDF for poppler, which is quite a major task.
Comment 5 Albert Astals Cid 2018-12-12 22:44:55 UTC
Tobias, should we should a warning to the user?

Disable those options?
Comment 6 Tobias Deiminger 2018-12-13 22:50:13 UTC
(In reply to Albert Astals Cid from comment #5)
> Disable those options?
Yes, that's reasonable. However I'm a bit unsure how to propagate the required information.

It has to be a runtime check, to take the loaded document type into account. Because even if we don't have HAVE_POPPLER_0_69 defined, font color will work for all non PDF annotations (i.e. not Okular::Annotation::ExternallyDrawn).

I tend to invent Okular::AnnotationProxy::Capability::FreeTextFontColor, set it only if HAVE_POPPLER_0_69, and make a AnnotationProxy* gettable via class Annotation. Then TextAnnotationWidget is able to query the flag. What do you think about that?
Comment 7 Oliver Sander 2018-12-13 22:54:44 UTC
Is such a "complicated" solution necessary for a problem that will go away automatically as time passes?  How about a simple note in the tooltip à la "for pdf files you need at least poppler 0.69"?
Comment 8 Albert Astals Cid 2018-12-16 22:29:19 UTC
(In reply to Tobias Deiminger from comment #6)
> (In reply to Albert Astals Cid from comment #5)
> > Disable those options?
> Yes, that's reasonable. However I'm a bit unsure how to propagate the
> required information.

One "easy" option is just have a messagebox inside the generator code itself (with a don't show again) saying "yeah this is not gonna work, bug your distro to give you a newer poppler".

The other option is just close this and as Oliver says, "it'll eventually work when distros stop shipping old poppler versions"
Comment 9 Rajeesh K V 2019-02-04 12:10:49 UTC
Created attachment 117828 [details]
Typewriter annotation tool colour bug

This bug report looks like the right place, so adding additional information on it. Please let me know if a new bug should be opened.


I've poppler 0.73 and okular 1.6.0, which sets the configured colour for typewriter annotation tool initially. But if I resize the annotation box or move it around, colour is lost. To depict the issue clearly, see attached screen capture.

Software versions:
Okular: 1.6.0 (18.12.0)
Poppler: 0.73.0
Plasma: 5.14.4
Frameworks: 5.54.1
Qt: 5.14.4
Comment 10 Albert Astals Cid 2019-02-17 19:11:08 UTC
@Rajeesh please open a different bug, yours has really nothing to do with this one even if it may seem so to you.
Comment 11 Daniel Borek 2019-02-25 14:16:52 UTC
The problem still exist in snap version 1.6.2
Comment 12 Albert Astals Cid 2019-03-06 18:47:15 UTC
The snap version is probably using an ancient poppler.
Comment 13 poperigby 2020-10-05 20:42:22 UTC
I'm still having this issue with Okular 20.08.1-1 on Arch Linux.
Comment 14 Mikael 2022-03-16 10:29:53 UTC
I am still having this issue with Okular 21.08.3 installed as Flatpak on Debian Buster from Flathub.
Comment 15 Mikael 2022-03-21 12:48:48 UTC
The color can be changed in Okular and the selected color persists when re-opening the document in Okular, but the color will be reset to default black when the resulting pdf is displayed in another pdf reader such as Acrobat reader or pdf.online web-app.

It is only partly true that the size of the font can be changed: The font size for Typewriter and Inline note text annotations can be changed in Okular and the selected size persists when re-opening the document in Okular, but the font size will be reset to a default size when the resulting pdf is displayed in another pdf reader such as Acrobat reader or pdf.online web-app. The size of the containing text box element will not be resized though, frequently resulting in a too small text box with cropped text display (when a text line is more than a few words long or when text annotations contains multiple lines). Unless the the font size in Okular is set to at least size 12 (in contrast to default 9) cropping will most likely happen when opening the resulting pdf file in another reader.
Comment 16 Wiley Sanders 2023-01-27 20:10:51 UTC
Size, font, color options all seems to work in okular 21.12.2-1.fc35 in Fedora 35. 

I don't have any expectations that annotation s work reliably outside of okular, so no info on that.
Comment 17 Rajeesh K V 2023-01-28 03:49:20 UTC
Changing font family, size & color works fine with okular-22.12.1 & poppler-22.08.0. Resizing the annotation box preserves the properties. These properties can be changed later as well (right click → Properties). The set style is visible in other applications like Firefox & Chromium).

I believe this issue could be closed.
Comment 18 Albert Astals Cid 2023-02-04 14:47:54 UTC
Closing as per Rajeesh comment, Paul please if you have the versions mentioned in the comment and you still think there's a bug please reopen this
Comment 19 Paul Brown 2023-02-04 18:59:13 UTC
(In reply to Albert Astals Cid from comment #18)
> Closing as per Rajeesh comment, Paul please if you have the versions
> mentioned in the comment and you still think there's a bug please reopen this

Works for me. Thanks folks!