You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt:
- Implemented Knuth-Plass optimal linebreaking strategy.
- Added commandline switch -q for "quick" (greedy) split
mode that does not use Knuth-Plass.
- Right now, Knuth-Plass runs about half as fast. It also
uses more memory.
- Updated fmt to use char_width (see below) instead of
assuming each character width is 1.
- Use i64 for demerits instead of int in K-P, since int is
pointer sized and will only be 32 bits on some
architectures.
- incremented version number
- Incorporated improvements suggested by huonw and Arcterus.
- K-P uses indices of linebreaks vector instead of raw
pointers. This gets rid of a lot of allocation of boxes
and improves safety to boot.
- Added a support module for computing displayed widths of unicode
strings based on Markus Kuhn's free implementation at
http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
- This is in `charwidth.rs`, but this is a temporary measure
until the Char trait implements .width(). I am submitting
a PR for this soon, and the code in charwidth() is what's
generated libcore.
closesuutils#223
I've always wanted to dive into Knuth's paper on line breaking. Here's my chance, I suppose.
pr
can probably borrow heavily from this once the latter finished.The text was updated successfully, but these errors were encountered: