-
Notifications
You must be signed in to change notification settings - Fork 682
Limit total operations during feature closure. #1317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Limit the max number of operations (set additions) that can be performed.
Skip processing of any that have already been visited.
|
While legit fonts don't use the same bytes for a script and a langsys, your code works. But I dislike making that assumption. I think we should have separate sets for script and langsys. wdyt? Also, taking offset from start of table is misleading, in that we might also receive the nul object, which is outside of the table. I suggest you handle that by first checking if number of children in object is zero and return in that case, then check in the set (the way you have it with offsets is fine). Nit, I'd rename "get_gsubgpos_table" to "_get_gsubgpos". Thanks. |
| table_tag, | ||
| script_index, | ||
| &script_index) | ||
| && context.visit (&context.gsubgpos.get_script (script_index))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that we are once calling get_script to check, and then call a function with script_index. Please use the function chain to take the script object and next the langsys object, instead of indices, so we look them up once. And I would move the "visit" check into the next function instead of before calling it.
Also, "visit" name is misleading since it suggests it does the actual visitation. "may_visit" or something is better. Or invert it as "visited"...
|
I'm working on this. |
Preparation for fixing harfbuzz#1317
No description provided.