wctltya Posted September 28, 2016 Report Share Posted September 28, 2016 Hi, I've the following label, which is in a container: // Create label widget: ghLabelUserFunctions wi.g.show = TRUE; wi.g.x = 82; wi.g.y = 12; wi.g.width = 218; wi.g.height = 20; wi.g.parent = ghContainerUserFunctions; wi.text = "ACTIVE FUNCTIONS"; wi.customDraw = gwinLabelDrawJustifiedLeft; wi.customParam = 0; wi.customStyle = 0; ghLabelUserFunctions = gwinLabelCreate(0, &wi); gwinLabelSetBorder(ghLabelUserFunctions, FALSE); //gwinSetFont(ghLabelUserFunctions, roboto_16); //gwinRedraw(ghLabelUserFunctions); If the last two lines are active the text is shifted about 12pxs right. The default font is roboto_12. On the uGFX Studio (project Screen) is OK, although in the preview screen is a mess. What could be the reason and how to fix it? Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted September 29, 2016 Report Share Posted September 29, 2016 Hi, Can you please create a minimum test case that allows us to reproduce, observe & examine the problem? A minimum test case consists of nothing else but the absolute minimum code to show the problem. In your case that would be the application code with nothing but a label, the configuration file and the corresponding font files. There really shouldn't be anything else in there. This way we can ensure that it has nothing to do with other parts of your application and we can try it on multiple platforms. Link to comment Share on other sites More sharing options...
wctltya Posted September 29, 2016 Author Report Share Posted September 29, 2016 Hi Joel, I just locate the issue. It is caused by the font, although I don't know why. Because the issue exists on the preview screen too, I tried with the integrated fonts which are OK. See the attached screenshots, please. I'm attaching the ttf font and both converted files. I don't think it is relevant to the issue, but you'll see 3 ranges inside. 20 hours ago, wctltya said: although in the preview screen is a mess I was wrong about this, due to my lack of knowledge/experience about the Studio. Once I've added the .ttf file and the engine name in the studio font manager, it became OK. RobotoTtfAndConverted12and16.zip Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted September 30, 2016 Report Share Posted September 30, 2016 Glad to hear that you managed to locate & resolve the issue. Problems like that are the reason why the new µGFX-Studio will use the µGFX library natively for rendering: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now