Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Home
- Type & Typography
- Discussions
- FEATURE FILE SAMPLE: Arbitrary Fraction support (4...

- FEATURE FILE SAMPLE: Arbitrary Fraction support (4...

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

/t5/type-typography-discussions/feature-file-sample-arbitrary-fraction-support-4-dec-2002/td-p/1631199
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

[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

Community guidelines

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

1
Reply
1

New Here
,

LATEST
/t5/type-typography-discussions/feature-file-sample-arbitrary-fraction-support-4-dec-2002/m-p/1631200#M2240
Nov 04, 2005
Nov 04, 2005

Copy link to clipboard

Copied

Very helpful!

Thanks Thomas

ChrisL

Thanks Thomas

ChrisL

Community guidelines

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

Using the Community
Experience League
Terms of Use
Privacy Policy
Cookie preferences
AdChoices
Language:

- Deutsch
- English
- EspaĆ±ol
- FranĆ§ais
- ę„ę¬čŖć³ćć„ććć£
- PortuguĆŖs
- ķźµģ“

Copyright Ā© 2022 Adobe. All rights reserved.