readme 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. FreeType font driver for PCF fonts
  2. Francesco Zappa Nardelli
  3. <francesco.zappa.nardelli@ens.fr>
  4. Introduction
  5. ************
  6. PCF (Portable Compiled Format) is a binary bitmap font format, largely used
  7. in X world. This code implements a PCF driver for the FreeType library.
  8. Glyph images are loaded into memory only on demand, thus leading to a small
  9. memory footprint.
  10. Informations on the PCF font format can only be worked out from
  11. ``pcfread.c'', and ``pcfwrite.c'', to be found, for instance, in the XFree86
  12. (www.xfree86.org) source tree (xc/lib/font/bitmap/).
  13. Many good bitmap fonts in bdf format come with XFree86: they can be
  14. compiled into the pcf format using the ``bdftopcf'' utility.
  15. Supported hardware
  16. ******************
  17. The driver has been tested on linux/x86 and sunos5.5/sparc. In both
  18. cases the compiler was gcc. When back in Paris, I will test it also
  19. on linux/alpha.
  20. Encodings
  21. *********
  22. The variety of encodings that accompanies pcf fonts appears to encompass the
  23. small set defined in freetype.h. On the other hand, each pcf font defines
  24. two properties that specify encoding and registry.
  25. I decided to make these two properties directly accessible, leaving to the
  26. client application the work of interpreting them. For instance:
  27. #include "pcftypes.h" /* include/freetype/internal/pcftypes.h */
  28. FT_Face face;
  29. PCF_Public_Face pcfface;
  30. FT_New_Face( library,..., &face );
  31. pcfface = (PCF_Public_Face)face;
  32. if ((pcfface->charset_registry == "ISO10646") &&
  33. (pcfface->charset_encoding) == "1")) [..]
  34. Thus the driver always export ``ft_encoding_none'' as
  35. face->charmap.encoding. FT_Get_Char_Index() behavior is unmodified, that
  36. is, it converts the ULong value given as argument into the corresponding
  37. glyph number.
  38. Known problems
  39. **************
  40. - dealing explicitly with encodings breaks the uniformity of freetype2
  41. api.
  42. - except for encodings properties, client applications have no
  43. visibility of the PCF_Face object. This means that applications
  44. cannot directly access font tables and are obliged to trust
  45. FreeType.
  46. - currently, glyph names and ink_metrics are ignored.
  47. I plan to give full visibility of the PCF_Face object in the next
  48. release of the driver, thus implementing also glyph names and
  49. ink_metrics.
  50. - height is defined as (ascent - descent). Is this correct?
  51. - if unable to read size informations from the font, PCF_Init_Face
  52. sets available_size->width and available_size->height to 12.
  53. - too many english grammar errors in the readme file :-(
  54. License
  55. *******
  56. Copyright (C) 2000 by Francesco Zappa Nardelli
  57. Permission is hereby granted, free of charge, to any person obtaining
  58. a copy of this software and associated documentation files (the
  59. "Software"), to deal in the Software without restriction, including
  60. without limitation the rights to use, copy, modify, merge, publish,
  61. distribute, sublicense, and/or sell copies of the Software, and to
  62. permit persons to whom the Software is furnished to do so, subject to
  63. the following conditions:
  64. The above copyright notice and this permission notice shall be
  65. included in all copies or substantial portions of the Software.
  66. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  67. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  68. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  69. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  70. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  71. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  72. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  73. Credits
  74. *******
  75. Keith Packard wrote the pcf driver found in XFree86. His work is at
  76. the same time the specification and the sample implementation of the
  77. PCF format. Undoubtedly, this driver is inspired from his work.