[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: |
Tue, 20 Jan 2015 09:20:55 +0100 |
Am 19.01.2015 um 00:39 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:
> Fred Kiefer wrote:
>> Sorry, you only show these values for the first iteration. In a loop we need
>> to see whether these values change or not. Most likely the second iteration
>> has the exact same values. In that case we are looking at a rounding issue.
>> It seems like ascender plus descender are bigger than line_height, but when
>> assigning this sum to line_height this condition is still true.
>
> It is not the first iteration, it is the hundreth or so, I leave running and
> then break and copy what I see. It is difficult to know in the console flow
> "when" the loop begins amidst all the printouts.
>
> Ascender + Descender differ from line height here only by 0,00001
>
> this is after a couple of seconds:
>
> 2015-01-19 00:19:35.047 Ink[322] 2-WantLineHeight a:10.285714, d:2.571429,
> y:0.000000 | lineh: 12.857142, maxl: 0.000000
> 2015-01-19 00:19:35.050 Ink[322] f_ascender: 10.285714
>
> this is after a couple of minutes
>
> 2015-01-19 00:26:04.893 Ink[322] 2-WantLineHeight a:10.285714, d:2.571429,
> y:0.000000 | lineh: 12.857142, maxl: 0.000000
> 2015-01-19 00:26:04.896 Ink[322] f_ascender: 10.285714
>
> it is exactly the same
>
>> Could you please first verify whether this is true and next find out if your
>> computer uses float or double for CGFloat? The next step might then be to
>> get David to look at the assembler code the macro gets converted into.
> How do I know what CGFloat is? being 32bit I suppose float, but where do we
> configure that?
>
> I added this in the Macro:
>
> if (__new_height > line_height) \
> { \
> line_height = __new_height; \
> NSLog(@"lh = %f, h = %f, gt? %d", line_height, h, line_height > h); \
> COMPUTE_BASELINE; \
> goto restart; \
> } \
>
> this is the output (other log removed):
> 2015-01-19 00:39:12.193 Ink[1887] lh = 12.857143, h = 12.857143, gt? 0
By using %f you assume that you have a float here not a double. Which should
settle the question about CGFloat.
And the NSLog statement is exactly what I would like to know, but rather before
the if statement and not after the assignment. And maybe you should also
inspect __new_height although it gets assigned with h.
Fred
- Re: Hang in font panel with certain fonts, (continued)
- Re: Hang in font panel with certain fonts, Riccardo Mottola, 2015/01/17
- Re: Hang in font panel with certain fonts, Fred Kiefer, 2015/01/17
- Re: Hang in font panel with certain fonts, Fred Kiefer, 2015/01/17
- Re: Hang in font panel with certain fonts, Riccardo Mottola, 2015/01/17
- Re: Hang in font panel with certain fonts, Fred Kiefer, 2015/01/17
- Re: Hang in font panel with certain fonts, Riccardo Mottola, 2015/01/18
- Re: Hang in font panel with certain fonts, Fred Kiefer, 2015/01/18
- Re: Hang in font panel with certain fonts, Riccardo Mottola, 2015/01/18
- Re: Hang in font panel with certain fonts,
Fred Kiefer <=
- Re: Hang in font panel with certain fonts, Eric Wasylishen, 2015/01/20
- Re: Hang in font panel with certain fonts, Riccardo Mottola, 2015/01/25
- Re: Hang in font panel with certain fonts, Fred Kiefer, 2015/01/25
- Re: Hang in font panel with certain fonts, Riccardo Mottola, 2015/01/29
Re: Hang in font panel with certain fonts, Riccardo Mottola, 2015/01/09