UTF-8 Unicode operators vs digraphs

H. S. Teoh hsteoh at qfbox.info
Fri Aug 14 14:38:00 UTC 2026


On Thu, Aug 13, 2026 at 11:13:34PM -0700, Walter Bright via Digitalmars-d wrote:
[...]
> On 8/13/2026 6:17 PM, H. S. Teoh wrote:
[...]
> > Take for example, the Cyrillic т.  The cursive form looks like this:
> > m.  To a native speaker, they are EXACTLY THE SAME LETTER, just
> > differently styled.  The same way an English speaker sees the same
> > letter whether the glyph is an upright M or a cursive M.  This is a
> > variation that a different font face would give you.
> 
> Unicode should never have gotten into the font business. Fonts are
> selected by style sheets.

It didn't.  Whatever made you think it did?

 
[...]
> > Another example is the Cyrillic п which in some fonts look like n.
> > You can't seriously be proposing that we represent the Cyrillic п
> > with the same codepoint as the English n.  In Cyrillic, that's a
> > stylistic difference, in English, that's a completely different
> > glyph.
> 
> Yes, I am serious. There is no such thing as a Cyrillic n and an
> English n.  There is only n and n.

You totally missed my point.  My point is that n and п are the SAME
THING in Cyrillic.  Just as upright L and cursive L are the same thing
in English.  If "there is only n and n", then what you're actually
saying is that Cyrillic п is the same thing as English n, even though
they have different font shapes.  You're contradicting yourself.


> > If you insist that the same glyph shapes must share the same
> > codepoint, then the Greek π should be represented as the English n
> > too, since п and π are equivalent,
> 
> This only becomes a problem when semantic meanings are assigned to
> glyphs.

I'm not assigning any semantic meaning to anything.  I'm just going by
what you propose: the same glyph shape should be assigned the same
codepoint.

The problem is, glyph shapes are font-dependent.  And different fonts
don't agree with each other.


> > and in some fonts look identical.
> 
> The font selected is (or should be) irrelevant to Unicode.

Exactly, and that is why basing codepoints on glyph shapes is a wrong
idea.


> > If you argue that since п and n are visually distinct shapes, they
> > must be separate codepoints,
> 
> Yes.

Then it follows, by your argument, that italic A and upright A must have
different codepoints.  Because they have different shapes.


> > then I could also argue that English upright letters should be coded
> > differently from italics, since they *are* visually distinct, and in
> > many fonts involve actually different glyph shapes.
> 
> Italics are a creature of style sheets and should not be in Unicode.
> After all, are we talking a doubling of the number of code points in
> order to support italics?

See, here you contradict yourself.  You just said that if two glyphs
have different shapes, they must be different codepoints.  It's obvious
that upright A and italic A are different shapes.  Therefore they must
be different codepoints.

"No," you say. "They are the same letter!"

You just assigned semantic meaning to different glyph shapes.


T

-- 
MS Windows: 64-bit rehash of 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand 1-bit of competition.


More information about the Digitalmars-d mailing list