G
Gary Schuldt
[Sung to the tune of "White Christmas" . . . ]
I'm trying to format labels to stick onto garden plant tags. The tags are
metallic and of fixed size. The label will consist of a variable number of
lines depending on the taxum (genus/species/variety) and common name of the
plant.
Any of those fields could be missing, except genus, and the names can be any
length. One goal is to make the best use of physical space on the label.
Another is to stay with a uniform font; at the moment we're using Ariel.
Using Len(string) to figure out how long the line will be, say, in inches,
amounts to just a crude estimate of the true length, since, for example, and
"l" takes a lot less linear space than an "m" in a non-fixed font like
Ariel.
So: I figure it would be neat to have something like a
fcnPrintLen (String, FontName, FontSize)
that would return the length in inches (or mm or whatever) occupied by the
String when printed using FontName with FontSize.
The simplest usable form, I guess, would be fcnPrintLen(String, FontSize),
where Ariel Non-Bold Non-Italic was assumed. A more general form would be
fcnPrintLen (String, FontProperties)
where FontProperties would be the entire set of properties that describe a
font (name, size, bold, italic, and whatever else is needed).
Actually, going for the moon (!), it'd REALLY be cool to have a
fcnLargestFontSize (String, LineLength, FontProps),
which would return the largest font size I could use to fit String into a
line of LineLength when "printed" using FontProps (fontname, italic/no,
bold/no, etc).
Just dreaming here on a lazy Sunday afternoon . . . I don't want to have to
collect all the data such a function would have to know--the "width" of each
character in some standard units and all--if someone else has already done
it.
Thanks.
Gary
I'm trying to format labels to stick onto garden plant tags. The tags are
metallic and of fixed size. The label will consist of a variable number of
lines depending on the taxum (genus/species/variety) and common name of the
plant.
Any of those fields could be missing, except genus, and the names can be any
length. One goal is to make the best use of physical space on the label.
Another is to stay with a uniform font; at the moment we're using Ariel.
Using Len(string) to figure out how long the line will be, say, in inches,
amounts to just a crude estimate of the true length, since, for example, and
"l" takes a lot less linear space than an "m" in a non-fixed font like
Ariel.
So: I figure it would be neat to have something like a
fcnPrintLen (String, FontName, FontSize)
that would return the length in inches (or mm or whatever) occupied by the
String when printed using FontName with FontSize.
The simplest usable form, I guess, would be fcnPrintLen(String, FontSize),
where Ariel Non-Bold Non-Italic was assumed. A more general form would be
fcnPrintLen (String, FontProperties)
where FontProperties would be the entire set of properties that describe a
font (name, size, bold, italic, and whatever else is needed).
Actually, going for the moon (!), it'd REALLY be cool to have a
fcnLargestFontSize (String, LineLength, FontProps),
which would return the largest font size I could use to fit String into a
line of LineLength when "printed" using FontProps (fontname, italic/no,
bold/no, etc).
Just dreaming here on a lazy Sunday afternoon . . . I don't want to have to
collect all the data such a function would have to know--the "width" of each
character in some standard units and all--if someone else has already done
it.
Thanks.
Gary