[0.13/0.14] Font path wrong in mods (example code provided)

This subforum contains all the issues which we already resolved.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

[0.13/0.14] Font path wrong in mods (example code provided)

Post by aubergine18 »

I'm trying to add a font in a mod, with this path specified in /locale/en/font.cfg:

Code: Select all

[font]
glyph=__Glyph__/fonts/glyph.ttf

-- I also tried:
[font]
glyph=fonts/glyph.ttf
However, Factorio treats it as a subfolder of the main install folder, rather than my mod folder, giving this error message as a result:
Apple Mac wrote: Error when opening /Users/*****/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data/core/__Glyph__/fonts/glyph.ttf for reading: No such file or directory
This error goes unnoticed in the 'core' mod that's bundled with factorio, but makes it impossible for mods to add their own fonts.

Hopefully this is relatively easy to fix.

Related:
* info from Rseding91 about custom fonts
* older report of this error in modding forums - same bug on Windows
Attachments
Glyph_0.0.1.zip
Basic mod illustrating the bug
(50.62 KiB) Downloaded 135 times
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.13/0.14] Font path wrong in mods (example code provided)

Post by Oxyd »

Looks like this never worked in the first place. Fixed in 0.14.3.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [0.13/0.14] Font path wrong in mods (example code provided)

Post by aubergine18 »

Thank you!!! :D
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Post Reply

Return to “Resolved Problems and Bugs”