Fraction letter positioning ?

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
Bernie Cossentino
Posts: 65
Joined: Sun Sep 02, 2018 1:24 am

Fraction letter positioning ?

Post by Bernie Cossentino »

Hello,

Please forgive the subject title...I'm not sure how to describe what I'm hoping to achieve with my font.
I'm new to this so I do appreciate your thoughts on the following:

As in the image, essentially, I'd like to type some text (letters and/or numbers), and when a slash symbol is entered, have the remaining text positioned below.

Is there a simple way to do this?
Is there more than one approach, and if so, what would they be?

Many thanks
Attachments
abc slash.PNG
abc slash.PNG (4.4 KiB) Viewed 2001 times
Font Creator 13
Windows 7 and 10 Pro
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9876
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Fraction letter positioning ?

Post by Bhikkhu Pesala »

There is a way to do this, but it is not what I would call simple. I have such a feature in my fonts to create complex fractions from both text and numbers. You can download my Pali Font and open it in FontCreator to inspect the code. It takes too long to explain it all here.

You will need:
  1. Superscript glyphs for A-Z
  2. Subscript glyphs for A-Z
  3. Super/subscript glyphs for any punctuation/symbols you wish to use in fractions, e.g. parentheses, plus, minus, divides, multiply, equal
  4. A fractions feature
  5. Contextual lookups
  6. Optionally, Standard fractions for ¼, ½, ¾ etc.

Code: Select all

feature Fractions frac {
  lookup SlashToFraction;
  lookup NumbersToNumerators;
  lookup FractionContext;
  lookup StandardFractions;
}
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bernie Cossentino
Posts: 65
Joined: Sun Sep 02, 2018 1:24 am

Re: Fraction letter positioning ?

Post by Bernie Cossentino »

Thank you for your reply.

I'm afraid your fractions approach is much too complex for my needs.

I tried using cursive attachments for the slash and the letters following it. It seems to work, at least as a web font. But it doesn't quite work in my application. I'm not quite sure I've programmed the cursive script properly but will try experimenting more here.
Font Creator 13
Windows 7 and 10 Pro
Post Reply