Bug 1766201 - Font not visible and not useable
Summary: Font not visible and not useable
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: ucs-miscfixed-fonts
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1753295
TreeView+ depends on / blocked
 
Reported: 2019-10-28 14:58 UTC by Markus Teuber
Modified: 2020-01-20 07:16 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 19:16:25 UTC
Type: Bug


Attachments (Terms of Use)

Description Markus Teuber 2019-10-28 14:58:27 UTC
Description of problem:
Font not visible/useable on a fresh installation of Fedora 31. It also affects Fedora 31 after the upgrade from Fedora 30.

Version-Release number of selected component (if applicable):
ucs-miscfixed-fonts-0.3-20.fc31.noarch

How reproducible:
Install the package and try to select the font in  e.g. gnome-terminal.
Gnome-font-viewer also doesn't recognize it.

Steps to Reproduce:
1. Install the package in Fedora 31
2. try to select the font in  e.g. gnome-terminal
3. or after an upgrade from Fedora 30, with this font used as the preferred Terminal font in gnome-terminal, there are only hieroglyphics left.

Actual results:
It is not listed in gnome-terminal and in consequence not useable.

Expected results:
Useable and listed font. It's working on Fedora 30.

Additional info:

Comment 1 Peng Wu 2019-10-29 06:17:42 UTC
Please try to use fonttosfnt to convert the font from the following repo:
https://copr.fedorainfracloud.org/coprs/pwu/fonttosfnt/

$fonttosfnt -b -g 2 -m 2 -o ucs-miscfixed.otb [1-9]*[0-9].bdf
$fonttosfnt -b -g 2 -m 2 -o ucs-miscfixed-bold.otb *B.bdf
$fonttosfnt -b -g 2 -m 2 -o ucs-miscfixed-oblique.otb *O.bdf

Install the generated fonts to ~/.local/share/fonts,
then the "Fixed" font will appear in gedit,
but still not appear in gnome-terminal.

Comment 2 Markus Teuber 2019-10-29 07:20:58 UTC
Thanks. That works for gedit, but the interesting usecase for me is gnome-terminal.

Comment 3 Peng Wu 2019-10-29 08:27:18 UTC
Please try to use "-m 1", it seems works for gnome-terminal now.

Comment 4 Markus Teuber 2019-10-29 08:50:52 UTC
Thank you. It works.
It is not the same quality like the font was before, but better than nothing. What would happen with the package? If someone will install it, it shouldn't work as expected (only with this workaround). What do you think?

Comment 5 Peng Wu 2019-10-30 03:05:53 UTC
This is because pango removed bitmap font support when switch to harfbuzz,
gnome-terminal doesn't support the bitmap font in Fedora 31.

Maybe in future we can help to convert the bitmap fonts to OpenType bitmap only font in the package.

Comment 6 Markus Teuber 2019-10-30 07:12:55 UTC
I found this one: https://gitlab.gnome.org/GNOME/pango/issues/386
where you wrote something about it.
Today morning i read this article (yes, it was phoronix ;-)) https://www.phoronix.com/scan.php?page=news_item&px=Pango-No-More-Bitmap-Fonts
I think it is worth to mention it as a common bug for F31, because if some people upgrade to F31 and use such fonts they have a really bad experience and i think they don't know why this happened. I think it is not fixable without deeper research in the web (or with your help, thanks a lot again).
Could you please inform and explain e.g. Adam Williamson that he wrote this down here? https://fedoraproject.org/wiki/Common_F31_bugs

Comment 7 Peng Wu 2019-10-31 06:10:39 UTC
Okay, I wrote one draft paragraph for Common F31 bugs.

Please review it, thanks!

Pango switch to use harfbuzz and drop bitmap font support in GNOME applications

After pango upgrade to 1.44 and switch to use harfbuzz, pango drops the support of bitmap font in GNOME applications like gnome-terminal.

There is one work around is to use the updated fonttosfnt tool in Fedora copr,
and convert the bitmap font to OpenType bitmap only font for gnome-terminal.

URL: https://copr.fedorainfracloud.org/coprs/pwu/fonttosfnt/

Comment 8 Markus Teuber 2019-10-31 08:30:30 UTC
Where is the difference between your version (xorg-x11-font-utils-1:7.5-43.fc31.x86_64) and the version which comes ootb with F31 (xorg-x11-font-utils-1:7.5-42.fc31.x86_64)?
Both work for me with the same results, for my old eyes ;-) .

Does it make sense to write the commands for the workaround into the wiki with the hint of installed ucs-miscfixed-font?

$fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed.otb /usr/share/fonts/ucs-miscfixed/[1-9]*[0-9].bdf
$fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed-bold.otb /usr/share/fonts/ucs-miscfixed/*B.bdf
$fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed-oblique.otb /usr/share/fonts/ucs-miscfixed/*O.bdf

Install the generated fonts to ~/.local/share/fonts,
then the "Fixed" font will appear in gedit and in gnome-terminal.

Thanks a lot for your help with this bug.

Comment 9 Peng Wu 2019-11-01 09:05:16 UTC
I just created one wiki page for the font conversion.

URL: https://fedoraproject.org/wiki/BitmapFontConversion

Comment 10 Markus Teuber 2019-11-02 09:57:30 UTC
Great. Thank you. I guess a link from F31 CommonBugs to the wiki should point users in the right direction.
Could you or perhaps adamw put the link to the wiki page into the CommonBugs page?
Then i'll close this bug if you agree.

Comment 11 Peter Backes 2019-11-03 15:06:12 UTC
I tried the workaround with fonttosfnt for xfce4-terminal and observed the following issues:
1. An extra pixel between the characters
2. bold/italic/bold+italic don't work

Seems like I have to switch to Source Code Pro Regular 8 pt, though it doesn't come close to miscfixed 6x13's perfection.

Comment 13 Markus Teuber 2019-11-05 19:15:39 UTC
Thanks a lot at all.
The workarounds are working for me with gnome-desktop.

Comment 14 Jan Pazdziora 2019-11-09 14:55:43 UTC
Reopening. We do not want to force everyone to use workarounds with copr repos, we need fix in Fedora.

Comment 15 Markus Teuber 2019-11-09 15:07:33 UTC
(In reply to Jan Pazdziora from comment #14)
> Reopening. We do not want to force everyone to use workarounds with copr
> repos, we need fix in Fedora.

Yes, you are completly right. Thank you.

I did not use the copr repo, i used the program which comes with F31.
I tried with both but at least i took the F31 program.

Comment 16 Adam Williamson 2019-11-12 23:53:42 UTC
right, but a proper fix would involve the font as packaged working with current pango. it should not require the user to convert the font themselves.

Comment 17 Nicolas Mailhot 2019-11-13 04:07:38 UTC
(In reply to Adam Williamson from comment #16)
> right, but a proper fix would involve the font as packaged working with
> current pango. it should not require the user to convert the font themselves.

Adam, you could say a proper fix for X11 would have been to find a way do design an X12 without all this Wayland crap that requires deep application and user habit changes.

“proper” zero cost fixes do not exist in real life. Here, moving text layouting forward required to either give up on legacy font formats, or do a lot of dev to add support for them within modern text layouting libs. And, this dev effort was never started.

It’s not unreasonable for text-processing apps to consider that, after almost two decades waiting for people that care about legacy fonts to do something for them dev side, those people effectively chose the conversion path.
https://gitlab.gnome.org/GNOME/pango/issues/386#note_568255 

This year it was the turn of pango to made the switch. Three year ago it was Libre Office. The dominoes will continue to fall till only legacy apps stuck in another tech era continue to support pre-OpenType font formats.

Comment 18 Kevin Kofler 2019-11-13 10:24:23 UTC
The right fix is really to fork Pango. Using HarfBuzz does not require using its font loader and dumping FreeType for it.

Comment 19 Adam Williamson 2019-11-13 15:46:33 UTC
Nicolas: turn off the megaphone, dude. I'm just saying that this bug is not 'fixed' until a change is made that makes the font work with pango. "Convert the font to opentype" would be a perfectly good resolution. "Tell people to convert it themselves" isn't.

Comment 20 Markus Teuber 2020-01-06 19:22:34 UTC
A little update to this bug: For this font "ucs-miscfixed-fonts" i used this build https://bodhi.fedoraproject.org/updates/FEDORA-2020-d6b7315fc4 but the results are the same as with fonttosfnt that comes in F31 stable. It works in general but the spacing is not optimal as it was before F31. And the usage of "-m 1" is necessary if you want to use this font in gnome-terminal.

Comment 21 Peng Wu 2020-01-07 08:36:58 UTC
If we convert the bitmap fonts without combining the fonts together, like the following shell script:

for i in `ls *.bdf`;
         do fonttosfnt -b -c -g 2 -m 2 -o ${i%%.bdf}.otb $i;
done

The fonts is recognized as "fixed width", and will show in the gnome-terminal
setup dialog.

After combining several bitmap fonts into one OpenType font face,
the fixed width is changed.

Comment 22 Peng Wu 2020-01-20 07:15:12 UTC
Currently we recommend to use fonttosfnt with the following options:

$ fonttosfnt -b -c -g 2 -m 2

Comment 23 Peng Wu 2020-01-20 07:16:50 UTC
It seems that when combining multiple bitmap fonts of different sizes,
the glyph coverage of different sizes is different.

When freetype compute the width of each glyph,
if the glyph is missing at the requested font size,
some glyph from different font size is scaled and returned;

The scaled glyph width is different and will make fontconfig consider
this font is not monospaced.


Note You need to log in before you can comment on or make changes to this bug.