mIRC Home    About    Download    Register    News    Help

Print Thread
#82567 10/05/04 09:02 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
mIRC returns a width even if you pass an invalid font to $width, eg:

//echo -a $width(bug,rfjg46*&$^*£"¬!,11)


New username: hixxy
#82568 10/05/04 10:38 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Well if you use /drawtext with an invalid font then it will use a default font instead, presumably $width returns the width of that font.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#82569 10/05/04 10:54 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Yes, but:
1. it doesn't say that in the help file.
2. it should still return 0 or $null, because the font doesn't even exist.


New username: hixxy
#82570 10/05/04 04:07 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
1. Fair enough. Perhaps it should.
2. Why? It's not $fontexists(), it's $width() - that means it's used to check the width of some text to be used with /drawtext, which is precisely what it does.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#82571 10/05/04 04:35 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
It gives out wrong info, $width(xyz,fjt74673gfgk,10) should not be '15' unless you have that font installed.


New username: hixxy
#82572 10/05/04 09:43 PM
Joined: Dec 2002
Posts: 230
G
Fjord artisan
Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
while we're at it, an identifier that returns the installed fonts would be pretty nice smile

#82573 10/05/04 09:54 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
What do you think i was trying to use it for? :tongue:


New username: hixxy
#82574 10/05/04 10:08 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
The right tool for the right job... try a Feature Suggestion instead. :P

I agree with starbucks; $width is working as it should.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#82575 11/05/04 09:08 AM
Joined: Dec 2002
Posts: 266
Z
Fjord artisan
Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266


You won't like it when I get angry.
#82576 11/05/04 01:18 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327


New username: hixxy

Link Copied to Clipboard