Skip to content

Commit db43fd7

Browse files
committed
none
1 parent fbbd583 commit db43fd7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

book/text.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ line.](im/text-line.png)
703703

704704
Let's start with phase one. Since one line contains text from many
705705
tags, we need a field on `Layout` to store the line-to-be. That
706-
field, `line`, will be a list, and `text` will add words to it instead
706+
field, `line`, will be a list, and `word` will add words to it instead
707707
of to the display list. Entries in `line` will have *x* but not *y*
708708
positions, since *y* positions aren't computed in the first phase:
709709

@@ -718,6 +718,7 @@ class Layout:
718718
def word(self, word):
719719
# ...
720720
self.line.append((self.cursor_x, word, font))
721+
# ...
721722
```
722723

723724
The new `line` field is essentially a buffer, where words are held
@@ -727,6 +728,7 @@ being flushed when we're finished with a line:
727728
``` {.python}
728729
class Layout:
729730
def word(self, word):
731+
# ...
730732
if self.cursor_x + w > WIDTH - HSTEP:
731733
self.flush()
732734
```

0 commit comments

Comments
 (0)