`Unicode.Scalar.Properties` where/who define these "properties"?

Where does Unicode.Scalar.Properties get its property values? Must be defined somewhere? Is the source available? Who maintains these?

Unicode.Scalar.Properties – A value that provides access to properties of a Unicode scalar that are defined by the Unicode standard.

So Unicode Consortium. Also, here's an online tool for those properties: ICU UnicodeSet and Properties Demo.

1 Like

These are inherited from Unicode itself. For the source of the properties themselves, see the Unicode Character Database. For the source of the way they are processed, see International Components for Unicode.

Oh Chuck, I should clarify: I'm using SF Symbols unicode characters and those are in "Private Use Area-B". So they are not from the Unicode Standard. They are Apple specific and the Unicode.Scalar.Properties are returning meaningful values now. For these codepoints properties, where and who define and maintain them?

I'm asking this question because its seem these values are set in stone already and cannot be changed. But I keep being told these values cannot be rely on and can be changed in the future. I just don't see how they can publish these thing and want to change them, If they cannot be rely on, then Unicode.Scalar.Properties should not be returning any values.

Private use characters are placeholders that anyone as a font, application, etc. can internally assign to whatever you want. You just cannot expect anyone outside your private scope to treat them the same way. Their Unicode properties reflect that placeholder status; the properties do not reflect whatever internal purpose SF Symbols might have assigned to those code points.

Why not? Even the official \u{166D} has just changed isTerminalPunctuation to false in Unicode 12.0. From UAX#44:

The Terminal_Punctuation property of U+166D CANADIAN SYLLABICS CHI SIGN was changed to No, following the reclassification of that character from punctuation mark to symbol.

All the more reason not to believe these are set in stone, more so for PUA characters.

For the SF Symbols codepoints properties, where and who maintain them? It's defined somewhere, not the same as for Unicode Standard codepoints? Who does this belong? Swift.org or Apple?

The properties of the codepoint, as expressed by Unicode.Scalar.Properties, are just “this is a private use codepoint” and the defaults that entails, such as “don’t treat me as a line break”, “I am not a combining character”, “I do not represent a numeric value”, etc. These come from Unicode.

The font properties of the glyphs assigned to those code points by whatever font underlies SF Symbols are proprietary to Apple. Swift has no knowledge of these properties, and to fish them out, you would have to load the font with CoreText or some other library.

As @SDGGiesbrecht has answered, and also as I've answered in the other thread you posted on the same topic, there is no such thing as "SF Symbols codepoint properties."

SF Symbols is an icon library implemented as a font; it makes use of the Unicode private use area for its glyphs. Fonts don't have Unicode scalar properties, Unicode scalars do. Unicode scalars are not specific to any font.

The makers of SF Symbols can choose to encode whatever glyphs they want in the private use area, just like they could choose to name their SVG files whatever they want if they offered the icons as a set of SVG files. You can use Unicode.Scalar.Properties to tell you certain properties about a Unicode scalar in the private use area, just like you can use an SVG library to tell you certain properties about an SVG file. But Unicode.Scalar.Properties cannot help you identify what any symbol represents in SF Symbols just because it's an icon library implemented as a font, in exactly the same way that an SVG library can't help you identify what any symbol represents in an icon library implemented as a set of SVG files. (Actually, the analogy is imperfect, because an SVG library would be able to read the actual SVG file in question where there could be custom metadata, whereas Unicode.Scalar.Properties has nothing to do with the font itself.)