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.

122 lines
5.2 KiB

  1. 03/15/94
  2. Notes on how to use the Type 1 Installer under Win32.
  3. -----------------------------------------------------
  4. INTRODUCTION
  5. The Type 1 Installer exists in many different forms. This text
  6. describes the use of it as a Win32 DLL. The DLL acts as a compiler
  7. that parses an Adobe type 1 font format file and a metrics file (PFB
  8. + PFM), and then produces a TrueType font file.
  9. The DLL will interact with the event log and the registry, under
  10. certain conditions. The registry is always queried at the start of
  11. the conversion to verify if the copyright holder has agreed to have
  12. their font converted. The event log is used if an error occurs and if
  13. the "Log events" entry in the registry is not zero. The required
  14. entries in the registry is described in "t1instal.ini". Use
  15. regini.exe to load these settings.
  16. USING THE DLL
  17. There are two functions in the interface of the DLL. Use
  18. "t1instal.h" to get the prototypes for these functions, and to get
  19. the definitions of the values they return.
  20. IsType1A
  21. This function determines if a file is a valid Printer Font
  22. Metrics files (pfm), and returns the face name of the font. This
  23. function will only return TRUE if there is a valid PFB file in
  24. the same directory or in the parent directory.
  25. ConvertTypefaceA
  26. This function takes the name of a PFM, a PFB and a TTF file as
  27. parameters, that are used in the conversion.
  28. This function will call a supplied callback function during the
  29. conversion. The caller may thus display messages to the user
  30. about the progress of the conversion. This function is called
  31. with an integer that indicates the rate of the progress
  32. (typically in the range 0-100), and a caller supplied argument.
  33. BUILDING THE DLL
  34. The DLL can be compiled with a number of features turned on or off.
  35. Define or undefine the following symbols when compiling the code to
  36. get the desired result:
  37. name Usage
  38. ---- -----
  39. DOT Replaces the period character in the converted
  40. font. Used to tag converted fonts such that
  41. they can be distinguished from the original
  42. fonts.
  43. NOMSGBOX Causes the DLL to use stdio to report errors.
  44. NOCOPYRIGHTS Disables the copyright checking.
  45. SHOWCOPYRIGHT This casues the converter to store the
  46. encrypted copyright strings in the event log,
  47. without converting the font. Put this string
  48. in the appropriate place in the registry to
  49. enable the conversion of fonts from the
  50. fonts vendor of that font.
  51. RELATIVESTEMS Enables a hint conversion features. Must be
  52. turned on.
  53. SYMETRICS_REDUCTION Enables a hint conversion feature. Should not
  54. be turned on.
  55. NOANSIWINMAC Causes glyhs that are not part of the Windows
  56. ANSI and MacIntosh character set to be
  57. filterd out. Turn this on if the OS is not
  58. supporting UNICODE, to get smaller fonts.
  59. By default, only the RELATIVESTEMS should be defined.
  60. SETTING UP THE REGISTRY
  61. Remove the comments from the t1instal.ini file and use regini utility
  62. to place new keys in registry for use.
  63. regini t1instal.ini
  64. 
  65. ---------------------------------------------------------------------- -------------------------------------------------
  66. The message logging mechanism in the Type 1 Installer.
  67. Messages are recorded/displayed based on the severity of an error and based on the state of the "log events" key in the registry. There are three types of messages:
  68. - Errors : A problem that cased the conversion to abort.
  69. - Warnings : A non-fatal problem that the converter resolved.
  70. - Information : Information that may be useful to trace the execution of the
  71. conversion, such as the name of the font and the vendor.
  72. If an error occurs then a pop-up is presented to the user with the appropriate message. Note that this will always happened, regardless of the "log events" key. These strings are defined in the string table in the dll's resource file (t1instal.rc).
  73. The "log events" key is used for PSS and for debugging . It should not be used by the users. It should only be turned on when attempting to determine the cause of a failed conversion. This key causes all messages to be stored such that they are accessible by the Event Viewer. These strings are defined in the dll's message file (t1msg.mc). Note that warnings are being displayed in pop-up dialogs, in addition to errors, when "log events" is non zero.
  74. The motivation for this approach is that PSS may need to be able to remotely resolve a problem that a customer has when converting a type 1 font. PSS will be able to do this by instructing the user to turn on the "log events" feature and get immediate feed-back when an error or a warning pops up a message. A computer that is connected to a network can be accessed directly through the Event Viewer by the PSS engineer.