home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / lout2.lzh / LOUT2 / DOC / TR.LOUT / ch3.03 < prev    next >
Text File  |  1994-01-25  |  5KB  |  111 lines

  1. @Section
  2.    @Title { "@Font" and "@Char" }
  3.    @Tag { font }
  4. @Begin
  5. @PP
  6. A @I font
  7. font. @Index { Fonts }
  8. is a collection of characters which may be
  9. printed.  Many fonts come in {@I families},
  10. family @Index { Family of a font }
  11. face @Index { Face of a font }
  12. which are groups of fonts that
  13. have been designed to go together.  For example, the Times family
  14. includes the following fonts:
  15. @ID { Times Base } @Font {
  16.     Base      @Font { Times Base }
  17. //1vx Slope     @Font { Times Slope }
  18. //1vx Bold       @Font { Times Bold }
  19. //1vx BoldSlope @Font { Times BoldSlope }
  20. }
  21. Thus, each font has two names: its @I { family name } (Times,
  22. Helvetica, etc.) and its @I { face name } (Base, Slope, etc.).  Times
  23. Base is more commonly called Times Roman, and Times Slope is more
  24. commonly called Times Italic.  Lout avoids these names in favour of
  25. generic names which can be applied to many font families.
  26. @PP
  27. Ligatures,
  28. ligatures @Index Ligatures
  29. such as fl for {@OneCol f}l and fi for {@OneCol f}i, are considered by
  30. Basser Lout to be an integral part of the font:  if the font definition
  31. (see below) mentions them, they will be used.  Enclosing one of the
  32. letters in @@OneCol is one sure way to disable a ligature.
  33. @PP
  34. The @@Font symbol
  35. font.sym @Index { @@Font symbol }
  36. returns its right parameter in a font and size specified by its left:
  37. @ID {
  38. @Code "{ Times Base 12p } @Font"  @I object
  39. }
  40. The family and face names must have appeared together in a {@Code fontdef};
  41. the size is arbitrary and may be given in any one of the {@Code "c"},
  42. {@Code "i"}, {@Code "p"}, {@Code "m"}, {@Code "f"}, {@Code "s"}, and
  43. {@Code "v"} units of measurement (Section {@NumberOf concatenation}),
  44. although @Code 10p and @Code 12p are the most common sizes for text.
  45. @PP
  46. When a @@Font symbol is nested inside the right parameter of
  47. another @@Font symbol, the inner one determines the font of its
  48. own right parameter.  However, it may be abbreviated so as to inherit
  49. part of the outer symbol:
  50. @ID @Code {
  51. "{ Times Base 12p } @Font"
  52. "{ hello, Slope @Font hello, 15p @Font hello }"
  53. }
  54. has result
  55. @ID {
  56. { Times Base 12p } @Font
  57. { hello, Slope @Font hello, 15p @Font hello }
  58. }
  59. The first inner @@Font inherits the outer family and size, changing only
  60. the face; the second inherits the outer family and face.  When a family
  61. name is given, it must be followed immediately by a face name.  A size
  62. change always comes last.
  63. @PP
  64. Sizes of the form +{@I length} and --{@I length} may also be used,
  65. meaning that the font size is to be @I length larger or smaller than
  66. the inherited value.  For example, --{@Code "2p"} is often used for
  67. superscripts and subscripts.  These forms are highly recommended, since
  68. they don't need to be changed if a decision is made to alter the font
  69. size of the document as a whole.
  70. @PP
  71. When Lout runs, the first thing it reads is a list of font definitions,
  72. font.def @Index { @Code fontdef }
  73. like these:
  74. @ID {
  75.     @Code "fontdef  Times  Base   {"  @I implementation-dependent  @Code "}"
  76. //1vx @Code "fontdef  Times  Slope  {"  @I implementation-dependent  @Code "}"
  77. }
  78. Each line tells Lout of the existence of a font, and assigns it a family
  79. name and a face name.  There are a few fonts which are the only members
  80. of their families; even though these fonts do not need a face name, they
  81. must be given one by their {@Code fontdef}.  The part between braces may
  82. vary with different implementations of Lout; it is supposed to contain
  83. the information Lout needs to work with the font.
  84. @PP
  85. In Basser Lout Version 2.05, this implementation-dependent part consists of
  86. a PostScript font name, an
  87. adobe @Index { Adobe Systems, Inc. }
  88. Adobe Font Metrics (AFM) file whose FontName entry must agree with the
  89. PostScript font name just mentioned, the name of a character encoding
  90. vector (CEV) file, and the word @Code Recode or {@Code NoRecode}, like this:
  91. @ID @Code
  92. "fontdef  Times  Base  {  Times-Roman  TimesRom.AFM  LoutLatin1.CEV  Recode }"
  93. The files are searched for in standard places.  Consult the Adobe
  94. Systems Reference Manual [{@Ref adobe90}] for general information about
  95. fonts and encoding vectors; briefly, an 8-bit character code @I c in
  96. Lout's input is mapped to the character in the AFM file whose name appears
  97. at position @I c in the CEV file.  If the word NoRecode appears, Lout
  98. assumes that the given encoding vector is already associated with this font
  99. in the PostScript interpreter, and optimizes its output accordingly.
  100. @PP
  101. The @@Char symbol
  102. char @Index { @@Char symbol }
  103. allows a character to be specified by its name (its PostScript name in
  104. Basser Lout) rather than by its code:
  105. @ID @Code "@Char  nine"
  106. is equivalent to @Code "9" in most fonts.  This is useful as a
  107. documentation aid and to be sure of getting the right character even if the
  108. encoding vector of the font is changed.  However @@Char will fail if the
  109. character named is not in the encoding vector of the current font.
  110. @End @Section
  111.