Re: Question about "getting" font width values for same-font characters
Re: Question about "getting" font width values for same-font characters
- Subject: Re: Question about "getting" font width values for same-font characters
- From: Graff <email@hidden>
- Date: Sat, 07 Feb 2004 19:14:50 -0500
This is a very difficult question because it relies on so many
variables. First of all, does the application render type through
Carbon, Cocoa, or use its own internal routines? Will the application
be doing any kerning of the fonts? Does the application use fractional
fonts or only whole numbers? What is the output resolution of the font
and its intended output medium? These are just a few considerations
that need to be addressed.
Probably the easiest way to go about this would be to look in the
AppleScript dictionaries of the applications that you want to
eventually do the layout in. Is there any way that you can use the
application itself to do these sort of measurements? Unfortunately I
do not have XPress or InDesign so I can't help you any further with
them. Maybe someone who has access to these applications can help you
out further.
I could whip up a plain-vanilla measuring utility which would use the
Carbon or Cocoa font management facilities but that would only get you
rough approximations which would quickly fall apart for text runs of a
few dozen characters or more. It's probably not worth the effort and
frustration for the dubious benefits you would get.
- Ken
On Feb 7, 2004, at 5:31 PM, Macintosh info wrote:
Hello,
With an eye toward automating a variety of typesetting processes in
QuarkXPress and/or InDesign, I'd like to know if it is possible through
AppleScript to discern the absolute width (in inches, or millimeters,
or
points) of any character of a given typeface at any particular size,
and
doing so (hopefully) by accessing some kind of constant value for the
character, preferably from the font itself, and preferably without
setting
up scripts to run through numerous tests that would discern these
values?
For example:
A lowercase, untracked, 12 pt. Helvetica "w" at 100% horizontal
scaling is
.12" wide (according to my way of measuring)
and
A lowercase, untracked, 12 pt. Helvetica "i" at 100% horizontal
scaling is
.036" wide (according to my way of measuring)
...is there some kind of metric or constant value for these characters
(and
the others in the Helvetica roman weight) that would accurately let me
predict what the absolute widths of the same characters at different
point
sizes would be?
My goal is to capture these values as globals in a FileMaker database
and
use multipliers to enlarge or reduce the baseline value according to
variations in point size, tracking and horizontal scaling.
Thanks,
Bill Planey
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.