Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GuiTextCtrls and Macintosh Font Compatibility (https://forums.graalonline.com/forums/showthread.php?t=134263132)

Bane 05-06-2011 01:47 AM

GuiTextCtrls and Macintosh Font Compatibility
 
In my attempts to work on my engine, I've noticed that a number of Macintosh users have been informing me that they can't see the text in my GuiTextCtrl objects. Here is an example of some typical code and my attempts to make it Macintosh compatible (the area in question is in bold italics):

NPC Code:

new GuiTextCtrl("InsideText")
{
makefirstresponder(false);
useOwnProfile = true;
x = 6;
y = 0;
width = RPGText.width;
height = RPGText.height;
text = attr[3];

if (getplatform() == "win")
profile.fonttype = "Courier";


profile.fontcolor = {255, 255, 255, 1};
}



I have tried logic to change the GuiControlProfile to a different font if the detecting platform is a Macintosh, but that didn't work either.

My guess is that the Macintosh does not support the Courier font for whatever reason (this is my preferred font because all of the characters are the same size). This issue occurred on the older Graal version as well as v6.

How would I proceed in making these GuiTextCtrls Macintosh compatible? Is there a list of Macintosh compatible fonts somewhere?

fowlplay4 05-06-2011 01:59 AM

Tried Arial?

Bane 05-06-2011 02:10 AM

Yes. I've tried Arial and the other standard fonts. No go.

I think it may have something to do with the fact that useOwnProfile = true maybe?

cbk1994 05-06-2011 02:15 AM

How many Mac users is it? I've never had problems with text not showing up on Mac.

fowlplay4 05-06-2011 02:16 AM

Try using a custom profile:

PHP Code:

new GuiTextProfile("CustomTextProfile") {
  
fonttype = (getplatform() == "mac" "Arial" "Courier");
  
fontcolor = {2552552551};


then in your scripts just set:

profile = CustomTextProfile;

Admins 05-13-2011 02:39 PM

It is recommended to either use a standard font which is available on all fonts, or also upload the ttf to your server so that the client can download it if it's not available. Courier is not available on Mac, but Courier New is. In v6 it should also work fine, since it's falling back to an available font.


All times are GMT +2. The time now is 02:34 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.