Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Changelog
changes
^^^^^^^

- clarify that the ``block_text()`` font parameter is only used for column
lookup and does not switch the active printer font

contributors
^^^^^^^^^^^^
Expand Down
9 changes: 7 additions & 2 deletions src/escpos/escpos.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,13 @@ def block_text(self, txt, font="0", columns=None) -> None:
Text has to be encoded in Unicode.

:param txt: text to be printed
:param font: font to be used, can be :code:`a` or :code:`b`
:param columns: amount of columns
:param font: font used to look up the wrapping column count when
``columns`` is not set, can be :code:`a` or :code:`b`. This does
not switch the active printer font; call ``set(font=...)`` or
``set_with_default(font=...)`` first when the printed text should
use a different font.
:param columns: amount of columns. Overrides the profile column count
looked up from ``font`` when set.
:return: None
"""
col_count = self.profile.get_columns(font) if columns is None else columns
Expand Down