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
Fraction letter positioning ?
-
- Posts: 65
- Joined: Sun Sep 02, 2018 1:24 am
Fraction letter positioning ?
- Attachments
-
- abc slash.PNG (4.4 KiB) Viewed 2011 times
Font Creator 13
Windows 7 and 10 Pro
Windows 7 and 10 Pro
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Fraction letter positioning ?
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:
You will need:
- Superscript glyphs for A-Z
- Subscript glyphs for A-Z
- Super/subscript glyphs for any punctuation/symbols you wish to use in fractions, e.g. parentheses, plus, minus, divides, multiply, equal
- A fractions feature
- Contextual lookups
- Optionally, Standard fractions for ¼, ½, ¾ etc.
Code: Select all
feature Fractions frac {
lookup SlashToFraction;
lookup NumbersToNumerators;
lookup FractionContext;
lookup StandardFractions;
}
-
- Posts: 65
- Joined: Sun Sep 02, 2018 1:24 am
Re: Fraction letter positioning ?
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.
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
Windows 7 and 10 Pro