Use setOrigin on your sprite with a negative value of what the bound box width/height should be.
Here's what I ended up doing. I'm using
TexturePacker to create my texture atlas and like the OP I'm using its "trim" feature which removes transparent pixels from source images so that more images can be packed into the atlas while also storing information like "sourceSize" (original size) and "spriteSourceSize" (essentially the offset for the trimmed sprite relative to the original).
In this instance I'm also using a modified version of the
AnimatedSprite class from the wiki as I'm working on my game's animations at the moment.
For my AnimatedSprite I'm setting the origin at the center of the sprite as I need to be able to scale the sprite on the x-axis to get left/right versions of the sprite. I set the origin for the AnimatedSprite based on "sourceSize", or the original size of the graphic (i.e.,
setOrigin(sourceSize.w / 2, sourceSize.h / 2)). For this to work it's important that all graphics in the atlas have the same sourceSize (I suppose it could be made to work otherwise but using the same sourceSize for everything greatly simplifies my life).
Next I added a new class, AnimationFrame, that has three properties an sf::IntRect and two floats, "offsetX", and "offsetY". AnimationFrame replaces the sf::IntRect that is used to define frame sizes in the above-linked AnimatedSprite. AnimationFrame's sf::IntRect defines the bounds of the frame. The offset values are the x/y distances of the top left of the trimmed sprite from the top left of sourceSize. They allow me to properly position the trimmed sprite in the AnimatedSprite.
Finally, in AnimatedSprite::setFrame() the bounds of the frame are used to set the sf::Vertex positions that will later be used for drawing. I've updated this to add the offsetX and offsetY values from my AnimationFrame class to each vertex's position.
I've only had this up and running for a day or so but so far all seems well.