Skip to content

Commit 8f8cf3a

Browse files
authored
Merge pull request #28 from jimbarrett27/include-font-file
Include font file
2 parents 8210834 + 8f096ac commit 8f8cf3a

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414

1515
### Fixed
1616
- Custom width and height now supported
17+
- A default font file is correctly included in the build
1718

1819
## [0.1] - 2024-08-15
1920

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ description = "A predictable, interpretable wordcloud library"
55
authors = ["Jim Barrett <[email protected]>", "Marcus Näslund <[email protected]>"]
66
license = "GPLv3"
77
readme = "README.md"
8+
include = [
9+
"fonts/*"
10+
]
11+
812

913
[tool.poetry.dependencies]
1014
python = "^3.9"

tests/test_rectangle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def text_image_and_rectangle_strategy(draw):
6464

6565
text = draw(st.text(min_size=1, max_size=10))
6666

67-
font_size = draw(st.integers(min_value=5, max_value=100))
67+
font_size = draw(st.integers(min_value=10, max_value=100))
6868
font = FontWrapper(
6969
size=font_size, color_func=lambda _: (0, 0, 0), path=FontWrapper.default_font()
7070
)

wrdcld/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def make_word_cloud(
2121
font_color: Color = (255, 255, 0),
2222
font_color_func: Callable[[float], Color] | None = None,
2323
background_color: Color = (73, 109, 137),
24-
minimum_font_size: int = 1,
24+
minimum_font_size: int = 10,
2525
maximum_font_size: int = 100,
2626
word_padding: int = 0, # TODO
2727
scaling_func: Callable[[float], float] = math.sqrt,

0 commit comments

Comments
 (0)