Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/p/y/python-bookbinding-HEAD/bookbinding/knuth.py   python-bookbinding(Download)
"""Classes that support Knuth TeX-style paragraph breaking."""
from texlib.wrap import ObjectList, Box, Glue, Penalty
from .hyphenate import hyphenate_word
            if w is None:
                w = STRING_WIDTHS[piece] = canvas.stringWidth(piece)
            olist.append(Box(w, piece))
            olist.append(Penalty(hyphen_width, 100))
        bbox = olist[breakpoint]
        if bbox.is_penalty() and bbox.width == hyphen_width:
            b = Box(hyphen_width, u'-')
        graphic = KnuthLine()