Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-05 Thread Aric Stewart
I am very interested in this whole situation because I have run into a similar font issue. Many Mac fonts have an AveCharWidth of a negative value. These fonts do not work well in Wine because of this. Doing some investigation I have found that the given fonts will not install on windows 7.

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-05 Thread Sam Edwards
On 05/04/2013 10:38 PM, Max TenEyck Woodbury wrote: $ grep ' has tmHeight=0, aveWidth=' 201305055-make-test-native.log err:font:get_text_metrics Font named 'Emmentaler-Brace' has tmHeight=0, aveWidth=3! err:font:get_text_metrics Font named 'Emmentaler-Brace' has tmHeight=0, aveWidth=3!

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Max TenEyck Woodbury
On 05/04/2013 01:56 AM, Dmitry Timoshkov wrote: Max TenEyck Woodbury m...@mtew.isa-geek.net wrote: +if ( font-aveWidth font-potm-otmTextMetrics.tmHeight ) { +if (((font-aveWidth + font-potm-otmTextMetrics.tmHeight - 1) / + font-potm-otmTextMetrics.tmHeight)

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Dmitry Timoshkov
Max TenEyck Woodbury m...@mtew.isa-geek.net wrote: If you REALLY think the font should not load, you should add code to reject the font with an appropriate diagnostic, not have this code throw a divide by zero exception and abort execution. Until you do that, this patch is needed. First,

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Max TenEyck Woodbury
On 05/04/2013 10:50 AM, Dmitry Timoshkov wrote: Max TenEyck Woodbury m...@mtew.isa-geek.net wrote: If you REALLY think the font should not load, you should add code to reject the font with an appropriate diagnostic, not have this code throw a divide by zero exception and abort execution.

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Dmitry Timoshkov
Max TenEyck Woodbury m...@mtew.isa-geek.net wrote: If you REALLY think the font should not load, you should add code to reject the font with an appropriate diagnostic, not have this code throw a divide by zero exception and abort execution. Until you do that, this patch is needed.

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Max TenEyck Woodbury
On 05/04/2013 11:30 AM, Dmitry Timoshkov wrote: Max TenEyck Woodbury m...@mtew.isa-geek.net wrote: If you REALLY think the font should not load, you should add code to reject the font with an appropriate diagnostic, not have this code throw a divide by zero exception and abort execution.

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Sam Edwards
On 05/04/2013 12:59 PM, Max TenEyck Woodbury wrote: You are trying to make this about me. It is not. Windows fairly obviously does not do this 'sanity' test. Wine is supposed to imitate windows. To do this absolutely correctly, the whole 'sanity' test should go away. This sounds like an

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Max TenEyck Woodbury
On 05/04/2013 05:37 PM, Sam Edwards wrote: On 05/04/2013 12:59 PM, Max TenEyck Woodbury wrote: You are trying to make this about me. It is not. Windows fairly obviously does not do this 'sanity' test. Wine is supposed to imitate windows. To do this absolutely correctly, the whole 'sanity'

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Hin-Tak Leung
--- On Sun, 5/5/13, Max TenEyck Woodbury m...@mtew.isa-geek.net wrote: On 05/04/2013 05:37 PM, Sam Edwards wrote: On 05/04/2013 12:59 PM, Max TenEyck Woodbury wrote: You are trying to make this about me.  It is not. Windows fairly obviously does not do this 'sanity' test.  Wine is

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Max TenEyck Woodbury
On 05/04/2013 07:50 PM, Hin-Tak Leung wrote: I'd like to mention two things: - there were(are?) overflows/underflows within Freetype itself, up to and including 2.4.11 - the fixes went into trunk, but AFAIK 2.4.12 isn't release yet. That's specifically affect 32-bit platform, and

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Sam Edwards
On 05/04/2013 05:13 PM, Max TenEyck Woodbury wrote: Having wine throw an exception where it did not do so before is another kind of problem indicator. One that hardly needs a special conformance test. Hmm. As I suspected, that is a single point pass only test. It does not explore any of

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Max TenEyck Woodbury
OK. Let's summarize: There are some fonts where tmHeight is in fact 0. If Hin-Tak Leang is correct, these may be Open-Source fonts possibly with proprietary equivalents. Since I have hundreds of fonts installed on my system, it is almost certain that I have one or more. Identifying which

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Akihiro Sagawa
On Sat, 04 May 2013 19:13:07 -0400, Max TenEyck Woodbury wrote: I have no objection to someone writing an alternative patch and backing this one out when that patch goes in, but until then, this patch, or something like it, needs to be applied. With wine throwing the exception, some Apps are

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Sam Edwards
On 05/04/2013 08:27 PM, Max TenEyck Woodbury wrote: OK. Let's summarize: There are some fonts where tmHeight is in fact 0. If Hin-Tak Leang is correct, these may be Open-Source fonts possibly with proprietary equivalents. Since I have hundreds of fonts installed on my system, it is almost

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-04 Thread Max TenEyck Woodbury
On 05/05/2013 12:09 AM, Sam Edwards wrote: On 05/04/2013 08:27 PM, Max TenEyck Woodbury wrote: OK. Let's summarize: There are some fonts where tmHeight is in fact 0. If Hin-Tak Leang is correct, these may be Open-Source fonts possibly with proprietary equivalents. Since I have hundreds of

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-03 Thread Dmitry Timoshkov
m...@mtew.isa-geek.net wrote: +if ( font-aveWidth font-potm-otmTextMetrics.tmHeight ) { +if (((font-aveWidth + font-potm-otmTextMetrics.tmHeight - 1) / + font-potm-otmTextMetrics.tmHeight) 100) { WARN(Ignoring too large font-aveWidth

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-03 Thread Max TenEyck Woodbury
On 05/04/2013 12:38 AM, Dmitry Timoshkov wrote: m...@mtew.isa-geek.net wrote: +if ( font-aveWidth font-potm-otmTextMetrics.tmHeight ) { +if (((font-aveWidth + font-potm-otmTextMetrics.tmHeight - 1) / + font-potm-otmTextMetrics.tmHeight) 100) {

Re: [PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

2013-05-03 Thread Dmitry Timoshkov
Max TenEyck Woodbury m...@mtew.isa-geek.net wrote: +if ( font-aveWidth font-potm-otmTextMetrics.tmHeight ) { +if (((font-aveWidth + font-potm-otmTextMetrics.tmHeight - 1) / + font-potm-otmTextMetrics.tmHeight) 100) { WARN(Ignoring