Game Development Community

TGB Error: "Cannot Creat Font Glyphs"

by Orion the Hunter · in Torque Game Builder · 06/13/2013 (11:46 am) · 17 replies

Okay, please note that the following is for TGB 1.8 so there really shouldn't be any errors here. Anyhow, about 75% of the time, when I try to save, I get this error:

Quote:Fatal: (/Applications/Torque2D_1_8/engine/compilers/Xcode/../../source/platformOSX/osxFont.mm @ 157)

Cannot create font glyph.

So... what exactly is going on? I've never gotten the error before. Oh, I'm also using the DEBUG Torque because when I built, it deleted the old one. Is that supposed to happen?

#1
06/13/2013 (7:27 pm)
Pretty sure it's trying to write the font cache. This is where TGB tries to take the fonts you tell it to use in the text profiles and create bitmap fonts from them for use on other devices. If your fonts work fine in game then it's harmless - if not, <shrug>....
#2
06/14/2013 (8:52 am)
I think that the fonts for this version of TGB are messed up in the editor, but not the game. Take a look at the picture I have and you'll get my meaning:

www4.picturepush.com/photo/a/13315247/img/13315247.png
BTW, whenever I try to dismiss the message, it just pops right back up no matter what button I press. Furthermore, it doesn't even save. Is there a way to build Torque with Xcode without making a _DEBUG build? Because I have a feeling that this build isn't exactly right and hat the standard release build would be better.
#3
06/14/2013 (9:47 am)
I'm not an XCode guru, but there should be a release configuration. Build that and you should get a release executable.
#4
06/14/2013 (10:32 am)
I tried, but I can't tell what part is building a debug, not a release. I don't suppose deleting all references to a debug would help? :-/
#5
06/14/2013 (10:55 am)
I doubt that - I'm not familiar with the older project structure for Mac at all, really. I did some minor work in the T2D Mac projects during work on 3 Step Studio, but I remember the project being set up so that you could select either a release or debug configuration, then build.

I do know that there should be a DEBUG define somewhere - if you undefine it or define it as 0 (zero) it should not compile anything within #ifdef DEBUG blocks.
#6
06/17/2013 (9:34 am)
Yeah, it's supposed to be building a "release" build and a debug build but all it's spitting out is a debug. That dumb font glyphs message is still popping up and it seems like it happens whenever I add a behavior to something. The worst part about behaviors is this Blurb Behavior that you helped me make is really hard to implement manually... Ugh... I don't suppose going to the directory that it keeps shoving at me and tearing out that error message would help?
#7
06/17/2013 (10:49 am)
It should be trying to save to your user data folder (wherever that is on a Mac). If you ensure that this folder is correct (there is a function to retrieve it - search the source for datafolder or userdata) and then find the global that is supposed to have this assigned to it then this message should go away. "If" and "should."
#8
06/18/2013 (6:56 am)
I tried that, and my data folder is correct. I deleted the whole thing just to make sure and it created a new one which is normal (for macs, anyway). All I fixed, however, is the problem with the text not being jumbled up. Sure enough, whenever I add a behavior, it still gives me that error.
#9
06/18/2013 (7:20 am)
I got fed up with the error so I commented it out in OSXFonts.mm.


It worked fine until it crashed and now it refuses to open my game again.

...

Can't wait for the MIT version to come out with editors... :P
#10
06/19/2013 (7:41 am)
Never mind, It turned out to be that I used " marks instead of \" in a behavior field, It had nothing to do with the engine. Sorry. :P
#11
06/19/2013 (9:56 am)
What, again? lol
#12
06/19/2013 (10:42 am)
You know, in script, if you want to write a quotation mark (making it appear, I mean, for example: Hello, never say "BTW."), you have to use
\"
#13
06/19/2013 (12:03 pm)
Of course! It's called "escaping the character" and you have to do it in C++ most of the time as well. So, to actually dislay the quotation mark in a string you'd have to do something like this:
"\""
#14
06/20/2013 (8:48 am)
Yeah. The only problem is that every time I save, it always resets
"\
to plain 'ol
"
. I guess if I used
"\
the problem would be fixed, though!
#15
06/21/2013 (6:31 am)
What are you editing your scripts with? If it's eating punctuation you might want to consider changing editors....
#16
06/21/2013 (8:33 am)
It's not the editor, it's TGB. Every time you save a level, it tricks itself in to thinking it shouldn't use the right syntax.
#17
06/21/2013 (12:13 pm)
That should not be possible. A level is a simset and simsets save themselves directly. That's very odd.