Glyph - 2.5.0
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.
NOTICE: all is well! The installation setup scripts have been fixed. Please download and try out the demo. See below for instructions. CHANGELOG: - Fixed a bug that prevented functions or environments from occurring as the first tokens in glyph input-syntax. - Fixed a bug that was causing unhelpful errors to occur when the rect argument was too small to contain the longest word in the input text - Fixed portability problems with paths in glyph input text between windows and *NIX platforms (thanks quazar for noting this problem!) - and.... *drum roll* distributing glyph as a genuine py-thon package, complete with setup script and entry on PyPI. OK so that's not a big deal maybe, but it sort of says something about the status of the glyph package. to install: download, unpack, and run 'python setup.py install' this is my first time to create an actual distribution, so if something goes wrong with the install please post here or send an email to let me know. Please make note: releases prior to 2.5.0 do not provide this setup.py installation option. to see a demo: from glyph.demos import intro main = intro.Main() main.start() that should get you going. Press any key to exit the demo. Exiting will stop the interpreter entirely, and end your session, so press ctrl-c if you don't want to do that. if you choose the option to play with the editor, be warned that it isn't entirely without bugs. It shouldn't crash, but the text is sometimes not rendered in the right spaces. Additionally, the editor has no exit condition, so you will need to press ctrl-c when you are finished. I'll add some more demos and make the interface to demos a little less unwieldy in future releases.
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.