ToÂ: Developer GNUstep <gnustep-dev@gnu.org> On Thu, Oct 08, 2009 at 05:43:55PM +0100, David Chisnall wrote: >On 8 Oct 2009, at 17:16, Derek Fawcus wrote: >> On Thu, Oct 08, 2009 at 03:42:38PM +0100, David Chisnall wrote: >>> There are also some plainly embarrassing bugs, like the fact that >>> underlining still doesn't work. >> Useful to know, I was about to try using it :-) > > Apparently it wasn't done because doing it 'the right way' is hard, > and although just using an NSBezierPath to draw a line under the glyph > run would be trivial for anyone who understands the text system, > it wasn't done because it's not 'the right way.' > No one who knows what 'the right way' of doing it is was available for > comment, unfortunately.
Well, having just glanced at a few docs, depending upon the desired level of compatibility, the approach outlined above seems reasonable. Most underline styles seem to have appeared with OSX 10.3 - i.e. the following: NSUnderlineStyleNone /* zero */ NSUnderlineStyleSingle /* one */ NSUnderlineStyleThick /* non zero */ NSUnderlineStyleDouble /* non zero */ NSUnderlinePatternSolid /* zero */ NSUnderlinePatternDot /* non zero */ NSUnderlinePatternDash /* non zero */ NSUnderlinePatternDashDot /* non zero */ NSUnderlinePatternDashDotDot /* non zero */ from OSX 10.0 we have the following (where the styles are deprecated in favour of the above): enum { NSNoUnderlineStyle = 0, NSSingleUnderlineStyle }; unigned NSUnderlineByWordMask; where NSUnderlineByWordMask allows one to omit underlines from whitespace. all being defined in NSAttributedString.h So it seems to me the minimal implementation would just be the two deprecated enum constants without the NSUnderlineByWordMask since this seems to be what Rhapsody provided. .pdf _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev