[pyglet] push by useboxnet - Clarification re: tabs... on 2014-05-19 16:30 GMT

3 views
Skip to first unread message

pyg...@googlecode.com

unread,
May 19, 2014, 12:30:25 PM5/19/14
to pyglet-...@googlegroups.com
Revision: b85df72ae77a
Branch: default
Author: Juan J. Martínez <j...@usebox.net>
Date: Mon May 19 16:29:52 2014 UTC
Log: Clarification re: tabs

Thanks to Claudio for the patch.

Closes issue #727.
http://code.google.com/p/pyglet/source/detail?r=b85df72ae77a

Modified:
/doc/programming_guide/text.txt

=======================================
--- /doc/programming_guide/text.txt Thu Apr 17 17:16:04 2014 UTC
+++ /doc/programming_guide/text.txt Mon May 19 16:29:52 2014 UTC
@@ -254,6 +254,20 @@
character (U+0010) or the paragraph break character (U+2029). Line breaks
within a paragraph can be forced with character U+2028.

+Tabs
+....
+
+A tab character in pyglet text is interpreted as 'move to the next tab
stop'.
+Tab stops are specified in pixels, not in some font unit; by default
+there is a tab stop every 50 pixels and because of that a tab can look too
+small for big fonts or too big for small fonts.
+
+Additionally, when rendering text with tabs using a `monospace` font,
character boxes
+may not align vertically.
+
+To avoid these visualization issues the simpler solution is to convert the
tabs to
+spaces before sending a string to a pyglet text-related class.
+
Attributed text
^^^^^^^^^^^^^^^

Reply all
Reply to author
Forward
0 new messages