[solved] "FreetypeError: 3: broken file" in Android distribution

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

[solved] "FreetypeError: 3: broken file" in Android distribution

#1 Post by ComputerArt.Club »

The game I am finishing up is running as expected with the Renpy launcher, but when I build the Android distribution (the only distribution I have tried so far as it is my priority) and switch the language to Simplified Chinese, the game crashes and I either get the below error while on the main menu or it crashes without an error while in game. The game runs as intended for English, Japanese and Traditional Chinese. The fonts used for Japanese and simplified Chinese are similar Google Fonts NotoSansJP-Regular and NotoSansSC-Regular. Both use ruby text on top.

There was a similar bug reported on Github, but it was closed by PyTom. https://github.com/renpy/renpy/issues/1048
Any ideas or suggestions? Thanks for your time.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
FreetypeError: 3: broken file

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "_layout/screen_main_menu.rpymc", line 28, in script
  File "renpy/ast.py", line 912, in execute
  File "renpy/python.py", line 2004, in py_exec_bytecode
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>
  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide
  File "renpy/ui.py", line 295, in interact
  File "renpy/display/core.py", line 2699, in interact
  File "renpy/display/core.py", line 3191, in interact_core
  File "renpy/display/core.py", line 2091, in draw_screen
  File "render.pyx", line 546, in renpy.display.render.render_screen
  File "render.pyx", line 247, in renpy.display.render.render
  File "renpy/display/layout.py", line 722, in render
  File "render.pyx", line 154, in renpy.display.render.render
  File "render.pyx", line 247, in renpy.display.render.render
  File "renpy/display/transition.py", line 361, in render
  File "render.pyx", line 154, in renpy.display.render.render
  File "render.pyx", line 247, in renpy.display.render.render
  File "renpy/display/layout.py", line 722, in render
  File "render.pyx", line 154, in renpy.display.render.render
  File "render.pyx", line 247, in renpy.display.render.render
  File "renpy/display/layout.py", line 722, in render
  File "render.pyx", line 154, in renpy.display.render.render
  File "render.pyx", line 247, in renpy.display.render.render
  File "renpy/display/screen.py", line 675, in render
  File "render.pyx", line 154, in renpy.display.render.render
  File "render.pyx", line 247, in renpy.display.render.render
  File "renpy/display/layout.py", line 722, in render
  File "render.pyx", line 154, in renpy.display.render.render
  File "render.pyx", line 247, in renpy.display.render.render
  File "renpy/text/text.py", line 1989, in render
  File "renpy/text/text.py", line 619, in __init__
  File "renpy/text/text.py", line 242, in glyphs
  File "renpy/text/font.py", line 699, in get_font
  File "renpy/text/font.py", line 642, in load_face
  File "ftfont.pyx", line 183, in renpy.text.ftfont.FTFace.__init__
FreetypeError: 3: broken file

Last edited by ComputerArt.Club on Mon Aug 26, 2019 10:52 am, edited 1 time in total.

User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

Re: "FreetypeError: 3: broken file" in Android distribution

#2 Post by ComputerArt.Club »

To add to this, the main menu text is also not appearing in the Android distribution for the Traditional Chinese Menu , though it does appear in the emulated version. The image buttons still work.

Summary:
Simplified Chinese version crashing on Android distribution only, not on emulated Android version.
Traditional Chinese text not appearing in the main menu of the Android distribution only, although they appear on the emulated Android version.
Japanese and English versions appear to be working as in the emulated version.

User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

Re: "FreetypeError: 3: broken file" in Android distribution

#3 Post by ComputerArt.Club »

I have since tried:
  • building windows versions (problem does not occur)
  • contacting the person who originally posted the problem on github (doesn't recall how he solved the problem).
  • contacting PyTom (wondered if it could be a corrupt font - seemed strange to me as it is a Google Font and it works on other platforms)
  • rebuilding the font in FontForge to make sure it wasn't corrupt (problem persists)
I see on the original Github thread PyTom concluded "It's more likely a problem with the archiver."

Anyone any suggestions?

User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

Re: [solved] "FreetypeError: 3: broken file" in Android distribution

#4 Post by ComputerArt.Club »

Solved with the help of Remix and PyTom, I really appreciate your help. Remix suggested another open source simplified Chinese font , and with the new font I am no longer getting the error message.

Unfortunate and strange about the Google Noto Sans font, for what ever reason it didn't want to play nice, perhaps it is corrupt like PyTom suspected.

Thanks for your time everyone!

Post Reply

Who is online

Users browsing this forum: Google [Bot], Syrale