The ordinals feature works for me — have you tried the font?
After a digit, all alphas are superscripts until a non alpha character is typed — that is any punctuation, space, or digit (other than A-Z, a-z, Èè or Úú).
Works for 1st, 2nd 3rd, 1ST: 2ND; 3RD; 1èm, 2o, 3ú, or 7/16ths 31/32nds etc.
After a digit, all alphas are superscripts...
But that should only occur in ordinal situations.
Consider, for instance, an address like 221b Baker St.
Or an era like the 1960s.
Or 50k (either a sum of money or a race distance).
Those would have superscripted alphas if your feature were applied as a paragraph style sheet.
I suspect there may be yet other kinds of letter-number sequence that occur in text where ordinals would not be appropriate.
I suppose one could limit the ordinals group to only s, t, h, r, n, d, o, è, ú, and S, T, H, R, N, D, O, È, Ú, but that seems far less flexible. As you say in the linked thread, "This works for English," but what about other languages, and what about text set in all capitals or small capitals, e.g. 4TH JULY?
Calibri, Constantia, etc., just apply superscripts to all text with the ordinals attribute, regardless of whether it follows a digit or not.
In PagePlus it is easy to enable or disable the Ordinal feature from the text context toolbar.
If one is going to have an Ordinals feature, it should at least be different than the Superiors feature, or else it is redundant, so why bother?
So your code, which discontinues the feature after a non-alpha character is OK, as is mine, which is English-specific.
The reason my code doesn't cover superior capitals is because I have yet to produce a font with those glyphs!
However, I have considered it; I particularly like the idea of superior capitals with dots underneath them, a style which was used in the 19th century for abbreviations.
As for other languages, I haven't gotten around to that just yet.
Nick: If one is going to have an Ordinals feature, it should at least be different than the Superiors feature, or else it is redundant, so why bother?
1. So that feature tagged text created in a font that supports the ordinals feature displays with appropriate ordinal forms in your font, even if these forms are identical to the superscript feature forms and are even referenced from the same lookups;
2. Users working with tagged text (e.g. XML) might have have defined a distinction between superscript and ordinals, and it is convenient for them if these are mapped to corresponding features in style sheets, again independent of how the results are either displayed or arrived at in a particular font.
I will have to admit that I would expect superior letters to have exactly the same baseline as superior digits, so that I can refer to x squared, or x raised to the power of a, with equal facility. But many typefaces are not primarily intended for the typesetting of mathematical formulae.
But many typefaces are not primarily intended for the typesetting of mathematical formulae.
Yes. And if you will read the whole thread, you'll note that "mathematical formulae" are not the only, or in this thread, even the primary concern.
Sometimes ordfeminine & ordmasculine have small underlines.
Is the underline appropriate for all languages?
Sorry for the lazy Post! I am doing a writeup of ordinal usage and will post up.
In the mean time here are a couple of links:
Links and further Reading
Conversation about the underscore:http://forums.adobe.com/thread/565418?decorator=print&displayFullThread=true
Typophile thread about kerning ordinals:Node 67507
Typophile thread about various uses of ordinals:Node 16879
This last entry is clearly spam…
Spam paid by whom...? SOftmaker distances itself from these rumours, true or false. Rather a desperate act to somehow make contact, be useful... But still, it does seem rather pointless.