From 590274ca299c662f1e3575a07d405c9d1bd7da02 Mon Sep 17 00:00:00 2001 From: Paul Craven Date: Fri, 13 Dec 2024 15:26:49 -0600 Subject: [PATCH 1/2] Update pyglet requirement --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 515e1b6f68..bc80b9f130 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ # at the cost of slow download and constant pip install -I -e .[dev] # "pyglet@git+https://github.com/pyglet/pyglet.git@development#egg=pyglet", # Expected future dev preview release on PyPI (not yet released) - "pyglet == 2.1rc1", + "pyglet == 2.1rc2", "pillow~=11.0.0", "pymunk~=6.9.0", "pytiled-parser~=2.2.7", From 9c43b61f02f8f3775c76bf0c0db62b351448022e Mon Sep 17 00:00:00 2001 From: Paul Craven Date: Fri, 13 Dec 2024 15:54:00 -0600 Subject: [PATCH 2/2] Update to support text weight --- CONTRIBUTING.md | 6 ++++++ arcade/text.py | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 68d2b3604e..62454f6f8b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,6 +63,12 @@ terminal from inside the top level of the Arcade directory: pip install -e '.[dev]' ``` +If you are using the Windows command prompt, use double quotes: + +```bash +pip install -e ".[dev]" +``` + If you get an error like the one below, you probably need to update your pip version: ``` diff --git a/arcade/text.py b/arcade/text.py index a060d686ca..8140050757 100644 --- a/arcade/text.py +++ b/arcade/text.py @@ -250,7 +250,7 @@ def __init__( color=Color.from_iterable(color), width=width, align=align, # type: ignore - bold=bold, + weight=pyglet.text.Weight.BOLD if bold else pyglet.text.Weight.NORMAL, italic=italic, multiline=multiline, rotation=rotation, # type: ignore # pending https://github.com/pyglet/pyglet/issues/843 @@ -527,11 +527,11 @@ def bold(self) -> bool | str: * ``"light"`` """ - return self._label.bold + return self._label.weight == pyglet.text.Weight.BOLD @bold.setter def bold(self, bold: bool | str): - self._label.bold = bold + self._label.weight = pyglet.text.Weight.BOLD if bold else pyglet.text.Weight.NORMAL @property def italic(self) -> bool | str: