compose-gstring-for-graphic is a compiled Lisp function in `composite.el'.

(compose-gstring-for-graphic GSTRING)

Compose glyph-string GSTRING for graphic display.
Combining characters are composed with the preceding base
character. If the preceding character is not a base character,
each combining character is composed as a spacing character by
a padding space before and/or after the character.

All non-spacing characters have this function in
`composition-function-table' unless overwritten.