It seems that margins don't support drawing underlines ... bug??

22 views
Skip to first unread message

John Vella

unread,
Jun 16, 2012, 10:25:58 PM6/16/12
to scintilla...@googlegroups.com
I'm trying to determine if I can use a style for a text margin that has the underline option enabled (via SCI_STYLESETUNDERLINE). It seems that the PaintSelMargin function doesn't make a check if the style wants an underline, so I'm guessing this is either an oversight or intentional exclusion.

Is there a technical reason why (it seems) margins don't allow underlines?

-John

PS. I know that the font I'm using supports underlines just fine since I set one of the lexer styles to turn underlines on and saw it drawn correctly in the main text area.

Neil Hodgson

unread,
Jun 17, 2012, 8:57:37 PM6/17/12
to scintilla...@googlegroups.com
John Vella:

> I'm trying to determine if I can use a style for a text margin that has the underline option enabled (via SCI_STYLESETUNDERLINE). It seems that the PaintSelMargin function doesn't make a check if the style wants an underline, so I'm guessing this is either an oversight or intentional exclusion.

The main Scintilla text drawing code is quite complex and only a simple subset was copied for the DrawStyledText method used by margin text and annotations.

Due to platform differences in handling underlines, Scintilla does't try to use underline attributes on fonts and instead draws underlines separately after drawing the text. It would be fairly easy to copy that code into DrawStyledText if anyone wants to implement that.

Neil

Reply all
Reply to author
Forward
0 new messages