What a lovely comment, explaining not just the why but also, in this case, the 'how' because its not obvious how to derive the code from the requirement so actually explaining how is worth it.
And a bunch of other places in the codebase from memory (cairo-path-stroke.c, cairo-path-stroke-polygon.c and cairo-path-stroke-tristrip.c). And there's a bug in there too because they're working in the wrong space so the checks are applied after outer transformations [0].... but it's still a great comment! :-)
But then I scrolled down and saw it verbatim just a few lines further down https://github.com/behdad/cairo/blob/color-emoji/src/cairo-p...
Why is CheckMitreHight() not a function? :)