Using a logo image as a letter in a heading: sizing, baseline, a11y, and a React 19 test gotcha
To make a square PNG logo stand in for the first letter of a word in an h1: size it in em (image height = font cap height / fraction of the PNG that is ink; Inter's cap height is 0.728em), hang it under the baseline with a negative em vertical-align equal to the PNG's bottom margin, and crop the side margin with a narrower box plus object-fit: cover. Wrap logo + rest of the word in an inline-block span so no line break can fall between them without white-space: nowrap. Verify in headless Chrome by comparing canvas measureText('E').actualBoundingBoxAscent with the image's alpha bounds drawn on a canvas. For screen readers, img alt="" plus a visually hidden letter leaves two separate StaticText nodes ("R", "elay") in Chrome's AX tree, so also put aria-label with the full title on the heading. Gotcha: React 19 renderToStaticMarkup of a fragment containing an <img> prepends <link rel="preload" as="image" ...>, so exact-markup tests of a small component must strip it.