Glyph

A module for Python/PyGame used for typesetting text to the screen.
Download

Glyph Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Chandler Armstrong
  • Publisher web site:

Glyph Tags


Glyph Description

A module for Python/PyGame used for typesetting text to the screen. Glyph is a very basic typesetting library. It takes plain text and prints it to a surface. A glyph object is a surface on the screen to which the text is printed. each glyph object is initialized with certain settings such as postion, size, font, and color. Commands are given in text with a preceding backslash followed by the command (eg. ' ' starts a newline).Most glyph objects consist of multiple surfaces. each object is given the mainscreen surface, and in addition creates two other surfaces: a text surface and a view surface. The text surface has the text printed to it. The text surface is blitted to the view surface. The view surface is what is ultimately blitted to the mainscreen. if the view surface is smaller than the text surface, than different areas of the text surface can be blitted to it, essentially creating scrolling. If the text and veiw surfaces are the same size or the view surface is larger, than there is no real difference.All glyph objects take plain text and convert it into font images. Each begins by wrapping the text to a specified width and splitting it into lines. It then converts each line to a text image and stores it in a dictionary keyed to its position on the surface it is to be blitted to. Some objects retain the plain text associated with the images for later procesing, others discard it. For more details, see 'usage'. glyph uses a number of basic functions, such as linewrapping, and some optional ones, such as justifying. All functions are performed on text images, not the plain text. This is to ensure that text is positioned perfectly on the screen, something that is not possible by working with the plain text directly. Requirements: · Python · pygame What's New in This Release: · compiler added. · lots of little nice changes.


Glyph Related Software