I saw this question on the Typography site proposal and it bugged me that I didn't know the answer. I'd always treated 'glyph' and 'character' as interchangable.
After reading an explanation on the Unicode Character Encoding Model page, my understanding is roughly this:
- Characters are defined by their meaning in language, glyphs, by
their appearance. So, the ligature for aesthetically combining
fi
is one glyph, but two characters.
So, my belief is (please correct me if I'm wrong) that the practical difference would be:
- Text parsers that aren't interested in the aestetics of text will read glyphs as their respective characters. So:
- If you were to copy and paste text containing glyphs into a plain text editor, the glyphs would be converted to their respective characters (a
fi
ligature glyph would becomef
andi
) - Any well made automated system based on text parsing (e.g. search engine crawlers, screen readers, spell checkers) would interpret the glyphs as their respective characters.
- One character can have many glyphs or glyph sets. I want to say one glyph can only have one character, but this clearly isn't right as there's an example on the linked article of 3 glyphs and glyph sets that seem to each correspond to a character and set of characters. I don't quite see how this could work: surely that means there will be inconsistency or ambiguity in how those glyphs are interpreted, varying by interpretter? (or does it vary by language, or by font?)
- While glyph browsers (e.g. the one in Illustrator) contain the full glyph set of a font, character maps (e.g. the Windows character map) only contain characters, not glyphs that are multiple characters like ligatures (something I'd not noticed before)
- If you were to copy and paste text containing glyphs into a plain text editor, the glyphs would be converted to their respective characters (a
I feel like I'm nearly there but I've clearly misunderstood something somewhere along the line: not just the "One glyph multiple characters" thing, but also, copying and pasting behaviour with ligatures isn't quite what I expected:
- Copy the ligature
fi
from Illustrator to this input box: pastes asfi
(two characters) as expected. - Paste in the HTML code for it (
fi
) - displays as the ligature when not in a code block (fi - which in this font doesn't look much like a ligature, but you'll see is one if you try to select just half of it), and the code when in a code block (fi
), as expected. - Copy and paste the rendered non-code-block ligature back into the input box: pastes as the ligature character, and renders as the ligature regardless of whether it's in a code block or not (fi and
fi
). Likewise words containing it: fit misfits (fit misfits
) pastes as fit misfits (fit misfits
). Maybe it depends on whether the place it's being pasted understands the encoding used?
How far wrong is my understanding of this? Can someone put me right: stating a clear definition of the difference between glyphs and characters (if mine is wrong or can be improved), and give clearer/more accurate examples than mine of what that means in practice?