home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19858 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  3.4 KB

  1. Path: sparky!uunet!hayes!bcoleman
  2. From: bcoleman@hayes.com (Bill Coleman)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Alg. for Detection of Monspaced Fonts
  5. Message-ID: <6549.2b2df65a@hayes.com>
  6. Date: 15 Dec 92 15:14:34 EDT
  7. References: <scott.724029618@phylo> <6534.2b28a410@hayes.com> <de19-141292204941@mac06-pg2.umd.edu>
  8. Followup-To: comp.sys.mac.programmer
  9. Organization: Hayes Microcomputer Products, Norcross, GA
  10. Lines: 65
  11.  
  12. In article <de19-141292204941@mac06-pg2.umd.edu>, de19@umail.umd.edu (Dana S Emery) writes:
  13. > In article <6534.2b28a410@hayes.com>, bcoleman@hayes.com (Bill Coleman)
  14. > wrote:
  15. >> 
  16. >> In article <scott.724029618@phylo>, scott@phylo.life.uiuc.edu (Scott Howard) writes:
  17. >> > My Application requires that all fonts it uses are monospaced
  18. >> > and will allow the user to choose display fonts that meet that 
  19. >> > requirement.
  20. >> 
  21. >> Perhaps your application needs to be rewritten to allow proportional fonts
  22. >> 
  23. >> I ran into this in 1984. Our solution was to create our own fonts. Today the
  24. >> better solution is to support proportional fonts.
  25. > ??? This is an issue of UI, some user will want to specify monospaced fonts
  26. > for certain situations.
  27.  
  28. True, but he was asking for a way for his program to only display 
  29. monospaced fonts. That implies the user got only a selection of monospaced
  30. fonts because the program can't support proportional fonts.
  31.  
  32. > Computer code, Email and plaintext documents often look best when rendered
  33. > in a monospaced font, especially when they contain tabular material which
  34. > was laid out using a monospaced font.  
  35.  
  36. True. And the selection of several fonts will often prove that the 
  37. monospaced ones look "right." There's no need for the program to single
  38. this out (mainly because they can't, really).
  39.  
  40. > The user is not always knowledgable as to what fonts are monospaced, and 
  41. > program help is often considered welcome for this.  
  42.  
  43. Perhaps this type of information is better regulated to the "help" and 
  44. documentation portions of the program, not the code?
  45.  
  46. > Anyway, to determine if a font is monospaced, one must decide/determine if
  47. > international fonts are to be supported.  If not, then one has only to
  48. > exclude symbolic fonts (by FOND ID range), and incomplete fonts (by
  49. > inspection of the FontRec structure), and then compare selected characters
  50. > (say "WWWMMMiii".
  51.  
  52. Why not just check all the characters for the same width? (At least for all
  53. Roman scripted characters, the standard Apple 256 character set should do)
  54. Why narrow the choices to merely W, M and i? After all, if you display
  55. something with a punctuation character that is narrow or wider in your
  56. fixed-pitch display, it is going to look funny, too.
  57.  
  58. > Short of a comitment from Apple, I hesitate to offer a strategy for
  59. > international fonts, those which are discused in Apples literature are
  60. > amenable to the test given above, but I suspect that some font will someday
  61. > be invented which would fool it.
  62. > BTW, dont try to analyse the entirety of ALL fonts, some are rather a bit
  63. > larger than you would think :-).
  64.  
  65. 256 characters doesn't seem TOO bad.
  66.  
  67. -- 
  68. Bill Coleman, AA4LR                ! CIS: 76067,2327    AppleLink: D1958
  69. Principal Software Engineer        ! Packet Radio: AA4LR @ W4QO
  70. Hayes Microcomputer Products, Inc. ! UUCP: uunet!hayes!bcoleman
  71. POB 105203 Atlanta, GA 30348 USA   ! Internet: bcoleman%hayes@uunet.uu.net
  72. Disclaimer: "My employer doesn't pay me to have opinions."
  73. Quote: "The same light shines on vineyards that makes deserts." -Steve Hackett.
  74.  
  75.