home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / fonts / 3802 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  9.5 KB

  1. Xref: sparky comp.fonts:3802 gnu.misc.discuss:4118
  2. Path: sparky!uunet!pipex!bnr.co.uk!uknet!gdt!aber!fronta.aber.ac.uk!pcg
  3. From: pcg@aber.ac.uk (Piercarlo Grandi)
  4. Newsgroups: comp.fonts,gnu.misc.discuss
  5. Subject: Re: "Hinting" using antialiasing? A GNUish alternative...
  6. Message-ID: <PCG.92Dec29154125@decb.aber.ac.uk>
  7. Date: 29 Dec 92 15:41:25 GMT
  8. References: <freek.725305697@groucho.phil.ruu.nl>
  9.     <1992Dec25.214916.10472@pasteur.Berkeley.EDU>
  10.     <PCG.92Dec27213908@decb.aber.ac.uk>
  11.     <1992Dec27.225347.28173@pasteur.Berkeley.EDU>
  12. Sender: news@aber.ac.uk (USENET news service)
  13. Reply-To: pcg@aber.ac.uk (Piercarlo Grandi)
  14. Organization: Prifysgol Cymru, Aberystwyth
  15. Lines: 170
  16. In-Reply-To: johnm@cory.Berkeley.EDU's message of 27 Dec 92 22: 53:47 GMT
  17. Nntp-Posting-Host: decb.aber.ac.uk
  18.  
  19. On 27 Dec 92 22:53:47 GMT, johnm@cory.Berkeley.EDU (John D. Mitchell) said:
  20.  
  21. johnm> You might want to take a look at the documentation for GeoWorks'
  22. johnm> GEOS platform.
  23.  
  24. Can you give some more info? I seem to remember it is kind-of a DOS GUI,
  25. only cheaper/faster/simpler than Windows 3.1 (not that it's difficult :->).
  26.  
  27. pcg> [ ... bitmap scaling vs. outline filling ... ] Not better looking,
  28. pcg> on looks I would think it would be equivalent or nearly so; but
  29. pcg> better in speed and non proprietariness.
  30.  
  31. johnm> Non-proprietariness I'll buy.  Speed is another issue entirely.
  32.  
  33. johnm> In any kind of regular use [ ... a few glyphs get used over and
  34. johnm> over again, and caching them is quite effective ... ]
  35.  
  36. Yes, but this holds true for both technologies; so if one has less space
  37. for caching, then a faster technique is preferable. For example I don't
  38. like the few seconds of latency that existing renderers make me wait
  39. while the rasterize the fonts contained in an imported document. Maybe I
  40. am spoilt for speed, or maybe I cannot afford the latest Quadra or
  41. DX2-66.
  42.  
  43. However, given that in most common day use one uses only two sets of
  44. fonts, one for the screen and one for printer, I am particularly
  45. thinking of keeping around printer resolution bitmaps, which are the
  46. ones that after all matter most, and then scaling them on the fly to the
  47. screen resolution. I am even thinking that it would make sense putting a
  48. font server *into the printer*, which, for networked printers, is the
  49. right thing to do. And non networked printers can be turned into
  50. networked ones for a few hundred dollars by way of a PC as gateway.
  51.  
  52.   Yes, I am thinking of reversing the current situation in which fonts
  53.   are downloaded from workstation to printer; I would rather do the
  54.   opposite. 
  55.  
  56. johnm> Also, I don't see how applying some number of algorithmic scaling
  57. johnm> filters would be any faster.  I believe (totally my own
  58. johnm> imagination :-) that only filters that worked on very local
  59. johnm> information would be fast.  But [ ... you would need context
  60. johnm> sensitive filters for better quality ... ]
  61.  
  62. I think too one would need context sensitive filtering; but I think this
  63. would still be a win. It is often non obvious how to implement
  64. Bezier/quadratic splines using integer only arithmetic, while all sorts
  65. of bitmap filtering I can envision use only integer arithmetic and
  66. pretty simple as well, and very predictable memory access patterns. This
  67. can be an advantage.
  68.  
  69.   Both outlining and scaling require much the same type of effort for
  70.   diagonal lettering (yes, you can rotate bitmaps too -- HP have
  71.   contributed a nifty set of mods to the X11R5 font engine for this), but
  72.   that's a fairly rare thing.
  73.  
  74. johnm> I'm not sure that I'm understanding what you mean by "an
  75. johnm> unconscious filtering algorithm".
  76.  
  77. johnm> My understanding of the typeface design business is that the
  78. johnm> designer generates 'perfect' character designs for some very
  79. johnm> large em square.
  80.  
  81. Well, things actually vary a bit, as far as I know. If an existing
  82. typeface is to be digitalized, it's as you say. A largish character
  83. shape gets scanned in, and then a countour for it is generated
  84. automatically by something like illustrator. Then the designer adjusts
  85. the countour. The case of entirely new typefaces designed for digital is
  86. rarer; just about the only two examples I know are Lucida and the Knuth
  87. fonts. There the designer has the options of either hand drawing the
  88. characters on paper, or starting directly with the outlines. I think
  89. Knuth uses the latter method.
  90.  
  91. johnm> The designers then specifies the hints and their relative
  92. johnm> importance to the overall character (such that the more
  93. johnm> superfluous are left out sooner as the generated font size is
  94. johnm> reduced.
  95.  
  96. The designer looks at the output bitmap produced by outline+hints, and
  97. tweaks the hints (and the outline) until the bitmap looks "right". In
  98. other words the designer is actually designing the *bitmaps*, and just
  99. uses outline+hints as a way to specify the bitmap he fancies.
  100.  
  101. Maybe another way fo expressing my concept is that high resolution
  102. bitmaps are a better (in the sense of more general, faster -- subject to
  103. dispute -- and non-proprietary) thing to use a matrix/encoding of the
  104. various resolution bitmaps of a glyph than an outline.
  105.  
  106. johnm> How is that 'unconscious'?
  107.  
  108. In that the adjustment process terminates when he/she "knows" that the
  109. bitmap poduced is the "right" lower resolution bitmap. The "knowledge"
  110. can only come from some kind of "appropriateness algorithm" the designer
  111. has got, more or less consciously, based on the peculiarities of human
  112. vision. Type design theory is very much about studying this
  113. "appropriateness algorithm" humans have built in, and designing type
  114. around it, whether lead or bitmap.
  115.  
  116. johnm> I'll grant that my understanding is incomplete and generalized.
  117.  
  118. Mine too -- I am mostly an OS guy, not a typeface guy.
  119.  
  120. pcg> I think it would be more general because I guess it could be
  121. pcg> patterned after the rather universal properties of human vision;
  122.  
  123. johnm> The same argument as above.  Any typeface designer worth anything
  124. johnm> must take into account the biases and pecularities of human
  125. johnm> vision.
  126.  
  127. As agreed above, but they do so *manually* (and "unconsciously": they
  128. basically assume that what looks right to them looks right to
  129. everybody). I think instead that it can be done, with tolerably
  130. satisfying results, algorithmically. Moreover the situation for hints in
  131. existing font specification languages is less than satisfying:
  132.  
  133. pcg> instead some hinting systems are patterned after the features of
  134. pcg> latin glyphs, and do not adapt well to other styles of writing.
  135.  
  136. I was referring to Type 1 here. TrueType hints are instead relatively
  137. nasty to use but allow specifying any sort of correction to the output
  138. bitmap; at times I think they are just a thinly disguised veil for
  139. things like manual patches, bit by bit, to the bitmap.
  140.  
  141. The fact that of the typical 50-70KB of a well tuned TrueType font half
  142. is devoted to hinting seems to indicate this.  I think that the same
  143. space would be taken up by a master high resolution bitmap and then a
  144. series of bit-by-bit patches that correct the scaled output.
  145.  
  146.   Or even a set of lower resolution bitmaps, which usually take up very
  147.   little space (a 10pt .pk font at 120 DPI takes about 3k; that means
  148.   that in 30KB one could store quite a selection of sizes, even if one
  149.   could actually only store the differences between the scaled bitmap
  150.   and the ideal one). So for example a font could be first produced as a
  151.   high resolution bitmap, then this would be scaled at various point
  152.   sizes, these would be presented to the designer, and he would apply
  153.   corrections, that would be recorded as diffs alongside the original
  154.   bitmap. I would rather substitute the designer with a filtering
  155.   algorithm, either on the fly or not. Actually I would envisage a three
  156.   stage process; high resolution font, filtering algorithm used to
  157.   produced "decent" scalings, the designer asked to approve (the
  158.   default, if the filtering algorithm is OK) or to record manual
  159.   corrections (yes, hints even for scaled fonts, if you really want
  160.   them), that are recorded as bit level diffs. I can even imagine that
  161.   one migh have more than one scaling algorithm, each version perhaps
  162.   more suited to certain glyph styles, and the designer chooses the best
  163.   algorithm first, and the choice is attached to the bitmap; if the end
  164.   user scaling engine has that algorithm, so much the better, if it does
  165.   not, it can substitute another, perhaps generic scaling algorithm.
  166.  
  167. In practice designing a well tuned TrueType font is exactly identical to
  168. designing the bitmaps at the various low resolutions that must be
  169. supported, and then just encoding this as a fairly inefficient
  170. programmatic outline and a series of fairly inefficient programmatic
  171. (even if I seem to remember that one can actually specify bit-by-bit)
  172. patches to it.
  173.  
  174. I like more what is done in METAFONT; there adaptation to the resolution
  175. and quirks of the intended output device is done by adjusting various
  176. parameters, like the shape of the "nib". This is virtually equivalent to
  177. choosing a different filtering algorithm (the "nib" is a filter!).
  178.  
  179. Also I am not at all contrary to using outlines as a *design* tool, a la
  180. METAFONT; algorithmic expression of typeface contours helps, perhaps a
  181. bit too much, to express regularities in the typeface and ensure
  182. consistency, like METAFONT does, between different fonts in the same
  183. outline (again, like METAFONT does, and has been "discovered" only now
  184. by the public with Adobe's so called multiple masters spec).
  185. --
  186. Piercarlo Grandi, Dept of CS, PC/UW@Aberystwyth <pcg@aber.ac.uk>
  187.   E l'italiano cantava, cantava. E le sue disperate invocazioni giunsero
  188.   alle orecchie del suo divino protettore, il dio della barzelletta
  189.