Bug 349350 - Some monospaced fonts missing in the fonts menu
Summary: Some monospaced fonts missing in the fonts menu
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: font (show other bugs)
Version: 2.14.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-18 20:36 UTC by nuc
Modified: 2017-02-12 15:15 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nuc 2015-06-18 20:36:43 UTC
The menu for choosing a fixed width font for konsole is missing two monospaced fonts on my system:
Libertine Mono O (LinLibertine_M.otf)
Nimbus Mono L (n022003l.pfb)

On terminals like xfce4-terminal I am totally able to choose them.

This bug is pretty similar to https://bugs.kde.org/show_bug.cgi?id=275270

Reproducible: Always
Comment 1 Horacio Sanson 2016-05-10 13:28:57 UTC
I have this issue since KDE4 and now using KDE5 with Konsole 15.2.3 the problem persists. The usual response is the this is a problem of QT or Fontconfig.

If I use fontconfig to list the monospaced fonts I can see that the list returned by fontconfig is the same list show in Konsole font select dialog. This confirms the problem indeed is fontconfig. 

To see the monospaced fonts as detected by fontconfig I run this command in the terminal:

   fc-list ":spacing=mono:scalable=true" family

More investigation indicates that the problem are the fonts themselves that are missing the fixedPitch flag. I found a program that sets this flag on on any ttf font but even with the flag set the font does not appear in the list:

    https://git.fedorahosted.org/cgit/liberation-fonts.git/plain/scripts/setisFixedPitch-fonttools.py

Some additional discussions and resources regarding this issue:

  - http://fontforge.10959.n7.nabble.com/Regenerated-font-does-not-recognize-as-a-Monospace-in-Windows-td11291.html
  - http://www.pixelbeat.org/docs/fc_fixed.html
  - https://eev.ee/blog/2015/05/20/i-stared-into-the-fontconfig-and-the-fontconfig-stared-back-at-me/

All I want is able to use the M+ monospaced font that has Japanese characters so my Japanese emails look good in mutt+konsole but so far this has been mission impossible for the last 5 years.

This is the font just in case:   http://mplus-fonts.osdn.jp/about-en.html
Comment 2 Yi Yang 2016-07-02 07:35:37 UTC
A problem with auto-detecting monospace fonts is, some monospace fonts are not really monospace, and they might have a good reason to do so.

Horacio Sanson has a good reason: he wants to use Japanese characters. Nobody would make the kanas and especially kanjis as wide as latin letters. Instead, these are "double width" letters that occupy as much space as two latin letters. Consequentially it doesn't satisfy the usual definition of "monospace" fonts.

I see it a deficit of the definition rather than a deficit of the font or the user. After all, whoever made that definition probably had absolutely no knowledge of how East Asian Typography works.

China+Japan+Korea has about 1.6 billion population, and there are also oversea users. Please, do something so that CJK users aren't completely ****ed by a overly pedantic definition of "monospace".

I'd say please add an option that says "I know what I am doing and please let me choose from all system fonts". That will satisfy everyone.
Comment 3 Yi Yang 2016-07-02 07:36:25 UTC
Also, Konsole is actually sophisticated enough to handle double width characters. No reason to keep the users from actually using such a font.
Comment 4 Kurt Hindenburg 2016-07-10 02:50:21 UTC
I have code that will allow any font to be picked which should help you.  It currently displays a warning dialog about possible issues.

I'm a bit concerned people will start picking non monospaced fonts and the complain about display issues.
Comment 5 Dmitry Bigunyak 2016-07-14 15:08:40 UTC
I also have the same problem.
I'm using Konsole-2.14.2 in KDE-4 (4.14.20) on my Gentoo system and can't choose neither of just installed following monospace fonts:
* anonymous-pro
* inconsolata
* monaco

They are perfectly available in all other applications but in Konsole.
Looks very much like a bug, not sure where though.
Comment 6 Kurt Hindenburg 2016-07-16 16:51:31 UTC
Git commit fa5f32f13fae38e8cee15dd2d87db30fa6dc6822 by Kurt Hindenburg.
Committed on 16/07/2016 at 16:48.
Pushed by hindenburg into branch 'master'.

Allow non monospaced fonts to be selected

Due to various issues outside the scope of Konsole, some monospaced
fonts are not allowed to be selected.  The default is still to only
allow system found monospaced fonts but users can bypass to allow any
font to be picked. There is a warning about issues when doing this.

M  +21   -1    src/EditProfileDialog.cpp
M  +1    -0    src/EditProfileDialog.h
M  +10   -0    src/EditProfileDialog.ui
M  +3    -3    src/TerminalDisplay.cpp

http://commits.kde.org/konsole/fa5f32f13fae38e8cee15dd2d87db30fa6dc6822
Comment 7 Kurt Hindenburg 2016-07-16 17:45:10 UTC
Git commit 2bdc78334a4b28ccf42452051aaeac3fd097ab9e by Kurt Hindenburg.
Committed on 16/07/2016 at 17:41.
Pushed by hindenburg into branch 'Applications/16.08'.

Allow non monospaced fonts to be selected

Due to various issues outside the scope of Konsole, some monospaced
fonts are not allowed to be selected.  The default is still to only
allow system found monospaced fonts but users can bypass to allow any
font to be picked. There is a warning about issues when doing this.
(cherry picked from commit fa5f32f13fae38e8cee15dd2d87db30fa6dc6822)

M  +21   -1    src/EditProfileDialog.cpp
M  +1    -0    src/EditProfileDialog.h
M  +10   -0    src/EditProfileDialog.ui
M  +3    -3    src/TerminalDisplay.cpp

http://commits.kde.org/konsole/2bdc78334a4b28ccf42452051aaeac3fd097ab9e
Comment 8 Christoph Feck 2016-12-07 19:39:41 UTC
Can you confirm you are now able to select these fonts?
Comment 9 Kurt Hindenburg 2017-02-12 15:15:02 UTC
reopen if you still have issues selecting the font