Yue Posted September 26, 2021 Share Posted September 26, 2021 I am trying to optimize this as much as possible and all to tip to I have problems when I do a resolution change and the widgets have a custom font that is added with: Widget:SetFont("Assets/Fonts/myFont.ttf",12) The problem here is that when I do a screen resolution change, it removes the window and thus the context is removed and I have to remove the GUI. And rebuilding it again starts the process of loading those fonts for the GUI. Then it happens that after several successful resolution changes the application crashes. It is evident that the more fonts you use, the slower the process is when changing the screen resolution, because it has to load the fonts back into memory. So I have the following questions: Is it possible to leave those fonts in memory, is there any tip for this? Obviously if I don't put custom fonts and leave the default font, this doesn't happen and the change of screen resolution is much fast Translated with www.DeepL.com/Translator (free version) Quote Link to comment Share on other sites More sharing options...
Yue Posted September 26, 2021 Author Share Posted September 26, 2021 I think the most valid option is to leave the default font with a specific size for all buttons, in favor of a fast and efficient change of resolution in real time. Or the other would be to ask the user for a manual reset and use a custom font for each widget with a specific size. There are things, decisions that favor something and harm something else. Quote Link to comment Share on other sites More sharing options...
Yue Posted September 26, 2021 Author Share Posted September 26, 2021 Solved. 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.