I may be way out of league asking this question but is there a way to get the linear length of a letter or words. That is, if you were to take the word "super" and measured the outside border of the letters you'd get a measurement. Is there something out there that would tell me this measurement if I give the font and the font size? I'm a rookie here so be gentle. thanks in advance.
This is trivial to do using TeX/LaTeX (though you'll want to use a newer version such as xetex or luatex so as to be able to easily access OpenType and TrueType fonts):
which will output: 0.2060in
OpenType features are supported:
|show 3 more comments|
In terms of commonly-available tools, no, there's nothing that will take [random-font] [size] and [characters] as inputs and spit out a length. There are several reasons why this will always be true, but the main one is that every normal (not monospaced) font has its own kerning table that can and often does vary somewhat from one release of the font to the next, not to mention the fact that different type foundries publish their own versions of popular typefaces (Futura, Times, Gill Sans, etc.), with their own variations in character outlines and kerning. All that, and we haven't even mentioned ligatures, tracking, custom kerning or automatic character alternates or swashes such as are commonly available in OpenType fonts.
So although a measuring tool of the kind you're asking about could in theory be made, the practicalities involved in making it actually useful would probably make it too expensive to be worth the effort.
All is not lost, though. Every design application has some form of measuring tool (even, as WillAdams points out, specifically for type in the case of LaTeX) that can be used to measure anything on the page. In the Adobe applications it's found nested with the Eyedropper tool. It's manual, but it works.
There are many ways this could be done. I'm showing here how a engineer would approach the problem. The point is to show that the approach is in many ways analogous to many other fields. Enumerating it aloud seems boring and in simple cases like this its done silently in the head. This just illustrates the method.
Warning long explanation.
Stage 1: Define solution
As you can see there's a lot of unknowns that need to be answered. Especially if one wants to have a good solution that could be shipped to client. Always strive to understand the problem.
Stage 2: Search for methods in literature (or brainstorm)
First stage is to list applications and methods that could yield answers:
The list is sufficent go test
Stage 3: Prototype (sketch)
Postscript is a known method, problem with postscript is what engine do you use to do this as they have slightly different effects. Using gohostscript following batch file works:
Works on windows, returns point width, probably also works linux with a few changes. Border constraints unknown. Ask clarification. Problems: need to fix char encoding or use intermediary ps file. Otherwise no spaced string works. Nasty encoding issues, manageable if using western languages.
Using Illustrator and javascipt
using illustrator manually: If you outline the path you can read the width of the text in the width box in the gui. Once this is understood it can be scripted.
Works, but needs Illustrator may or may not be a problem. Result may be refined for some technical aspects if needed. Same thing could be done in VB or applescript, or using COM with C, C++, python, perl, ruby etc. Can be used trough command line too if its necessary.
And after some of the ones above are tested choose one for refinement.
PS: Could op clarify?