[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUstep app fails on Ubuntu 16 - found workaround
From: |
Fred Kiefer |
Subject: |
Re: GNUstep app fails on Ubuntu 16 - found workaround |
Date: |
Sat, 9 May 2020 10:11:36 +0200 |
Thank you Andreas for pinning this down. Sadly your solution cannot be used
directly. That way all text views or text cell would result in a height of
zero. The returned size here has to include at least the height of a new line.
This gets handled in the class GSLayoutManager (around line 2600) by adding the
extra used rectangle to the returned rectangle.
If you still got time to look further it would help to know, how big the
extra_used_rect is in your case and where these values come from. Maybe we fail
to initialise the value correctly? That value should get set by the class
GSHorizontalTypesetter (line 555). If the wrong value comes from there then the
current font is to blame. Could you please inspect that?
Again thank you very much!
Fred
> Am 08.05.2020 um 22:53 schrieb Andreas Höschler via Discussion list for the
> GNUstep programming environment <discuss-gnustep@gnu.org>:
>
> It seems [NSAttributedString size] has a problem!?
>
>
> I did the following:
>
> - (NSSize) size
> {
> if ([self length] == 0) return NSZeroSize; // <-- inserted this
>
> NSRect usedRect = [self boundingRectWithSize: NSZeroSize
> options:
> NSStringDrawingUsesLineFragmentOrigin];
> return usedRect.size;
> }
>
> - (NSSize) sizeWithAttributes: (NSDictionary *)attrs
> {
> if ([self length] == 0) return NSZeroSize; // <-- inserted this
>
> NSRect usedRect = [self boundingRectWithSize: NSZeroSize
> options:
> NSStringDrawingUsesLineFragmentOrigin
> attributes: attrs];
> return usedRect.size;
> }
>
> Problem gone!! :-)
>
> Regards,
>
> Andreas
- Re: GNUstep app fails on Ubuntu 16 shmget() related, (continued)
- Re: GNUstep app fails on Ubuntu 16 shmget() related, Andreas Höschler, 2020/05/06
- Re: GNUstep app fails on Ubuntu 16 shmget() related, Riccardo Mottola, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Andreas Höschler, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Fred Kiefer, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Fred Kiefer, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Andreas Höschler, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Fred Kiefer, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Andreas Höschler, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Fred Kiefer, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Andreas Höschler, 2020/05/08
- Re: GNUstep app fails on Ubuntu 16 - found workaround,
Fred Kiefer <=
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Andreas Höschler, 2020/05/09
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Fred Kiefer, 2020/05/09
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Andreas Höschler, 2020/05/11
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Fred Kiefer, 2020/05/11
- Re: GNUstep app fails on Ubuntu 16 - found workaround, Riccardo Mottola, 2020/05/10
- Re: GNUstep app fails on Ubuntu 16, Riccardo Mottola, 2020/05/07
- Re: GNUstep app fails on Ubuntu 16, Riccardo Mottola, 2020/05/06
- Re: GNUstep app fails on Ubuntu 16, Svetlana, 2020/05/06
- Re: GNUstep app fails on Ubuntu 16, Andreas Höschler, 2020/05/06
- Re: GNUstep app fails on Ubuntu 16, Riccardo Mottola, 2020/05/08