Ordinals and Superscript

Hi,

I wonder why glyphs with .ordn suffix aren’t automatically included in ordn feature?

I need to put all numbers and a-z letters into sups feature (advanced references), but also I’d like to have separate glyphs for ordinals purposes like english 1 st, spanish 1 er, but also for abbreviations like french M elle. Ordinals would sit a little bit lower than their superscript counterparts.

I am aware that there are ordinals 1 st, abbreviations M elle, and references xxx 2 and use of them vary between countries. But in my scenario references are the most important thing.

Or maybe I should create stylistic set with lowered superscript?

I would be grateful for any suggestions.

Thanks.

I think that is French. Spanish 1o and 1a actually is generated automatically if you have ordfeminine or ordmasculine in the font.

The official recommendation states: ‘Function: Replaces default alphabetic glyphs with the corresponding ordinal forms for use after figures. One exception to the follows-a-figure rule is the numero character (U+2116), which is actually a ligature substitution, but is best accessed through this feature.’

We cannot guess for which languages you want to have ordn in your font, so, as with most contextual substitutions, it is probably best to write it yourself. Also, there are different approaches to it, and it is quite a hefty discussion how it should be done.

There are people who do the whole alphabet as .sups, and then, in ordn, they do something like this:

sups0 = [a b c d e egrave f g h i j k l m n o p q r s t u v w x y z];

sups1 = [a.sups b.sups c.sups d.sups e.sups egrave.sups f.sups g.sups h.sups i.sups j.sups k.sups l.sups m.sups n.sups o.sups p.sups q.sups r.sups s.sups t.sups u.sups v.sups w.sups x.sups y.sups z.sups];

lookup ordn1 {
    sub [zero one two three four five six seven eight nine] @sups0' by @sups1;
} ordn1;

lookup ordn2 {
    sub @sups1 @sups0' by @sups1;
} ordn2;

But not everyone who has .sups glyphs in his font, also wants such an extensive ordn feature. So it is probably best to only do the obvious stuff.

1 Like

Yes, of course.

So I thought, that full set of a-z glyphs would do the job. Here is the description of Superscript http://www.microsoft.com/typography/developers/fdsspec/lowercase.htm

Ordinals are superior lowercase letters that are used in abbreviations in Spanish and other romance languages.

So english, spanish and french. Nothing more I guess. (portugese?)

I like the approach where ordinals’ and abbreviations’ ascenders are at the uppercase height. But this demands two similar sets of glyphs – for ordinals and superscript.

For example SkolarSans uses for ordinals/abbreviations/superscript the same set which is positioned somewhere in the middle. This is very elegant, isn’t it?

I had people screaming at me for switching the ordinal endings st, nd, rd, th to superscript. Apparently, it is not done in English text (anymore), but considered better to leave them as regular letters. In other words, it is probably best to simply create a .sups alphabet for the user to activate it when he wants it. Not sure I would automate it in ordn.

Just wanted to tell you that in Spanish it is actually very common to see 1 er. An example:

And you can see other combinations as well, like 1 ra:

Or 1 era:

Or 2 da:

1 Like

Also notice the AM in the first example. Is it ordinal, or superscript? This kind of problem applies in any Latin language. Also what if you want caps to be ordinal as well?

I doubt that any of the layouts were created using an opentype feature. let alone the designer being aware such feature exists … and if so how to access it :stuck_out_tongue:

anyway i understand why you would want to try and implement it.
as am i at the moment. i built little ligature combos for the english variations. and will add the others in a similar way. my snippet if anyone cares (very simple)

sub [zero one two three four five six seven eight nine] [A a]' by ordfeminine;
sub [zero one two three four five six seven eight nine] [O o]' by ordmasculine;
sub one s' t' by s_t.ordn;
sub two n' d' by n_d.ordn;
sub three r' d' by r_d.ordn;
sub four t' h' by t_h.ordn;
sub five t' h' by t_h.ordn;
sub six t' h' by t_h.ordn;
sub seven t' h' by t_h.ordn;
sub eight t' h' by t_h.ordn;
sub nine t' h' by t_h.ordn;
1 Like

You can do this from four onwards:
sub [four five six seven eight nine zero] t' h' by t_h.ordn;
The code is still pretty English-centric though, what if someone wants French or other random ordinals? It’s probably more flexible to have these ordinal letters separate, also to make them survive tracking.

ah yes of course, thanks for the pointer.
regarding the language. I haven’t covered all options in the snippet that is true, (yet).
it was just an example.

I am curious how this would work.

As /A and /a get the feminin,
is there a way to force the /a_m.ordn after the fact?
i figured i would use the /ordfeminine as a selector but its not working.
any ideas?

sub [zero one two three four five six seven eight nine] [A a]' by ordfeminine;
sub [zero one two three four five six seven eight nine] [A a ordfeminine]' [M m m.fina]' by a_m.ordn;

No worries. I also realised you may be making a script face for which you might prefer ligatures.

For the new code idea, you need to have the identical number of glyphs in both groups. The end of the first line has to be like this for example:

...nine] [A a]' by [ordfeminine ordfeminine];

And after further grouping & simplification, it’ll be like this:

