Why is there not a function that gets the available range of a font?
For example,
you have a font (fnt_arial), with a range of 65 - 68
so the available characters from the font is A,B,C,D
Now imagine your making a user text input system or just want to see if a font has the character in it
So you would use:
and what that would do is return true or false if that font has that character in it.
Now you can do something like this:
To go more into this:
Description: This function will get the range of characters in the applied font.
Syntax: font_get_range(font,character)
Argument | Description
font | The ID or name of the font to get the range of
character | (Optional) The character to look for in the supplied font.
Returns: Boolean
Example:
The above code will return true or false if "A" is in the character range of the font.
For example,
you have a font (fnt_arial), with a range of 65 - 68
so the available characters from the font is A,B,C,D
Now imagine your making a user text input system or just want to see if a font has the character in it
So you would use:
Code:
font_get_range(fnt_arial,65);
Now you can do something like this:
Code:
if ( font_get_range(fnt_arial,65) )
{
key_available = true;
}
else
{
key_available = false;
show_messsage("The requested Character is not available in this font.");
}
Description: This function will get the range of characters in the applied font.
Syntax: font_get_range(font,character)
Argument | Description
font | The ID or name of the font to get the range of
character | (Optional) The character to look for in the supplied font.
Returns: Boolean
Example:
Code:
font_get_range(font,65);
there should also be a way to just type
and the A returned into the correct number relating to A in the font range (65)
Code:
font_get_range(font,A);
Last edited: