Wednesday, May 24, 2006

 

Let's Build a Make Fractions Script

Making fractions from already set text is at best a tedious process. An attempt was made by the OpenType fonts team to build the solution into the fonts themselves, but they quickly discovered that there is no universal solution to the problem. People type fractions in a wide variety of ways and there's no way that a font-based solution can satisfy everybody. For example, is 11/2 one and a half or eleven over two?

But a script has more freedom. For one thing, you only use it if you want to. For another, it could be configurable (e.g., it could offer an option whereby if the last three characters of a candidate fraction are one of these three: 1/2, 1/4, or 3/4, then the candidate would be treated as a fraction suffix to the number, so, in the above example with this option switched on, 11/2 would be one and a half, but with it switched off it would be eleven over two).

Perhaps more important because it is the more common case, what about fractions that are set as 1 1/2? Surely the script should get rid of that space when it converts the 1/2 to a fraction. Well, until earlier this year, I'd have said "certainly" but a project we're working on requires that the space be left there -- so, we need another option for this case.

The next problem that comes to mind is: how should the fractions, once identified, be constructed. There are a number of possibilities:

1. Switch on OpenType Fractions.
2. Use superscript and subscript character styles.
3. Use local formatting for superscript and subscript.

Perhaps the script has to be smart enough to choose among these. OpenType fractions are the best when they're available. The extent to which they're available is an issue though. Some of the Pro fonts support arbitrary fractions; others don't. Some used not to but now do, creating a scenario where text set using arbitrary fractions might work on some machines but not others -- that's a really big yuck, but one could also argue it is the price of progress. Right now, I don't know how to interrogate an OpenType font to find out what it does or does not support.

Another issue that springs to mind is the desire if using superscript and subscript to boost the weight of the font to compensate for the effects of scaling the characters to about 60% of their normal weight. A script that can't do this is a bit useless in my mind, but it raises the issue that different fonts use different names for their weights (or have different repertoires of available weights). I deal with this when setting by hand by having different fraction-creating character styles. The script, then, needs to be able to choose among fraction-creating character styles.

Maybe the script can help out by having a naming convention, but hey, projects have naming conventions for styles, so a script must surely be able to work with the user's styles. I have some vague ideas on how to solve this problem, but they're not cast strongly enough yet to present.

Another issue that springs to mind is what about "word fractions" such as numerator/denominator = result. Perhaps this is easily solved by yet another option.

Then there's the issue of mixed numbers and words. What does the script do with 129/133rds -- in particular, how should the "rds" be set?

Of course, the script has to be smart enough to realize that 5/6/06 is not a fraction, it's a date -- if you want that (or anything like it) to be a stacked fraction then you should be using a Math package of some kind. But what about 100/ or /100? Are they fractions?

Wow, the list of questions is long. I'd welcome any input on this.

Dave

Comments:
The underwhelming response to this idea has me setting it on to a backburner.
 
Hi Dave!

Couple things ... we put up a "Guide to Open Type Fractions" on our site last year that shows how each of the CS2 OT fonts handles fractions (including both versions of Myriad Pro). Guess we should update it for CS3 ... include Arno.
http://indesignsecrets.com/download-our-guide-to-opentype-fractions.php


The other thing, have you used/tried Dan Rodney's Proper Fractions script? I find it works great.
http://www.danrodney.com/scripts/properfraction.html
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?