Skip to main content

Glyph - 2.5.1

Pygame typesetting library


Chandler Armstrong
(omnirizon)
glyph is a library for manipulating text and printing it to a pygame window. so what? there are about a million pygame libraries to do that already. glyph is different for a few reasons: 1) glyph provides a within string literal mini-language for text manipulation. you can use the mini-language to indicate what you want exactly where you want it, all right within the string literal. 2) glyph provides typesetting like functionality: positioning text, wrapping text, justifying text, scrolling text, switching font, text color, background color, even inserting images into text 3) glyph provides 'linked' text: text that returns a value whenever the mouse is hovering over it. this can be used to route the user around your program, or provide tooltips. one simple object, the Glyph object, provides all this functionality. how? because Glyph interprets a mini-language, provided in string literals, that indicates how the Glyph object should treat text.

Changes

CHANGELOG: - Fixed a bug in the editor, so that the cursor is correctly erased when at the end of the line. - Fixed a bug in the editor, so that lines are correctly redrawn after inserting a newline - Added a clear method to the editor, that will clear all text and reset the cursor position; useful when using the editor to provide in-game commands. - On the whole: the editor is now ready for use! KNOWN ISSUES: - In the editor, cursor cannot be navigated to lines containing only a newline using the down key; one must use the right key when at the end of the previous line. FUTURE: - Future releases will add docstrings to the classes and methods. NOTES: - The editor uses a private image for modifying the public image each loop. Each loop the editor has completely erased the old line and redrawn the new one. This is why the cursor does not need to be cleared from the public image. to install: download, unpack, and run 'python setup.py install' to see a demo: from glyph.demos.intro import Main as Intro intro = Intro() intro.start() that should get you going. Press any key to exit the demo. Exiting will stop the interpreter entirely, and end your session. I'll add some more demos and make the interface to demos a little less unwieldy in future releases.

Links

Home Page
http://code.google.com/p/glyph/
Source
http://sourceforge.net/projects/pyglyph/files/glyph%202/glyph-2.5.0/glyph-2.5.1.tar.gz/download

Releases

Glyph 2.5.4rc — 27 Jul, 2011

Glyph 2.6.0b — 6 Jul, 2012

Glyph 2.6.5 — 23 Dec, 2012

Glyph 1.1.0 — 10 Jan, 2009

Glyph 1.0.0 — 3 Jan, 2009

Glyph 1.2.0 — 14 Jan, 2009

Glyph 2.5.3rc — 9 Jul, 2011

Glyph 2.4.0 — 12 Dec, 2010

Glyph 2.5.0 — 2 Mar, 2011

Glyph 2.5.2rc — 25 Jun, 2011

Glyph 2.5.1 — 27 Mar, 2011

Glyph 2.0.0.a — 18 Jul, 2010

Glyph 2.0.0.a2 — 1 Aug, 2010

Glyph 2.1.0b — 5 Oct, 2010

Pygame.org account Comments

  • pooootrick 2013-05-07 08:11

    yaaaaay pygame