I'm definitely using SpriteFonts as opposed to regular text objects. So I do know the dedicated character widths (monospaced fonts are king!)
I suppose that given that I know the structure of the different types of "lines" that can exist in 6502 code, perhaps attacking at on a line-by-line basic might be best.
Lines can contain: directives, opcodes, constant labels, address labels, variables, addresses in their various modes, etc, and comments of course. But proper formatting is required for the assembler to work properly, so I can always enforce that directly and have a much more predictable set of possibilities in terms of what each line might look like.
I'll be implementing an actual blinking cursor at some point as well, plus text highlighting, copy/pasting, etc... So trying to solve the visualizationof these sooner than later I think is key.
What would be nice, is if there was a way to return an XY position of a token within the spritefont's display box, and then send it over to a tilemap, as masking with a tilemap is something I've done in the past and can work quite well, assuming you know where the character location to mask is.