Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-06-2011, 01:47 AM
Bane Bane is offline
Registered User
Join Date: May 2002
Posts: 6
Bane is on a distinguished road
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?
Reply With Quote
  #2  
Old 05-06-2011, 01:59 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Tried Arial?
__________________
Quote:
Reply With Quote
  #3  
Old 05-06-2011, 02:10 AM
Bane Bane is offline
Registered User
Join Date: May 2002
Posts: 6
Bane is on a distinguished road
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?
Reply With Quote
  #4  
Old 05-06-2011, 02:15 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
How many Mac users is it? I've never had problems with text not showing up on Mac.
__________________
Reply With Quote
  #5  
Old 05-06-2011, 02:16 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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;
__________________
Quote:
Reply With Quote
  #6  
Old 05-13-2011, 02:39 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:16 AM.


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