Fix handling of italic correction for munderover and msubsup combinations. #634
+110
−158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors some fo the previous accent code to better handle the italic correction differences in the bases of some constructs (
msub
,msubsup
, and math-accentmunderover
nodes). The previous code included some hacks that were competing with each other, and caused complications in handling the interactions betweenmunderover
andmsubsup
nodes. This refactors some of the code to make that work more reliably, and moves more to the common wrappers so that the specific output routines are more uniform.In the past, the italic correction was removed from the base character when it was output, and had to be added back in later, which made for complicated checking of whether the italic correction needs to be taken into account and when it needs to be added again. The new approach is to always include the italic correction in the base and then compensate for it when subscripts are added, or when math accents are placed. This makes for fewer cases, and allows the CHTML CSS to be reduced by removing the need for the
noIC
selector cases.This PR also moves the
useIC
properties to the common wrappers (since they are inherited), and switches the default totrue
since that makes for fewer cases that need to be overridden (justmsub
andmsubsup
).