Skip to content

Conversation

@jfboeve
Copy link
Collaborator

@jfboeve jfboeve commented Jul 22, 2025

  • Removed contain
  • Introduced maxWidth / maxHeight
  • also now properly loading canvas fonts
  • changed update order
  • overwriting some CoreNode functions to make them do less work than needed.

@jfboeve jfboeve requested a review from wouterlucas July 22, 2025 09:54
@wouterlucas
Copy link
Contributor

Whats the driver / rationale to remove contain? does maxWidth / maxHeight provide more control?
Other then its easier to understand.

Does this align with the Blits text syntax / implementation @michielvandergeest ?

@jfboeve
Copy link
Collaborator Author

jfboeve commented Jul 23, 2025

Whats the driver / rationale to remove contain? does maxWidth / maxHeight provide more control? Other then its easier to understand.

Does this align with the Blits text syntax / implementation @michielvandergeest ?

Here's the Blits docs for text. maxWidth and maxHeight are already implemented, but underwater its normalized to contain and width and height and stuff.

Removing contain in favor of maxWidth/maxHeight makes removes the checks for maxheight and width checks in the generating phase of the Text. This also simplifies adjusting the textnode width / height according what it's rendering position will be, this also means we can more easily dynamically change the maxwidth / maxheight, which would not be possible with the current width/height/contain setup.

@wouterlucas
Copy link
Contributor

nice ok - thanks for elaborating!

@wouterlucas wouterlucas merged commit f6a8ef3 into feat/text-refactor Jul 23, 2025
1 of 2 checks passed
@wouterlucas wouterlucas deleted the feat/text-refactor-no-contain branch July 23, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants