test: font.h Source File

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# font.h

Go to the documentation of this file.

    00001 /*++
    00002
    00003 Copyright (c) 1985 - 1999, Microsoft Corporation
    00004
    00005 Module Name:
    00006
    00007     font.h
    00008
    00009 Abstract:
    00010
    00011     This module contains the data structures, data types,
    00012     and procedures related to fonts.
    00013
    00014 Author:
    00015
    00016     Therese Stowell (thereses) 15-Jan-1991
    00017
    00018 Revision History:
    00019
    00020 --*/
    00021
    00022 #define INITIAL_FONTS 20
    00023 #define FONT_INCREMENT 3
    00024
    00025 /*
    00026  * FONT_INFO
    00027  *
    00028  * The distinction between the desired and actual font dimensions obtained
    00029  * is important in the case of TrueType fonts, in which there is no guarantee
    00030  * that what you ask for is what you will get.
    00031  *
    00032  * Note that the correspondence between "Desired" and "Actual" is broken
    00033  * whenever the user changes his display driver, because GDI uses driver
    00034  * parameters to control the font rasterization.
    00035  *
    00036  * The SizeDesired is {0, 0} if the font is a raster font.
    00037  */
    00038 typedef struct _FONT_INFO {
    00039     HFONT hFont;
    00040     COORD Size;      // font size obtained
    00041     COORD SizeWant;  // 0;0 if Raster font
    00042     LONG  Weight;
    00043     LPWSTR FaceName;
    00044     BYTE  Family;
    00045 #if defined(FE_SB)
    00046     BYTE tmCharSet;
    00047 #endif
    00048 } FONT_INFO, *PFONT_INFO;
    00049
    00050 #define TM_IS_TT_FONT(x)     (((x) & TMPF_TRUETYPE) == TMPF_TRUETYPE)
    00051 #define IS_BOLD(w)           ((w) >= FW_SEMIBOLD)
    00052 #define SIZE_EQUAL(s1, s2)   (((s1).X == (s2).X) && ((s1).Y == (s2).Y))
    00053 #define POINTS_PER_INCH 72
    00054 #define MIN_PIXEL_HEIGHT 5
    00055 #define MAX_PIXEL_HEIGHT 72