Bug Reports / Custom fonts not working

Author
Message
0x7f
9
Years of Service
User Offline
Joined: 31st Mar 2016
Location:
Posted: 14th Apr 2016 00:23
hi,
so i've been trying to get custom fonts into GG, however no known .fnt format seems to work.
when i load the .fnt files from the included fonts into programs like "fontforge" it tells me its not a known .fnt format.
so how do i get fonts compatible with GG ? what programs do you use to create these special .fnt files?
i followed the steps mentioned in global.lua and made sure the filenames match, but when looking into the .fnt files the GG ones look different from any .fnt format i've tried (like text,binary,xml).. any help would be appreciated!
PM
PartTimeCoder
10
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 14th Apr 2016 01:44
GameGuru uses bitmap fonts, the .fnt file is only a index containing the location of each letter

you can use this excellent tool to create bitmap fonts that should work with GG

https://forum.thegamecreators.com/thread/184828
PM
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 14th Apr 2016 01:56
Thanks, PTC! I haven't messed with custom fonts yet but my game tribute to Gilligan's Island will definitely need this!
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 10/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 10/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Apr 2016 02:04
Thank you PartTimeCoder for the link. Should prove very useful.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

0x7f
9
Years of Service
User Offline
Joined: 31st Mar 2016
Location:
Posted: 14th Apr 2016 02:49 Edited at: 14th Apr 2016 19:03
thanks for the link! now the format seems fine, but it still doesn't work for me.
i wrote a quick test script:



even tried to switch to the included font "Outline72".
do i miss anything ?
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Apr 2016 03:00
SetFont: SetFont ( "myFont" , 1)

To change in game font. Fonts 1-3 are the default ones used.

NOTE: You can place your texture atlas bitmap font file in the Files\fontbank\ folder with the name FPSCR-Font-XX.png where XX is the unique name for your font.

When you want to use it, simply call the command SetFont ( "XX", YY ) where XX is the unique name above and YY is the index you want to 'overwrite'.

Remember to include the 'FPSCR-Font-XX-Subimages.fnt' file which describes the coordinates within the texture atlas image for the specific bitmap fonts contained therein.

I guess I will have to try this.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

0x7f
9
Years of Service
User Offline
Joined: 31st Mar 2016
Location:
Posted: 14th Apr 2016 13:42
yes thats the steps i followed.. also tried to overwrite different indexes (YY 1-4).
filenames should also be fine: FPSCR-Font-test72.png and FPSCR-Font-test72-Subimages.fnt
PM
PartTimeCoder
10
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 14th Apr 2016 17:48
Na I cant get any custom fonts to show either, I can overwrite the original "24px" and my custom font shows in the loading screens so I know its fine but try and set it from script is a no go

I have attached the font files and a simple script, could someone else please look into it

prompt.lua

Attachments

Login to view attachments
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Apr 2016 17:50
About to test this out
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

PartTimeCoder
10
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 14th Apr 2016 18:20
Thanks Myke
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Apr 2016 18:23 Edited at: 14th Apr 2016 18:25
Hmmm. Cant seem to get this to work either on the new build also.

I even tried initiating it from a trigger zone with a modified script to call this font code. No prompts or text shown, and the prompts from other door objects are still the default.

I will have to do some research on this.

Going to move this thread to Bug reports section.

Thanks.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

0x7f
9
Years of Service
User Offline
Joined: 31st Mar 2016
Location:
Posted: 14th Apr 2016 19:02
thanks a lot for looking into it!
PM
0x7f
9
Years of Service
User Offline
Joined: 31st Mar 2016
Location:
Posted: 2nd May 2016 18:19
any news on this ?
PM
brco900033
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 22nd Jul 2014
Location: Belgium
Posted: 17th Jun 2016 16:11
Still not working. I also noticed that there is no function called SetFont in the global.lua file.
PM

Login to post a reply

Server time is: 2025-04-22 17:22:05
Your offset time is: 2025-04-22 17:22:05