>> IIUC Emacs usually [...] rounds the height to the nearest integer
>> multiple of the canonical line height instead.
>
> That's not really relevant, since the height includes the tool bar and
> the menu bar, whose sizes aren't multiples of the canonical font
> height. So the windows end up with non-integral number of text lines
> anyway.
My frame.h has
/* Number of lines of frame F used for menu bar.
This is relevant on terminal frames and on
X Windows when not using the X toolkit.
These lines are counted in FRAME_LINES. */
#define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines
/* Number of lines of frame F used for the tool-bar. */
#define FRAME_TOOL_BAR_LINES(f) (f)->tool_bar_lines
so AFAICT these are measured in canonical line heights too.