Sort Order

Hello again.

I would like to know what is the sort order for a font. If I select Glyph Index in Tools/Options/Overview, can I assume that the sort order will be driven by this index.

If not, where can I find details on the rules given in the manual section 4.3.14?

If I have a letter, say A, and there are 5 different accented A’s, I want to make sure that all words beginning with A, and all of its accented variations appear before B. How do I ensure that this will be the case?

Thank you.

The sort order is very specific for the entire font, and there is no way change it.

Sorting Glyphs

And what is the sort order? Is it the Glyph Order? Is it the way the glyphs appear in the Glyph Preview window?

I don’t care to change the sort order, but I do want to place my characters in the correct positions so that words sort correctly.

Font, Sort, only affects the order in which the glyphs appear in the Glyph Overview. It doesn’t affect the font when it is used in applications. When editing fonts regularly, one gets accustomed to finding glyphs in the same order. If one adds other glyphs at the end or in the middle of a large font, one may forget where they are. Sorting the font just helps at design stage.

Bhikkhu Pesala is right, when you sort the glyphs within a font, you only change the glyph order. That has nothing to do with the way applications sort words or character strings.

You might want to take a look at CompareString, lstrcmpi and other compare functions available in Windows development environment.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/strings.asp

We might be able to help you when you explain what you are really trying to accomplish.

Thank you. Perhaps I am not asking my question correctly, or I am not understanding your answers.

If I type a series of characters in MS Word, and then sort them, the result is:

&*()-,.:_{};¡@#$%^¿‘“+<>/=0123456789
aAáÁàÀâÂäÄãÃbBcCdDeEéÉèÈêÊëËfFgGhHiIjJ
kKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ

(CR/LF inserted to shorten the line)

Notice how the accented A’s all appear before all the E’s, which is the correct lexicographical sort order. But if I look at the Glyph Overview window, the glyphs do not appear in that order at all, in fact, not even the punctuation marks are in the same order.

So my question is, what is the driver, what causes the correct lexicographical order for accented characters? I don’t care to change things; I just want to make sure that my characters sort in the correct lexicographical order.

With the intention of further clarifying I repeat that I am not looking to modify the sort order, on the contrary, I want to create my font in compliance with the standard lexicographical order. So my question is: How do I make sure that I am in compliance with such order, as I create my font?

Thank you again for taking time to answer my questions.

I have found a Technical Report on the Unicode website which addresses my question exactly. The issue is obviously a complex one.

In Unicode terminology, my question refers to the Collation Order, for which Unicode includes a specific algorithm.

http://www.unicode.org/unicode/reports/tr10/

Applications sort words and character strings based on characters (or character code points) not based on glyphs. So again don’t worry about the glyph order, that is irrelevant. Just make sure your fonts have correct Character to Glyph Index Mappings and it will work like any other font.

The subject of collation appears to be a very complex one, but probably some basic functionality to address it will eventually be necessary in Font Creator.

Take for example Bhikkhu Pesala’s font Verajja. When that font is used in one language, say English, the material written with it will sort in one way, yet, if it is used in a different language, say French or Tibetan (I am taking a long shot here, since I don’t know if it could be used for Tibetan :wink:, it would sort completely different, and not necessarily correct. Right?

I suspect that you may already be taking a look at the Technical Report I pointed to earlier.

A most challenging and interesting problem, I would say. :slight_smile:

The TrueType and OpenType specifications don’t have room for sorting text, so there is no use (and no way) of adding this kind of feature into FontCreator or any other font editor. Please correct me if I’m wrong.

Again it is the responsibility of the word processor to sort text. The link I mentioned earlier addresses this, as the CompareString function compares two character strings, using the specified locale.

A personal pet peeve: THEY changed the “natural” collating sequence when I wasn’t looking so that a space (lack of a value) sorts between a dash - or a period . and parentheses )(, or an underscore _ …

When I was born, a space came at the top, but as I’ve gotten older, it has been pushed down and down. Whatever the reason, IT’S NOT RIGHT!

THERE CAN BE NOTHING SMALLER THAN NOTHING WHEN COMPARED TO SOMETHING … at best it’s illogical, by the same logic.