BUG: GetGlyphOutline Causes Fatal Exception in Chinese, Japanese, and Korean Windows NT 4.0 (230747)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 4.0 SP2
- the operating system: Microsoft Windows NT 4.0 SP3
- the operating system: Microsoft Windows NT 4.0 SP4
This article was previously published under Q230747 NOTE: This information applies only to the Chinese, Japanese, and Korean (CJK) versions of Microsoft Windows NT 4.0.
SYMPTOMS
A call to the GetGlyphOutline function on Chinese, Japanese, or Korean version of Windows NT 4.0 causes a fatal exception (which appears on a blue screen).
CAUSE
The fatal exception occurs in a code path on the CJK versions of Windows NT where there is an attempt to process a nonexistent character with a matrix other than identity. This can occur when the character code is either not in the TrueType font that is currently selected in the device context or the character is an end user-defined character (EUDC).
RESOLUTION
To work around the problem, always call the GetGlyphOutline function on Chinese, Japanese, and Korean versions of Windows NT with an identity matrix for the last parameter. Using an identity matrix avoids the code path in the operating system that causes the fatal exception.
A formal identity matrix contains only zeros and ones. Such a matrix can be initialized by using the following code snippet:
// Make an identity matrix
memset(&mat, 0, sizeof(mat));
mat.eM11.value = 1;
mat.eM12.value = 0;
mat.eM21.value = 0;
mat.eM22.value = 1;
Note that this snippet of code creates a true identity matrix. Any other method of initializing an identity matrix may produce a matrix definition with values other than zeros and ones.
In particular, a floating point conversion to the FIXED data type may introduce a nonzero value into the fract member of the FIXED structure. A FIXED structure with a nonzero fract component does not form a true identity and will cause the fatal exception to occur.
The problem has been fixed on Windows NT Far East Service Pack 5. Therefore, a matrix other than an identity matrix can be used if the Service Pack level is Service Pack 5 or later.
STATUSThis problem was corrected in Windows NT 4.0 Far East Service Pack 5.
Modification Type: | Minor | Last Reviewed: | 4/3/2006 |
---|
Keywords: | kbDSWGDI2003Swept kbbug kbfix kbFont kbGDI KB230747 |
---|
|