PDA

View Full Version : Text widget text font sizing bug?



StoryWeaver
January 10th, 2020, 10:09
I'm in the middle of writing code for a height widget in one of my extensions.

I'm wondering if it's a bug or if I need to code something differently for it to work properly in FGU vs FGC.
Didn't see anything new or any obvious changes in the scripting reference manual.

What's happening is that in FGU the text is tiny, only visible after zooming in a lot. Also the placement is either outside the widget frame or not centered.
Where as in FGC it's working fine and placing correctly inside the text widget frame.

Testing the same code in FGC at 100x100 px grid, 80% token size: 31172

And the same in FGU at 100x100 px grid (zoomed in very close to show the text), 80% token size: 31173




Test widget code for the larger widget directly on the right.

function textWidgetTest(token)
wdg = token.addTextWidget("height_large", 'HEIGHT');
wdg.setVisible(true);
wdg.setName("test_widget");
wdg.setPosition("right",0,0);
wdg.setFrame('tempmodmini',10,10,10,4);
wdg.setColor('#FFA242');
wdg.setMaxWidth(200);
wdg.bringToFront();

Debug.chat('Test widget created', wdg)
end


ps. Wasn't sure about posting this here or in the workshop, but if it's a FGU issue then maybe here is better for now? Particularly if it is in fact a bug.