We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Font issue between Windows and Mac

Palawat
Advocate
Hi everyone,

I'm starting to learn about interface scripting. I found out that , with ui_outfield, the result is not the same on Windows and Mac. Text that looks fine on Windows shows up clipped or missing on Mac.

As a Windows user, I can go to regedit to see/edit the Font Description (right now I'm using Tahoma) but I don't know how to obtain that kind of info on Mac.

Which font should I use to avoid this problem? Given the same ui_outfield's width and height, and the text will looks the same on both platforms.

Any suggestion is appreciated.
Archicad 26, Windows 10, Corei7 3.4 GHz, 16 GB Ram.
https://www.indigofigs.com
https://www.facebook.com/indigofigs
5 REPLIES 5
Anonymous
Not applicable
This is a common problem. I've seen it in other cross platform programs as well. Not sure what the fix is (if any). I'd be delighted to know if there is one.
Anonymous
Not applicable
Hello,

If I remember right from my Macromedia Director studies long ago:

It happens because (for historical reasons) Macs have 72 pixels
per inch on screen and printed - where PC:s have 96 on screen
and 72 printed.

That means for example that 9 points high text in Mac is 12 point
high in PC, thus needing more space on screen.
Jochen Suehlo
Moderator
The width and height of the Outfield does not help.
The text size is given by UI_STYLE ( 0, 1, 2)
You can request, if the object runs on Windows, so you are able to define different styles. You need to experiment a bit.
 
Example: 
 
Dose = 0 
GDL = REQ("GDL_Version") 
sts = REQUEST("Name_of_program", "",TeX) 
IF STRSTR(TeX,".EXE") OR STRSTR(TeX,".exe") THEN Dose=1 
 
IF Dose = 1 THEN tx1 = 0 ELSE tx1 = 1 
 
UI_STYLE tx1, 0 
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Anonymous
Not applicable
Hello,
Have you tried just give the expression and the x,y coordinates?
Omitting width and height makes the text self wrapping.
UI_OUTFIELD expression, x, y [, width, height [, flags]]
...
...
width, height: width and height of the text box. If omitted, the text box will wrap around the text as tight as possible for the given font.
Palawat
Advocate
Thank you so much, everyone. I'm really new at this.

Joachim, your code is way over my league but...I kinda get it. And it seems like a good practice.

Juha, I didn't know that before. I'll omit the width and height as you suggested and see how it goes.

Matthew, somehow I'm glad it's "a common problem", not just "my problem" . This platform-crossing thing will probably exist forever.
Archicad 26, Windows 10, Corei7 3.4 GHz, 16 GB Ram.
https://www.indigofigs.com
https://www.facebook.com/indigofigs