The Custos_engraver is still part of the C++ codebase, but the stencil
custos::print is written in Scheme, so it would even be possible to do
very sophisticated tunings of the custos appearance without touching
the C++ code.
Ah, sorry, this is wrong: The scheme function only adds ledger lines and
still depends on the C++ code for the actual custos stencil. But the C++
code (in lily/custos.cc) does not much more than pick a suitable glyph,
so that shouldn't be too hard to adapt to your specific needs.
Lukas