FEATURE FILE SAMPLE: Arbitrary Fraction support (4 Dec 2002)

Enthusiast ,
Oct 05, 2002 Oct 05, 2002

Copy link to clipboard

Copied

Here's how we've made arbitrary fractions work at Adobe.

[note: updated 4 Dec 2002]

feature frac {

lookup FRAC {
sub [zero zerooldstyle zero.taboldstyle zerosuperior zero.inferior zero.denominator zero.titling] by zero.numerator;
sub [one onefitted oneoldstyle one.taboldstyle onesuperior one.inferior one.denominator one.titling] by one.numerator;
sub [two twooldstyle two.taboldstyle twosuperior two.inferior two.denominator two.titling] by two.numerator;
sub [three threeoldstyle three.taboldstyle threesuperior three.inferior three.denominator three.titling] by three.numerator;
sub [four fouroldstyle four.taboldstyle foursuperior four.inferior four.denominator four.titling] by four.numerator;
sub [five fiveoldstyle five.taboldstyle fivesuperior five.inferior five.denominator five.titling] by five.numerator;
sub [six sixoldstyle six.taboldstyle sixsuperior six.inferior six.denominator six.titling] by six.numerator;
sub [seven sevenoldstyle seven.taboldstyle sevensuperior seven.inferior seven.denominator seven.titling] by seven.numerator;
sub [eight eightoldstyle eight.taboldstyle eightsuperior eight.inferior eight.denominator eight.titling] by eight.numerator;
sub [nine nineoldstyle nine.taboldstyle ninesuperior nine.inferior nine.denominator nine.titling] by nine.numerator;
} FRAC;

sub zero.numerator' @SLASH' zero.numerator' zero.numerator' by perthousand;
sub zero.numerator' @SLASH' zero.numerator' by percent;
sub one.numerator' @SLASH' four.numerator' by onequarter;
sub one.numerator' @SLASH' two.numerator' by onehalf;
sub three.numerator' @SLASH' four.numerator' by threequarters;
sub one.numerator' @SLASH' three.numerator' by onethird;
sub two.numerator' @SLASH' three.numerator' by twothirds;
sub one.numerator' @SLASH' eight.numerator' by oneeighth;
sub three.numerator' @SLASH' eight.numerator' by threeeighths;
sub five.numerator' @SLASH' eight.numerator' by fiveeighths;
sub seven.numerator' @SLASH' eight.numerator' by seveneighths;

sub [@SLASH @FIG_DENOMINATOR @Prebuilt] @FIG_NUMERATOR' by @FIG_DENOMINATOR;
sub [slash uni2215] by fraction;

} frac;

I hope this is helpful!

T

Thomas W. Phinney
Program Mgr., Western Language Fonts
Adobe Systems
TOPICS
Open Type FDK

Views

837

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2005 Nov 04, 2005

Copy link to clipboard

Copied

LATEST
Very helpful!
Thanks Thomas

ChrisL

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines