From WikiChip
Difference between revisions of "mirc/identifiers/$height"
< mirc‎ | identifiers

(Created page with "{{mirc title|$height Identifier}}'''$height''' returns the height of text in pixel in the specified font. == Synopsis == <pre>$height(text,font,size,B,C)</pre> == Parameter...")
 
Line 3: Line 3:
  
 
== Synopsis ==
 
== Synopsis ==
<pre>$height(text,font,size,B,C)</pre>
+
<pre>$height(text,font,size,bNiNpNtN)</pre>
  
 
== Parameters ==
 
== Parameters ==
* '''text''' - The text you want the height of
+
* '''text''' - The text you want the width of
 
* '''font''' - The name of the font
 
* '''font''' - The name of the font
 
* '''size''' - The size of the font, you can specify a negative value to match the size of fonts in the font dialog
 
* '''size''' - The size of the font, you can specify a negative value to match the size of fonts in the font dialog
* '''B''' - Optional, pass a non-zero value to specify a bold font
+
 
* '''C''' - Optional, pass a non zero value to get control code to be processed
+
Before, there was a 4th 5th and even a 6th true/false parameters (bold, italic, and control code processing), to set some custom handling or display, it was changed to a single 4th parameter when tab processing were added:
 +
 
 +
* '''bNiNpNtN''' - Optional, defines some options for the measurement, N can be 1 or 0 to enable or disable the option:
 +
** '''bN''' enables/disables bold
 +
** '''iN''' enables/disables italic
 +
** '''pN''' enables/disables control code (-bi not needed there)
 +
** '''tN''' enables/disables tab character
  
 
== Properties ==
 
== Properties ==

Revision as of 20:34, 22 January 2022

$height returns the height of text in pixel in the specified font.


Synopsis

$height(text,font,size,bNiNpNtN)

Parameters

  • text - The text you want the width of
  • font - The name of the font
  • size - The size of the font, you can specify a negative value to match the size of fonts in the font dialog

Before, there was a 4th 5th and even a 6th true/false parameters (bold, italic, and control code processing), to set some custom handling or display, it was changed to a single 4th parameter when tab processing were added:

  • bNiNpNtN - Optional, defines some options for the measurement, N can be 1 or 0 to enable or disable the option:
    • bN enables/disables bold
    • iN enables/disables italic
    • pN enables/disables control code (-bi not needed there)
    • tN enables/disables tab character

Properties

None

Example

//echo -a $height(test,verdana,15)

Compatibility

Added: mIRC v5.4
Added on: 23 Jun 1998
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also

$width