PRB: Unable to Choose Kanji Font Using CreateFontIndirect

Last reviewed: January 15, 1998
Article ID: Q119914
4.00 WINDOWS kbgraphic kbprb

The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

SYMPTOMS

You have difficulty getting the Japanese font handle in Microsoft Win32 Software Development Kit (SDK) for Japanese Windows 95. If you use CreateFontIndirect() to create the font handle, only the English font is selected. You are unable to select Kanji (the main system of writing in Japan) fonts such as MS Mincho and MS Gothic.

CAUSE

The lfCharSet field in the LOGFONT structure is not set to "SHIFTJIS_CHARSET".

RESOLUTION

Specify SHIFTJIS_CHARSET as the value for lfCharSet field.

MORE INFORMATION

In Windows 95, Japanese fonts cannot be selected without the lfCharSet field being set to SHIFTJIS_CHARSET. This standard was not enforced in Japanese Windows NT and Japanese Windows 3.1, So an application with lfCharSet set to a value other than SHIFTJIS_CHARSET might be able to select Japanese fonts under Japanese Windows NT and Japanese Windows version 3.1 using CreateFontIndirect(), but not under Japanese Windows 95.

ShiftJIS is a double-byte character set (DBCS) unique to the Japanese version of Windows NT, Windows 95, and Windows version 3.1. It requires a specialized font, keyboard input, and DBCS string-handling support.


Additional reference words: 4.00 kbprb
KBCategory: kbgraphic kbprb
KBSubcategory: GdiFnt KBIntlDev


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.