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.

52 lines
2.3 KiB

  1. #ifndef LSULINFO_DEFINED
  2. #define LSULINFO_DEFINED
  3. #include "lsdefs.h"
  4. #include "plsulinf.h"
  5. /*
  6. * Both Offsets are relative to the local baseline and positive "down" (towards blank page),
  7. * so in horizontal Latin case dvpFirstUnderlineOffset usually is bigger than zero.
  8. *
  9. * dvpUnderlineOrigin points to UnderlineOrigin - the place where (main part of the) letter ends and
  10. * area for underlining begins. For Latin letters it is the Latin baseline. UnderlineOrigin shows if
  11. * one run of two runs is higher; runs with the same UnderlineOrigin can have their underlines averaged.
  12. *
  13. * dvpFirstUnderlineOffset points to the beginning of the closest to the UnderlineOrigin underline.
  14. * You have "underlining from above" case if dvpUnderlineOrigin > dvpFirstUnderlineOffset.
  15. *
  16. * Everything else should be positive. Instead of dvpSecondUnderlineOffset of the previous version dvpGap
  17. * is used. Second underline is further away from the UnderlineOrigin than first underline, so
  18. * dvpSecondUnderlineOffset = dvpFirstUnderlineOffset + dvpFirstUnderlineSize + dvpGap in normal case.
  19. * In "underlining from above" case there will be minuses instead of pluses.
  20. *
  21. * Main merging rules:
  22. *
  23. * LS will not merge runs with different kulbase or different cNumberOfLines.
  24. * LS will not merge runs with different negative dvpPos (subscripts)
  25. * LS will not merge subscripts with superscripts or baseline runs
  26. * LS will not merge "underlined above" run with "underlined below" run.
  27. *
  28. * If merging is possible:
  29. * Runs with the same UnderlineOrigin are averaged.
  30. * If UnderlineOrigins are different, the run with higher UnderlineOrigin takes metrics from neighbor.
  31. */
  32. struct lsulinfo
  33. {
  34. UINT kulbase; /* base kind of underline */
  35. DWORD cNumberOfLines; /* number of lines: possible values 1,2*/
  36. long dvpUnderlineOriginOffset; /* UnderlineOrigin decides which run is higher */
  37. long dvpFirstUnderlineOffset; /* offset for start of the (first) underline */
  38. long dvpFirstUnderlineSize; /* width of the (first) underline */
  39. long dvpGapBetweenLines; /* If NumberOfLines != 2, dvpGapBetweenLines */
  40. long dvpSecondUnderlineSize; /* and dvpSecondUnderlineSize are ignored. */
  41. };
  42. typedef struct lsulinfo LSULINFO;
  43. #endif /* !LSULINFO_DEFINED */