BUG: GetKerningPairs Sometimes Fails on Win32s 1.2 and 1.25aLast reviewed: September 29, 1995Article ID: Q125872 |
The information in this article applies to:
SYMPTOMSGetKerningPairs will sometimes fail on Win32s version 1.2 causing the 32-bit application to exit mysteriously. The problem may only occur once in a while with many successful runs interrupted by a single unsuccessful run.
CAUSEThe thunking layer for GetKerningPairs contains a bug in the code that allocates a temporary buffer passed to the 16-bit version of GetKerningPairs. The errant code executes whenever the number of kerning pairs requested is equal to or less than 128. Requesting GetKerningPairs to return 129 or more kerning pairs forces the thunking layer to use an alternative buffer allocation method.
RESOLUTIONTo work around the problem, ensure that the number of kerning pairs requested from GetKerningPairs is greater than 128. Typically, kerning pairs are retrieved with two calls to GetKerningPairs. The first call retrieves the number of kerning pairs available. A buffer is allocated based on the number of pairs returned. Then the second call to GetKerningPairs retrieves the kerning pairs into the buffer. To avoid the bug in GetKerningPairs, follow these steps:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional reference words: 1.20 font kerning
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |