Windows Program not formatting like Mac

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
no1g8tor96
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 46
Joined: Fri Aug 02, 2013 12:14 am

Windows Program not formatting like Mac

Post by no1g8tor96 » Wed Feb 17, 2021 12:08 am

I am creating programs in Mac and when creating standalones for PC has not been much of a difference as to the way it looks as it should.....
But this current program I created is not working. I used a grid field to make the, well, grid for results and in the past making this was not an issue.

The grid on the mac is perfect and the spacing is crunched down for lack of better term on the PC. How can i fix this. I dont see a spot to do this for PC?

Thanks
Attachments
SC1.jpg
SC2.jpg

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Windows Program not formatting like Mac

Post by FourthWorld » Wed Feb 17, 2021 12:34 am

Does changing the field's fixedLineheight improve things?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

no1g8tor96
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 46
Joined: Fri Aug 02, 2013 12:14 am

Re: Windows Program not formatting like Mac

Post by no1g8tor96 » Wed Feb 17, 2021 2:15 am

Richard

Thanks so much for the reply. I did have fixed line height on and was working on mac. What I had to do was take FLH off and then set the font to "system", I had it set for arial before. I figured windows and mac had arial standard. That made it work but not sure why it did not transfer settings. Oh well its working now so next app will see what happens.

Maybe you can help me with putting this on an iphone. I will post an issue with an error later or tomorrow in the IOS section. Transporter errors when uploading but I can drop it on my iphone to test??

Thanks so much again

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Windows Program not formatting like Mac

Post by bogs » Wed Feb 17, 2021 11:55 am

@ no1g8tor96 - I believe the reason specific settings don't transfer (when it comes to fonts) is that each OS handles them differently in regards to scaling and drawing.

See some of the images linked at the bottom of this article : https://www.ampsoft.net/webdesign-l/Win ... Fonts.html
Image

no1g8tor96
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 46
Joined: Fri Aug 02, 2013 12:14 am

Re: Windows Program not formatting like Mac

Post by no1g8tor96 » Fri Feb 19, 2021 7:16 pm

bogs

thanks so much for the relply. It was weird. Had to not specify a font and chose system and works.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9250
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Windows Program not formatting like Mac

Post by richmond62 » Fri Feb 19, 2021 7:21 pm

Cross platform, fonts seem to be one of the biggest headaches.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Windows Program not formatting like Mac

Post by FourthWorld » Fri Feb 19, 2021 7:33 pm

Subtle differences in the font rendering engines for each platform have plagues humanity since the earliest days of GUI systems. I think you just got lucky with regard to the font's native textheight metrics.

"System" will use the OS-mandated system font, which on Windows is no longer Arial. I believe if you query "the effective textFont" of the field you'll confirm that (likely Segoe UI). Perhaps Segoe UI happens to have metrics more in keeping with whatever macOS us using as its system font these days.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Windows Program not formatting like Mac

Post by bogs » Fri Feb 19, 2021 7:44 pm

@ no1g8tor96 , I'd actually recommend using a specific font, either one that any OS your deploying to uses (such as Arial), or one that you include in the package yourself. Either that, or use images for everything. Just keep in mind that using images can get to be a lot more work.

There are several reasons for this, not the least of which is that the system font can be VERY different on an end user's system than yours.

There are lots of things you can do to get a consistent look, for instance, setting the width of a field or button to the formattedWidth of the text within it. You'll still have to look at it on the different systems you plan to deploy too, though, you may find that something like this -
set the width of field "myField" to (the formattedWidth of field "myField" +10)
may look better than setting it exactly to the width of the text inside it.

Just some food for thought.

Ps- I see Richard chimed in as well.
Image

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: Windows Program not formatting like Mac

Post by SparkOut » Fri Feb 19, 2021 11:18 pm

Font metrics are a pain all round, so take all that's been said on board. But also check the default margins are appropriate for the fields that have the rendering issue.

Post Reply

Return to “Windows”