discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Hang in font panel with certain fonts


From: Fred Kiefer
Subject: Re: Hang in font panel with certain fonts
Date: Sun, 18 Jan 2015 00:13:23 +0100

Now we are getting closer, could you please also output the values of 
line_height and max_line_height before the macro? Maybe your font is bigger 
than allowed?
You should also output both ascender and descender there and maybe y too, just 
to make sure.

The code here is really writen in a way that makes debugging hard.

Fred

On the road

Am 17.01.2015 um 22:59 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:

> Hi,
> 
> Fred Kiefer wrote:
>> I just went through the whole code another time and noticed that I
>> overlooked that chance of getting a loop because of macros. You should
>> also add log statements before and after all macro calls especially
>> around calls to WANT_LINE_HEIGHT.
> I start to have really a lot of debug. The loop seems quite tight, I added 
> logs before each macro call and get this:
> 
> ...
> 2015-01-17 22:01:12.655 Ink[6073] Main glyph layout loop. i:0
> 2015-01-17 22:01:12.657 Ink[6073] 2-Compute_Baseline
> 2015-01-17 22:01:12.659 Ink[6073] 2-WantLineHeight 12.857143
> 2015-01-17 22:01:12.662 Ink[6073] f_ascender: 10.285714
> 2015-01-17 22:01:12.664 Ink[6073] Main glyph layout loop. i:0
> 2015-01-17 22:01:12.667 Ink[6073] 2-Compute_Baseline
> 2015-01-17 22:01:12.670 Ink[6073] 2-WantLineHeight 12.857143
> ...
> the "2" is the call in the "Baseline adjustments" block. For me it is around 
> line 922.
> 
> I added a NSLog after the macro:
> 2015-01-17 22:55:14.668 Ink[7224] Main glyph layout loop. i:0
> 2015-01-17 22:55:14.670 Ink[7224] 2-Compute_Baseline
> 2015-01-17 22:55:14.672 Ink[7224] 2-WantLineHeight 12.857143
> 2015-01-17 22:55:14.675 Ink[7224] f_ascender: 10.285714
> 2015-01-17 22:55:14.678 Ink[7224] Main glyph layout loop. i:0
> 2015-01-17 22:55:14.680 Ink[7224] 2-Compute_Baseline
> 2015-01-17 22:55:14.682 Ink[7224] 2-WantLineHeight 12.857143
> 2015-01-17 22:55:14.685 Ink[7224] f_ascender: 10.285714
> 2015-01-17 22:55:14.688 Ink[7224] Main glyph layout loop. i:0
> 
> It does not get reached, thus it continues/exits the loop inside the macro. I 
> also put an NSLog  "loop block end" before the loop end.
> During normal operation you get this:
> 
> 2015-01-17 22:58:16.161 Ink[8176] Main glyph layout loop. i:1
> 2015-01-17 22:58:16.164 Ink[8176] 2-Compute_Baseline
> 2015-01-17 22:58:16.166 Ink[8176] 2-WantLineHeight 14.000000
> 2015-01-17 22:58:16.169 Ink[8176] 2-WantLineHeight completed
> 2015-01-17 22:58:16.171 Ink[8176] checking if g is GSAttachmentGlyph
> 2015-01-17 22:58:16.174 Ink[8176] glyph size 9.000000 0.000000
> 2015-01-17 22:58:16.177 Ink[8176] moving to next glyph
> 2015-01-17 22:58:16.179 Ink[8176] loop block end
> 2015-01-17 22:58:16.182 Ink[8176] Main glyph layout loop. i:2
> 
> The problem is thus inside the second call of  WANT_LINE_HEIGHT, it gets 
> called with a reasonably valid value though. I don't fully understand the 
> code, the macro is called inside a loop, the macro calls a GOTO!
> 
> Riccardo
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep



reply via email to

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