home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / DVIM72-Mac 1.9.6 / source / 2.magnification notes.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-14  |  2.1 KB  |  85 lines  |  [TEXT/R*ch]

  1. #if justacomment
  2.  
  3. What should magnification mean?  Unmagnified type, at any
  4. printer resolution, should be 1000.
  5.  
  6. Perhaps we need another concept such as "font resolution". It
  7. would be the product of printer resolution and magnification.
  8. For example, a font file with a resolution of 360 would serve
  9. as a \magstep1 font at 300dpi, or as a magnification = 2500
  10. font at 144dpi.
  11.  
  12. Globals related to magnification
  13. ================================
  14.  
  15. basemag
  16.     set to g_dpi*5 in init_glob
  17.  
  18. runmag        "runtime magnification"
  19.     set to basemag in initglob().
  20.     May be reset in option() for -m option.
  21.     This is the guy that gets printed in the log, e.g.,
  22.     [720 magnification] from readpost().
  23.  
  24. mag_table
  25.     initialized in initglob to powers of sqrt(1.2).
  26.  
  27. mag_index
  28.     Index into mag_table for nearest magnification to a
  29.     pure factor passed to actfact().
  30.  
  31. mag        "magnification specified in preamble"
  32.  
  33.  
  34. Macros related to magnification
  35. ===============================
  36.  
  37. STDRES
  38.     Set to 0 in m72.h.
  39.  
  40. STDMAG
  41.     Set to basemag in m72.h.
  42.     In gendefs, set to 603 if STDRES = 0
  43.  
  44. RESOLUTION
  45.     Set to g_dpi in m72.h.
  46.  
  47. MAGSIZE
  48.     Converts a pure magnification factor to a 1000-based
  49.     integer magnification.
  50.  
  51. USEGLOBALMAG    "allow runtime global magnification scaling"
  52.     Set to 0 in machdefs.h, 1 in gendefs.h.
  53.     Used in dvifile(), reldfont(), with value 1.
  54.  
  55.  
  56. Routines related to magnification
  57. =================================
  58.  
  59. actfact
  60.     Rounds a pure magnification factor to nearest step.
  61.     Called in dvifile(), reldfont().
  62.  
  63. actfact_res
  64.     Rounds a pure magnification factor to nearest step,
  65.     then multiplies by dpi/200.
  66.     
  67.     Called by option(), openfont().
  68.  
  69. fontfile
  70.     Given a font name and magnification, it returns a list of
  71.     font paths in various formats.  Assumes old-style magnification,
  72.     so it can compute dpi = round(real_mag/5.0).
  73.     
  74.     Using new-style magnification, it should use
  75.         dpi = g_dpi * mag / 1000.  (computed in floating point)
  76.     Maybe that computation should be done in openfont(), so that the
  77.     font-dpi value can be passed to fontfile().
  78.     
  79.     Called by openfont().
  80.  
  81. openfont
  82.     In charge of finding and opening font files.  Calls fontfile(),
  83.     fontsub(), then looks for neighboring fonts.
  84.  
  85. #endif