charWidth() and non-monospace fonts

Thanks marjin,

So I understand I can’t use cursorCoords in renderLine.

Yes madness for sure :slight_smile: I have now spent a lot of time trying to achieve what I thought would be simple and am back at square one. measuring the size of a space once is not reliable in a situation when the user can change fonts or have a line made up of multiple fonts (as is for example in Firepad).

Perhaps I’m asking the wrong question - I’ll try to rephrase it

Is there a reliable way to have indent wrap in CM when the text contains multiple fonts/non-monospace characters ? If yes how ?

I feel the root of the problem is that the only way to implement indentwrap is through the renderLine hack. Perhaps a more clean way can be implemented ? (for example allow defining custom wraps in the same way you can define custom folds etc)

Thank you !
Micha