Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. font.h
  5. Abstract:
  6. This module contains the data structures, data types,
  7. and procedures related to fonts.
  8. Author:
  9. Therese Stowell (thereses) 15-Jan-1991
  10. Revision History:
  11. --*/
  12. #define INITIAL_FONTS 20
  13. #define FONT_INCREMENT 3
  14. /*
  15. * FONT_INFO
  16. *
  17. * The distinction between the desired and actual font dimensions obtained
  18. * is important in the case of TrueType fonts, in which there is no guarantee
  19. * that what you ask for is what you will get.
  20. *
  21. * Note that the correspondence between "Desired" and "Actual" is broken
  22. * whenever the user changes his display driver, because GDI uses driver
  23. * parameters to control the font rasterization.
  24. *
  25. * The SizeDesired is {0, 0} if the font is a raster font.
  26. */
  27. typedef struct _FONT_INFO {
  28. HFONT hFont;
  29. COORD Size; // font size obtained
  30. COORD SizeWant; // 0;0 if Raster font
  31. LONG Weight;
  32. LPWSTR FaceName;
  33. BYTE Family;
  34. #if defined(FE_SB)
  35. BYTE tmCharSet;
  36. #endif
  37. } FONT_INFO, *PFONT_INFO;
  38. #define TM_IS_TT_FONT(x) (((x) & TMPF_TRUETYPE) == TMPF_TRUETYPE)
  39. #define IS_BOLD(w) ((w) >= FW_SEMIBOLD)
  40. #define SIZE_EQUAL(s1, s2) (((s1).X == (s2).X) && ((s1).Y == (s2).Y))
  41. #define POINTS_PER_INCH 72
  42. #define MIN_PIXEL_HEIGHT 5
  43. #define MAX_PIXEL_HEIGHT 72