<commit_before>text
====

Renders a string at a given location, width, alignment, font, etc.

Unix newlines are interpreted even on Windows (i.e. ``"\n"``).


Options
-------
.. include:: /args/expansion.rst

str
  default: ``''``

  the string to be rendered. Must support ``#to_s``.

font
  default: ``'Arial 36'``

  the Font description string, including family, styles, and size. (e.g. ``'Arial bold italic 12'``). For the official documentation, see the `Pango docs <http://ruby-gnome2.sourceforge.jp/hiki.cgi?Pango%3A%3AFontDescription#style>)`_. This `description <http://www.pygtk.org/pygtk2reference/class-pangofontdescription.html>`_ is also quite good.

font_size
  default: ``nil``

  an override of font string description (i.e. ``font``).

.. include:: /args/xy.rst

markup:
  default: ``false``

  When set to true, various extra styles are allowed. See :ref:`Markup <text-markup>`.

width
  default: ``:auto``

  the width of the box the string will be placed in. Stretches to the content by default.. Supports :doc:`/units`.

height
  default: ``:auto``

  the height of the box the string will be placed in. Stretches to the content by default. Supports :doc:`/units`.

wrap
  default: ``:word_char``

   when ``height`` is set, determines the behavior of how the string wraps. The ``:word_char`` option will break at words, but then fall back to characters when the word cannot fit. Options are ``:none``, ``:word``, ``:char``, ``:word_char``. Also: ``true`` is the same as ``:word_char``, ``false`` is the same as ``:none``.

spacing
  default: ``0``

  Adjust the spacing when the text is multiple lines. No effect when the text does not wrap.

align
  default: ``:left``

  The alignment of the text. [:left, right, :center]<commit_msg>docs: fix wording on word_wrap<commit_after>text
====

Renders a string at a given location, width, alignment, font, etc.

Unix newlines are interpreted even on Windows (i.e. ``"\n"``).


Options
-------
.. include:: /args/expansion.rst

str
  default: ``''``

  the string to be rendered. Must support ``#to_s``.

font
  default: ``'Arial 36'``

  the Font description string, including family, styles, and size. (e.g. ``'Arial bold italic 12'``). For the official documentation, see the `Pango docs <http://ruby-gnome2.sourceforge.jp/hiki.cgi?Pango%3A%3AFontDescription#style>)`_. This `description <http://www.pygtk.org/pygtk2reference/class-pangofontdescription.html>`_ is also quite good.

font_size
  default: ``nil``

  an override of font string description (i.e. ``font``).

.. include:: /args/xy.rst

markup:
  default: ``false``

  When set to true, various extra styles are allowed. See :ref:`Markup <text-markup>`.

width
  default: ``:auto``

  the width of the box the string will be placed in. Stretches to the content by default.. Supports :doc:`/units`.

height
  default: ``:auto``

  the height of the box the string will be placed in. Stretches to the content by default. Supports :doc:`/units`.

wrap
  default: ``:word_char``

   when ``width`` is set, determines the behavior of how the string wraps. The ``:word_char`` option will break at words, but then fall back to characters when the word cannot fit. Options are ``:none``, ``:word``, ``:char``, ``:word_char``. Also: ``true`` is the same as ``:word_char``, ``false`` is the same as ``:none``.

spacing
  default: ``0``

  Adjust the spacing when the text is multiple lines. No effect when the text does not wrap.

align
  default: ``:left``

  The alignment of the text. [:left, right, :center]
{'fraction_non_alphanumeric': 0.14572722127900395, 'fraction_numerical': 0.0050933786078098476, 'mean_word_length': 3.9579242636746144, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '718701', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1100, 'n_words': 451}