[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes I've been thinking of...

From: Derek Fawcus
Subject: Re: Changes I've been thinking of...
Date: Thu, 8 Oct 2009 20:25:55 +0100
User-agent: Mutt/1.4.1i

ToÂ: Developer GNUstep <address@hidden>

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,

    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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]