Pycraft icon indicating copy to clipboard operation
Pycraft copied to clipboard

AttributeError: module 'text_utils' has no attribute 'TextRenderer'

Open wwwslinger opened this issue 7 months ago • 1 comments

Looks like some updates were push to main for pycraft_main.py but not for the corresponding utilities:

Pycraft has ran into a problem module 'text_utils' has no attribute 'TextRenderer'
Traceback (most recent call last):
  File "src/programs/pycraft_main.py", line 56, in __init__
    Registry.fonts = text_utils.TextRenderer()
                     ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'text_utils' has no attribute 'TextRenderer'

wwwslinger avatar Jun 13 '25 17:06 wwwslinger

Thank you very much for bringing this to my attention!

As a temporary fix to this issue, I have disabled text rendering - this solves the problem and allows Pycraft to run largely as intended.

This is because we changed the way Pycraft renders to use OpenGL, and this doesn't support the text rendering process we were using with Pygame. For some time now, we have been working on a Multi-Media API called PMMA, which is intended to fix and simplify the development process for Pycraft - just today, in fact, we have been working on adding text rendering support. This will form part of PMMA 5.0 which is a major rewrite intended to provide a massive performance improvement and add in processes for allowing easier text rendering to an OpenGL enabled display.

PMMA 5.0 has no set release date but we have been working around the clock on it and hope to have it finished by the end of the summer so we can begin a complete overhaul of Pycraft!

I will leave this issue open to remind me to re-introduce this functionality when the time comes (it's going to be my priority) and will issue an update when it has been properly fixed.

PycraftDeveloper avatar Jun 13 '25 19:06 PycraftDeveloper