Skip to content

Commit

Permalink
add example language codes
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijndevos committed Oct 13, 2023
1 parent 14dd56a commit 620f16c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions vpype/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def _word_wrap(
):
"""Break text in multiple line."""
dic = pyphen.Pyphen(lang=lang) if lang else None
print(lang, dic)
result = []
for line in paragraph.split("\n"):
# handle empty lines
Expand Down Expand Up @@ -227,7 +226,7 @@ def text_block(
left alignment)
line_spacing: line spacing (default: 1.0)
justify: should the text be justified (default: False)
hyphenate: wrapped text is hyphenated with the given language (default: None)
hyphenate: wrapped text is hyphenated with the given language (en, nl, etc, default: None)
"""

font = _Font.get(font_name)
Expand Down
4 changes: 2 additions & 2 deletions vpype_cli/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"-h",
"--hyphenate",
type=TextType(),
help="Hyphenate wrapped words using the provided language.",
help="Hyphenate wrapped words using the provided language code (en, nl, etc.)",
)
@click.option("-j", "--justify", is_flag=True, help="Justify text block (wrap-mode only).")
@click.option(
Expand Down Expand Up @@ -61,7 +61,7 @@ def text(
In wrap mode, the text start at (0, 0) and expends left until it reach the specified width.
The `--align` option controls how the text is laid out within the column and behaves as
typically expected. The `--hyphenate` options enables hyphenation using the provided
language code.
language code (en, nl, etc.)
To start the text at the different location than (0, 0), use the `--position` option.
"""
Expand Down

0 comments on commit 620f16c

Please sign in to comment.