emacs/doc
Stéphane Marks a0748d9791 New function 'truncate-string-pixelwise' (bug#80244)
This function will truncate a string on a pixelwise basis in a
work buffer and using a binary search rather than brute force.

* lisp/emacs-lisp/subr-x.el (work-buffer--prepare-pixelwise):
New defun helper function.
(string-pixel-width): Use the helper function.
(truncate-string-pixelwise): New defun.
* test/lisp/misc-tests.el (misc-test-truncate-string-pixelwise):
(misc-test-truncate-string-pixelwise-unicode): New test.
* doc/lispref/display.texi (Size of Displayed Text): Document
the function.
* etc/NEWS: Announce the function.
2026-01-31 11:04:40 +02:00
..
emacs Make diff-hunk-kill respect an active region 2026-01-30 15:06:52 +00:00
lispintro ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lispref New function 'truncate-string-pixelwise' (bug#80244) 2026-01-31 11:04:40 +02:00
man ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
misc * doc/misc/dbus.texi (Inhibitor Locks): Fix path. 2026-01-21 09:24:52 +01:00
translations ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00