Bug 450887

Summary: Change font for plain text files
Product: [Applications] okular Reporter: van.snyder <van.snyder>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: aacid, oliver.sander, yurchor
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: attachment-30167-0.html
attachment-499-0.html

Description van.snyder@sbcglobal.net 2022-02-26 19:16:34 UTC
Not reporting a crash, just requesting a feature.

When displaying plain-text files in Okular, it would be useful to be able to change the font, for several reasons.

One is that plain-text files are frequently formatted to be viewed using fixed-pitch fonts, to preserve positional relationships.

Another is that one might generally work with one language/alphabet, such as Latin, but occasionally need to look at a file as another, such as Cyrillic.

A third, similar to the second, is that some files contain DECtech or IBM 437 box-drawing characters.

A reasonable place to do this is on the File -> Properties menu which, for plain-text files presently (20.12.3) only gives information, but no opportunity to change the font.

Of course, one would like to be able to print the file using the selected font, not the system default font.

I like the font-selection dialogue in the nedit editor, but nedit can't print the file using the alternative font.
Comment 1 Oliver Sander 2022-02-26 20:40:01 UTC
You can do that.  It's under "preferences -> set up display modules -> text"  (or something like that, I'm translating from my German UI).
Comment 2 van.snyder@sbcglobal.net 2022-02-26 21:03:10 UTC
Created attachment 147155 [details]
attachment-30167-0.html

Oliver:

Thanks for the quick reply.

In the version I have (20.12.3), there is no "preferences" menu. I
looked under all the other menus, especially "Settings" but did not
find items "set up display modules". Do I need to change a
configuration setting to access that menu?

Van Snyder

On Sat, 2022-02-26 at 20:40 +0000, Oliver Sander wrote:
> https://bugs.kde.org/show_bug.cgi?id=450887
> 
> Oliver Sander <oliver.sander@tu-dresden.de> changed:
> 
>            What    |Removed                     |Added
> ---------------------------------------------------------------------
> -------
>                  CC|                           
> |oliver.sander@tu-dresden.de
> 
> --- Comment #1 from Oliver Sander <oliver.sander@tu-dresden.de> ---
> You can do that.  It's under "preferences -> set up display modules -
> > text" 
> (or something like that, I'm translating from my German UI).
>
Comment 3 Yuri Chornoivan 2022-02-26 21:10:37 UTC
(In reply to van.snyder@sbcglobal.net from comment #2)
> Created attachment 147155 [details]
> attachment-30167-0.html
> 
> Oliver:
> 
> Thanks for the quick reply.
> 
> In the version I have (20.12.3), there is no "preferences" menu. I
> looked under all the other menus, especially "Settings" but did not
> find items "set up display modules". Do I need to change a
> configuration setting to access that menu?
> 
> Van Snyder
> 
> On Sat, 2022-02-26 at 20:40 +0000, Oliver Sander wrote:
> > https://bugs.kde.org/show_bug.cgi?id=450887
> > 
> > Oliver Sander <oliver.sander@tu-dresden.de> changed:
> > 
> >            What    |Removed                     |Added
> > ---------------------------------------------------------------------
> > -------
> >                  CC|                           
> > |oliver.sander@tu-dresden.de
> > 
> > --- Comment #1 from Oliver Sander <oliver.sander@tu-dresden.de> ---
> > You can do that.  It's under "preferences -> set up display modules -
> > > text" 
> > (or something like that, I'm translating from my German UI).
> >

Actually, it is "Settings → Configure Backends..."

The corresponding section from docs:

https://docs.kde.org/trunk5/en/okular/okular/configure-backends.html

Hope this helps.
Comment 4 van.snyder@sbcglobal.net 2022-02-26 21:39:42 UTC
Created attachment 147156 [details]
attachment-499-0.html

Yuri:

Thanks for the quick reply. That helped me find the configuration for
text fonts for plain text files.

I have two further problems. The text is 120 columns. Okular wrapped it
at about 72 columns. Is there a way to control wrapping, or to specify
the line width?

I want to use an encoding that includes the DECtech or IBM/Microsoft
code page 437 box-drawing characters. I could not find a font with that
encoding in the list. In UTF-8 these begin at 0x2500. They have names
in the PostScript EncodingVector such as /SF100000. Is it possible to
add font encodings?

Thanks,
Van Snyder

On Sat, 2022-02-26 at 21:10 +0000, Yuri Chornoivan wrote:
> https://bugs.kde.org/show_bug.cgi?id=450887
> 
> Yuri Chornoivan <yurchor@ukr.net> changed:
> 
>            What    |Removed                     |Added
> ---------------------------------------------------------------------
> -------
>                  CC|                            |yurchor@ukr.net
> 
> --- Comment #3 from Yuri Chornoivan <yurchor@ukr.net> ---
> (In reply to van.snyder@sbcglobal.net from comment #2)
> > Created attachment 147155 [details]
> > attachment-30167-0.html
> > 
> > Oliver:
> > 
> > Thanks for the quick reply.
> > 
> > In the version I have (20.12.3), there is no "preferences" menu. I
> > looked under all the other menus, especially "Settings" but did not
> > find items "set up display modules". Do I need to change a
> > configuration setting to access that menu?
> > 
> > Van Snyder
> > 
> > On Sat, 2022-02-26 at 20:40 +0000, Oliver Sander wrote:
> > > https://bugs.kde.org/show_bug.cgi?id=450887
> > > 
> > > Oliver Sander <oliver.sander@tu-dresden.de> changed:
> > > 
> > >            What    |Removed                     |Added
> > > -----------------------------------------------------------------
> > > ----
> > > -------
> > >                  CC|                           
> > > > oliver.sander@tu-dresden.de
> > > 
> > > --- Comment #1 from Oliver Sander <oliver.sander@tu-dresden.de> -
> > > --
> > > You can do that.  It's under "preferences -> set up display
> > > modules -
> > > > text" 
> > > (or something like that, I'm translating from my German UI).
> > > 
> 
> Actually, it is "Settings → Configure Backends..."
> 
> The corresponding section from docs:
> 
> https://docs.kde.org/trunk5/en/okular/okular/configure-backends.html
> 
> Hope this helps.
>
Comment 5 Albert Astals Cid 2022-02-27 11:24:23 UTC
Closing this issue since you can change the font used for plain text files.

Please use forum.kde.org or other venues listed in https://kde.org/support/ for support questions.