Crazycarpet Posted August 16, 2016 Share Posted August 16, 2016 In my C++ project the following crashing on the 'GetTextWidth' line, during the following code in my App.lua after updating my project: //Create a context. context = Context::Create(window); System::Print("TESTING"); //Makes it here, then crashes. //context->SetFont(Font::Load("Fonts/Arial.ttf", 36)); //When uncommented, makes it here, then crashes. System::Print("Size: " + to_string(context->GetFont()->GetTextWidth("gfdgdgfdgfd"))); System::Print("Made it here!"); System::SetProperty(PROPERTY_MOUSESENSITIVITY, mousesensitivity); I'm wondering if anyone else is having issues with GetTextWidth (In C++ only, works in Lua for me...) or if this is just a me thing. I added that test code because BEFORE I added it GetTextWidth was crashing elsewhere in my project. I find it very weird that this only crashes the app when called in C++. 1 Quote Link to comment Share on other sites More sharing options...
martyj Posted August 16, 2016 Share Posted August 16, 2016 If I had to guess, it's related to this bug report. http://www.leadwerks.com/werkspace/topic/14952-contextgetwidth-contextgetheight-no-longer-return-valid-info/#entry101257 1 Quote Link to comment Share on other sites More sharing options...
Crazycarpet Posted August 16, 2016 Author Share Posted August 16, 2016 If I had to guess, it's related to this bug report. http://www.leadwerks.com/werkspace/topic/14952-contextgetwidth-contextgetheight-no-longer-return-valid-info/#entry101257 Makes sense. 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.