[New-bugs-announce] [issue12499] textwrap.wrap: add control for fonts with different character widths

Tyler Romeo report at bugs.python.org
Tue Jul 5 05:03:24 CEST 2011


New submission from Tyler Romeo <tylerromeo at gmail.com>:

Originally from http://bugs.python.org/issue12485 but separated.

The textwrap modules uses len to determine the length of text, but in many (if not most) fonts, the width of a character differs depending on the letter, so it would be useful to have an option to pass a custom function that returns the width of a given string of text.

----------
components: Library (Lib)
files: textwrap.py-widthfunction-2011-07-04_22-57-49_r71219+.diff
keywords: patch
messages: 139828
nosy: parent5446
priority: normal
severity: normal
status: open
title: textwrap.wrap: add control for fonts with different character widths
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file22574/textwrap.py-widthfunction-2011-07-04_22-57-49_r71219+.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12499>
_______________________________________


More information about the New-bugs-announce mailing list