I think it is not possible to do it via character style, you have to add a white space with fixed width manually.
Can you show a screen shot?
I'm not sure if you are referring to a bit of text within a line, which needs extra space to the left and right of it, or a full line that needs space above and below it.
If it's the full line, then a Paragraph Style with space before and space after built into the style is what you want.
I think the OP is looking for the equivalent of an end cap on the stroke used for the underline, and I don't see any way to add that.
Would it help using a paragraph style instead of a character style?
If not, perhaps one could fake that with a special gradient used with a character style and underline.
The problems with this are:
1. The "white space" cannot be of color "[None]". For a white or no background one could use "[Paper]"
2. The width of the "white space" will be a percentage of the length of the total underline
For creating the gradient of type linear you'll need 6 gradient stops.
From left to right in CMYK, faked "white space" will be 10% at the beginning and 10% at the end of the line:
0% Color: 0,0,0,0
10% Color: 0,0,0,0
10% Color: 0,0,0,100
90% Color: 0,0,0,100
90% Color: 0,0,0,0
100% Color: 0,0,0,0
That means the gradient starts with a "white", suddenly changes to "black" and suddenly changes again to "white".
thank you. How does that work in your case?
(I'm always eager to learn new tricks)
Alright. "Adjust Spaces" is the esential trick here.
I was close as I tested this. Unfortunately one cannot have color [None] for the stroke and color [Black] (or a different swatch) for the spaces.
And there is a small screen redraw problem—a thin one pixel wide line at every zoom level—around the part of the stroke that is filled with [Paper], but I think, we can neglect this. So your solution is the best we can have right now.