Req #14694 [Opn->Fbk]: GNU fmt-like linebreak algorithm as PHP function

From: Date: Wed, 16 Apr 2014 16:35:39 +0000
Subject: Req #14694 [Opn->Fbk]: GNU fmt-like linebreak algorithm as PHP function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185273@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=14694&edit=1 ID: 14694 Updated by: levim@php.net Reported by: d-r at roettsches dot de Summary: GNU fmt-like linebreak algorithm as PHP function -Status: Open +Status: Feedback Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: All -PHP Version: 4.1.0 +PHP Version: * Block user comment: N Private report: N New Comment: Are you still interested in seeing this? As far as I know this still hasn't been implemented. Previous Comments: ------------------------------------------------------------------------ [2001-12-25 18:16:03] d-r at roettsches dot de Hi there, I've been searching for a PHP implementation of the GNU textformatting tool fmt (http://www.gnu.org/software/textutils/textutils.html) which provides an almost optimal linebreak for your text. It would be better to use than wordwrap() because it avoids breaking sentences after the first word or leaving dangling ends (paragraphs with only one word on the last line). The algorithm used by fmt is similar to the one used by Tex/Latex (proposed by a paper of Knuth et al.) and thus stands for optimal output quality. My question is, if there's anyone who is interested in implementing this for PHP, so that we can see it in one of the next releases? I think, the function would be very useful to do some pretty reformatting of text when for example sending mail or in general doing text formatted output. Thanks for your help in advance, Dominik ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=14694&edit=1

« previous php.bugs (#185273) next »