|
![](/i/fill.gif) |
Lummox JR wrote in message <38B### [at] aol com>...
>And the function numbers:
>
> 1 - min_extent of string <argument>, spacing included
> 2 - max_extent of string <argument>, (horizontal) spacing included
> 3 - horizontal kerning between the two characters in string
> <argument>, or 0 if the string is invalid
> 4 - maximum ascent of the font
> 5 - maximum descent of the font
> 6 - maximum character width (spacing included)
>
>Functions 4-6 will of course ignore the argument, so "" can be used.
>Naturally this idea is in its infancy, so any suggestions that could
>improve it would be most welcome.
Improvement #1: Replace function numbers with keywords. This is easy enough
to code, and will simplify using the function. For example:
Fontmetrics("arial.ttf", min_extent, "Hello, world!")
is easier to remember and understand than
Fontmetrics("arial.ttf", 1, "Hello, world!")
Mark
Post a reply to this message
|
![](/i/fill.gif) |