Strange font size issue

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SteveB
Posts: 40
Joined: Mon Sep 30, 2019 4:49 pm

Strange font size issue

Post by SteveB » Wed Mar 08, 2023 4:00 pm

Hi everyone

I'm having a strange font size issue using an external font.

The fonts I'm using are Gill Sans MT.ttf and Gill Sans MT Bold.ttf which I have set in the Copy Files panel, and text in fields and on buttons have been set to use these fonts from the picker.

In the Android simulator everything works fine, the font face and size are correct. But on a real device some, not all,fields and buttons have the correct font but the size is wrong.

Going back to the property inspector in the IDE I find that for the fields and buttons that are displaying incorrect size the size number is in italics.

Image

If I click size up/down then the italics disappear, and the font then displays correctly on the real device.

There are a lot of instances of these fonts in the stack, so I've tried re-setting the fontSize property in script but this doesn't work. The size remains in italics. it only changes if I use the up/down buttons.

So what is different when using the up/down buttons? I'm using Livecode 9.6.9 (rc2)

Thanks
Steve

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7239
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Strange font size issue

Post by jacque » Thu Mar 09, 2023 7:53 pm

Italics mean the property is inherited. You can either set the font size specifically on each field, which is what the arrow buttons do, or set the size in the card, group, or stack so it will inherit on all fields that have no size set. Apparently your stack is using 12 point text so unspecified fields will display as 12 point.

You can set the size in a script but you'll need to save the stack for it to stick. This is a one-time thing during development usually.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Android Deployment”