Skip to content

Conversation

yashuatla
Copy link
Owner

This PR contains changes from a range of commits from the original repository.

Commit Range: 5f922ff..45d4dfd
Files Changed: 8 (5 programming files)
Programming Ratio: 62.5%

Commits included:

ayshih and others added 17 commits May 16, 2025 15:07
We now subset Type-1 fonts and no longer have a copy of ttconv.

Make the font comparison table a grid table so we can use a colspan
cell.

Clarify that Type-1 fonts get used only in the usetex/pdf combination.
Throw exception when alpha is out of bounds
Co-authored-by: Elliott Sales de Andrade <[email protected]>
TST: Fix runtime error checking NaN input to format_cursor_data
Fixed an off-by-half-pixel bug in image resampling when using a nonaffine transform (e.g., a log axis)
raise TypeError(f"'alpha' must be numeric or None, not {type(alpha)}")
if not 0 <= alpha <= 1:
ValueError("'alpha' must be between 0 and 1, inclusive")
raise ValueError("'alpha' must be between 0 and 1, inclusive")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐛 Correctness Issue

Missing 'raise' keyword causes silent validation failure.

The ValueError was being created but not raised, allowing invalid alpha values to silently pass validation and potentially cause rendering issues.

Current Code (Diff):

-             ValueError("'alpha' must be between 0 and 1, inclusive")
+             raise ValueError("'alpha' must be between 0 and 1, inclusive")
📝 Committable suggestion

‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀

Suggested change
raise ValueError("'alpha' must be between 0 and 1, inclusive")
raise ValueError("'alpha' must be between 0 and 1, inclusive")

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.

8 participants