Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Glyph 2.6.5 Beta

    Download button

    Downloads: 543  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Chandler Armstrong | More programs
    GPL / FREE
    December 28th, 2012, 18:40 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    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.


    Product's homepage

    Requirements:

    · Python
    · pygame

    What's New in This Release: [ read full changelog ]

    Bugs fixed:
    · Editor import bug in glyph.py
    · Example bug in example.py
    · Environment parsing bug in glyph.py
    · RE to parse environment bug in glyph.py
    · pygame.image not imported
    · GlyphGrp and EditorGrp self args omitted
    · Column width not correctly calculated

    Features:
    · Columns added to Glyph
    · clear method of Glyph now accepts 0 or 2 arguments. If 2 args received behaviour remains the same. If 0 args received it will now reset glyph, but not clear any surfaces.
    · draw method added to GlyphGroup and EditorGroup
    · overwrite method added. update keyword added to input method.
    · update method added to GlyphGroup

    Misc:
    · GlyphGroup and EditorGroup added to __init__ imports
    · GlyphGroup and EditorGroup __iter__ now iterates over self.items rather than self
    · GlyphGroup and EditorGroup exit conditions now all return tuples of the same length
    · buff attribute deprivatized
    · Warning when buffer not emptied now sent to stderr
    · update method now returns 1 if buffer emptied, 0 otherwise

      


    TAGS:

    typesetting text | Python library | PyGame library | Python | PyGame | typesetting

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM