gamecreator Posted July 26, 2017 Share Posted July 26, 2017 I downloaded a free font with an otf extension. Everything works fine in my project. However, when I try to publish it, the font fails to load from data.zip file. I made sure to add otf to Include Files and I unchecked "Only include used files," just in case. Font is here: http://www.1001fonts.com/seshat-font.html Quote Link to comment Share on other sites More sharing options...
Josh Posted July 26, 2017 Share Posted July 26, 2017 Does Leadwerks actually load OTF? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
gamecreator Posted July 26, 2017 Author Share Posted July 26, 2017 I wasn't sure it would but yeah, seems to work fine outside of the data file. Not the end of the world for me. I can switch to a different font or just leave the font unpackaged (it's free even for commercial). Just bringing it to your attention. (Again, I hesitate bringing things like this up because I don't want to take your time away from what I consider more important, like the character controller slope jump issue.) But it's funny that Leadwerks does things you don't even know about. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted July 26, 2017 Author Share Posted July 26, 2017 Damn. This may be a bigger issue. There are other things that don't load from data.zip file that should, like textures. Investigating... Quote Link to comment Share on other sites More sharing options...
gamecreator Posted July 27, 2017 Author Share Posted July 27, 2017 It seems like loading from data.zip doesn't work any more but I could also be doing something wrong. Project file: https://www.mediafire.com/?b2at84k3380jqc9 I started a new project, added a new Menu folder under Material and put a tex file there. Everything runs fine from Visual Studio and the exe. But if you Publish it as standalone, the load fails. Here's the test code. #include "Leadwerks.h" using namespace Leadwerks; int main(int argc, const char *argv[]) { Leadwerks::Window* window = Leadwerks::Window::Create(); Context* context = Context::Create(window); World* world = NULL; //Load a texture Texture* texture = NULL; texture = Texture::Load("Materials/Menu/arrowright.tex"); if(texture==NULL) { MessageBoxA(0, "Texture load failed.", "Error", 0); exit(1); } while(true) { if(window->Closed() || window->KeyDown(Key::Escape)) return false; context->SetBlendMode(Blend::Alpha); context->SetColor(0,0,0,0); context->Clear(); //Display the texture on screen context->SetColor(1,1,1,0); context->DrawImage(texture,0,0); context->Sync(); } return 0; } Why would loading it from data.zip fail? (I tried both include and not include unused files.) Quote Link to comment Share on other sites More sharing options...
Josh Posted July 27, 2017 Share Posted July 27, 2017 Please check the default main() code. It loads all zip files found in the game directory before starting. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
gamecreator Posted July 27, 2017 Author Share Posted July 27, 2017 Ok. That's new. That wasn't needed before (or I just never saw it back when we were using App.cpp/App.h). Thanks. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted July 27, 2017 Author Share Posted July 27, 2017 And going back to the original problem, with that code included, otf does load and work from data.zip. So this can be closed. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.