@nums = [zero one two three four five six seven eight nine];
sub @nums [A a]' by [ordfeminine ordfeminine];
sub @nums [A a ordfeminine]' [M m m.fina]' by a_m.ordn;

not sure why the target has to be a group with the same amount exactly.
as that bit was original create automaticly by glyphs and working.

so my main issue is
once i have an ordinal say for /e – /er no longer works
or
once i have an ordinal say for /a – /am no longer works

heres the current code:

@nums = [zero one two three four five six seven eight nine];
sub @nums [A a]' by [ordfeminine ordfeminine];
sub @nums [O o]' by [ordmasculine ordmasculine];

#daytime
sub @nums [A a ordfeminine]' [M m m.fina]' by a_m.ordn;
sub @nums [P p]' [M m m.fina]' by p_m.ordn;

#french
sub @nums [E e]' by e.ordn;
sub @nums [E e e.ordn]' [R r r.fina]' by e_r.ordn;

#english
sub one s' t' by s_t.ordn;
sub two n' d' by n_d.ordn;
sub three r' d' by r_d.ordn;
sub [four five six seven eight nine] t' h' by t_h.ordn;

would i be mistaken to expect that i can sub glyphs which i have already subbed in previous lines?

The target group has to match the same number of glyphs; how would you make sense of the substitutions below, for example?

sub [A B C D] by [a b c];
sub [X Y Z] by [w x y z];

By the time daytime substitution is run, [A a] is already substituted to ordfeminine, so there’s a bit of redundancy. Same goes for French e thing (by the second line, all the e had become e.ordn).

And here’s a bigger surgery. I think the reason why it doesn’t work is that the substitution types are mixed; some are one-to-one substitutions, and others are multiple-to-one. I advise you group them into lookups depending on the substitution type. The code will look like below:

@nums = [zero one two three four five six seven eight nine];

lookup ligature_solution {
	# daytime
	sub @nums [A a ordfeminine]' [M m m.fina]' by a_m.ordn;
	sub @nums [P p]' [M m m.fina]' by p_m.ordn;
	# french
	sub @nums [E e e.ordn]' [R r r.fina]' by e_r.ordn;
	# english
	sub one s' t' by s_t.ordn;
	sub two n' d' by n_d.ordn;
	sub three r' d' by r_d.ordn;
	sub [four five six seven eight nine zero] t' h' by t_h.ordn;
} ligature_solution;

lookup one_to_one {
	sub @nums [A a]' by [ordfeminine ordfeminine];
	sub @nums [O o]' by [ordmasculine ordmasculine];
	#french
	sub @nums [E e]' by e.ordn;
} one_to_one;

yes, i understand that the number of entries in a group should be synced
but my understanding also was that you can replace the entire group with a single entry too, no?

anyway, thank you for your pointers, your suggestion works great.
i am doing a bit research still which combos i need to cover all ends.

rare but still, besides the o theres also vo according to http://www.personal.psu.edu/ejp10/blogs/gotunicode/2009/11/glyph-dujour-romance-ordinal-a.html

anyways. thanks again tosche!!!

Hi Dadastudio,

A method to include the ordn use of Mme(s), Mlle(s), Me, Dr, Mgr, Pr, No, 1er, 1re, 2e… in the feature (you can customize it) – and try it within your stylesheet in Adobe ID or Quarkxpress:

feature ordn {

sub one a' by ordfeminine;
sub one o' by ordmasculine;

@filled = [A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z];

lookup SecondGlyph {
	ignore sub D r'@filled;
	sub D r' by r.ord;
	
	ignore sub M e'@filled;
	sub M e' by e.ord;
	
	ignore sub P r'@filled;
	sub P r' by r.ord;
	
	ignore sub N o'@filled;
	sub N o' by o.ord;
	
	
	sub N o' s by o.ord;
	sub C i' e by i.ord;
	sub M m' e by m.ord;
	sub M m' e s by m.ord;
	sub M l' l e by l.ord;
	sub M l' l e s by l.ord;
	sub M g' r by g.ord;
	sub V v' e by v.ord;
	sub one e'r by e.ord;
	sub one r'e by r.ord;
	sub [two three four five six seven eight nine] e' by e.ord;
} SecondGlyph;

lookup ThirdGlyph {
	sub N o.ord s' by s.ord;
	sub C i.ord e' by e.ord;	
	sub M m.ord e' by e.ord;
	sub M m.ord e' s by e.ord;
	sub M l.ord l' e by l.ord;
	sub M l.ord l' e s by l.ord;
	sub M g.ord r' by r.ord;
	sub V v.ord e' by e.ord;
	sub one e.ord r' by r.ord;
	sub one r.ord e' by e.ord;
} ThirdGlyph;


lookup FourthGlyph {
sub M l.ord l.ord e' by e.ord;
sub M m.ord e.ord s' by s.ord;
sub M l.ord l.ord e' s by e.ord;
} FourthGlyph;

lookup FifthGlyph {
sub M l.ord l.ord e.ord s' by s.ord;
} FifthGlyph;

} ordn;

Portuguese use usually a and o (1ª 2ª 1º 2º) . But in rare cases, you can use the plural 1as 2as 1os 2os… (and it’s also common a underline at the ordinals)