Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling FreeType fonts causes Minetest to crash on startup #9386

Closed
An0n3m0us opened this issue Feb 10, 2020 · 9 comments
Closed

Disabling FreeType fonts causes Minetest to crash on startup #9386

An0n3m0us opened this issue Feb 10, 2020 · 9 comments
Labels
Request / Suggestion The issue makes a suggestion for something that should be done but isn't a new feature

Comments

@An0n3m0us
Copy link
Contributor

An0n3m0us commented Feb 10, 2020

Minetest version
Minetest 5.2.0-dev-b14aa1c-dirty
OS / Hardware

Operating system: Linux - Ubuntu 16.04

Summary

Minetest crashes when "FreeType fonts" is set to "Disabled"

Log:

2020-02-10: ERROR[Main]: FontEngine: Found font "/tmp/minetest/bin/../fonts/Arimo-Regular.ttf" but freetype is not available.
2020-02-10: ERROR[Main]: FontEngine: Default font file: 
2020-02-10: ERROR[Main]: 	"/tmp/minetest/bin/../fonts/Arimo-Regular.ttf"
2020-02-10: ERROR[Main]: 	required for current screen configuration was not found or was invalid file format.
2020-02-10: ERROR[Main]: 	Using irrlicht default font.
Segmentation fault (core dumped)

GDB Log:

Starting program: /tmp/minetest/bin/minetest 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffead97700 (LWP 9022)]
[Thread 0x7fffead97700 (LWP 9022) exited]
[New Thread 0x7fffead97700 (LWP 9023)]
[New Thread 0x7fffe6595700 (LWP 9024)]
[New Thread 0x7fffdaf39700 (LWP 9025)]
[New Thread 0x7fffda738700 (LWP 9026)]
[New Thread 0x7fffd9f37700 (LWP 9027)]
[New Thread 0x7fffd9736700 (LWP 9028)]

Thread 1 "minetest" received signal SIGSEGV, Segmentation fault.
0x00000000006a6de3 in GUIFormSpecMenu::regenerateGui(irr::core::vector2d<unsigned int>) ()
Steps to reproduce
  1. On the settings page; set "Graphics ---> Menus ---> FreeType fonts" to "Disabled"
  2. Restart the game and it should crash.
@An0n3m0us An0n3m0us added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Feb 10, 2020
@rubenwardy
Copy link
Member

rubenwardy commented Feb 10, 2020

This option should be removed and freetype made mandatory. It is needed for colored text and more, and having fewer configurations makes testing much easier

@SmallJoker
Copy link
Member

SmallJoker commented Feb 11, 2020

In contrast to BIOS bricking this startup crash can be solved easily by editing the configuration file.
Bitmap and XML vector fonts are - and should IMO be - supported to the point that they're usable in the game - which wasn't even possible for a while due to lack of maintenance.

If you'd like to expand the functionalities or fix this issue - preferably by force-enabling Freetype in case the file cannot be loaded as Bitmap or XML vector font - feel free to propose a PR.

PS: I have a local patch which implements colouring for StaticText, but there's no demand for it aside performance on low-end systems.

EDIT: If this issue is about a setting which cannot be reverted as soon Minetest is closed - consider removing it from settingtypes.txt and hide it so Wuzzy does not complain about it being undocumented.

@SmallJoker SmallJoker added Low priority Possible close and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Feb 11, 2020
@MoNTE48
Copy link
Contributor

MoNTE48 commented Mar 28, 2020

@SmallJoker what you think about ttf-parser?
https://github.com/RazrFalcon/ttf-parser

@SmallJoker
Copy link
Member

SmallJoker commented Mar 28, 2020

@MoNTE48 Aside this is kinda off-topic - the library lacks a feature which would be very handy to have: Rendering.
grafik

@paramat paramat added Request / Suggestion The issue makes a suggestion for something that should be done but isn't a new feature and removed Possible close Low priority labels Aug 16, 2020
@paramat
Copy link
Contributor

paramat commented Aug 16, 2020

Relabelling as a request from rubenwardy.

@erlehmann
Copy link
Contributor

erlehmann commented Sep 13, 2021

This option should be removed and freetype made mandatory. It is needed for colored text and more, and having less configurations makes testing much easier

At least part of this statement is false: If I am not mistaken, colored text without Freetype seems to work on at least some configurations (e.g. Thinkpad X390 with Debian GNU/Linux). I tested this by disabling Freetype and using one of the provided pixel fonts.

Needless to say, on that computer not using Freetype does not crash the game; text rendering is even faster!

@erlehmann
Copy link
Contributor

@rubenwardy screenshot of colored text with pixel fonts (i.e. no FreeType) in MineClone 5: https://mister-muffin.de/p/XnO0.png

@sfan5
Copy link
Member

sfan5 commented Sep 13, 2021

Those are colored labels in the GUI. "Colored text" refers to the chat feature.
This is /help teleport with TTF and without:
grafik

@erlehmann
Copy link
Contributor

erlehmann commented Sep 13, 2021

"Colored text" refers to the chat feature.

Thanks, I hate it. I have encountered several users that used client mods to write hard to read colored text in the in-game chat (e.g. rainbow text). Can that feature be turned off with FreeType fonts in any way?

@sfan5 sfan5 closed this as completed Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request / Suggestion The issue makes a suggestion for something that should be done but isn't a new feature
Projects
None yet
Development

No branches or pull requests

7 participants