Use 16-Bit .FON Files for Cross-Platform Compatibility

Last reviewed: November 2, 1995
Article ID: Q100487
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.1, 3.5, and 3.51
        - Microsoft Windows 95 version 4.0
    

The AddFontResource() function installs a font resource in the GDI font table. Under Windows NT and Windows 95, the module can be a .FON file or a .FNT file. Under Windows 3.1, the module must be a .FON file. When using Win32s, AddFontResource() passes its argument to the Win16 AddFontResource, and therefore .FON files should be used for portability.

In addition, when running under Windows NT or Windows 95, the module can be either a 32-bit "portable executable" or a 16-bit .FON file. However, if the same Win32 executable is run under Win32s, the call to AddFontResource() fails if the .FON is not in 16-bit format. Therefore, for compatibility across platforms, use 16-bit .FON files. These can be created using the Windows 3.1 Software Development Kit (SDK).


Additional reference words: 3.10 3.50 4.00
KBCategory: kbgraphic
KBSubcategory: GdiFnt


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: November 2, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.