Glyph - 2.6.5
Pygame typesetting library
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.
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