Ok, that should actually work, your understanding is correct. however if you're getting A with that exact code then there's somthing else at play here, whilst implementing this solution I assume you turned off the image scaling you previously implemented?

Step thru it with your debugger, Ensure that just before your GL_QUADS call that texbottom and texright are what they are supposed to be, in this example texbottom should be 1 and texright should be 0.56.

I can assure you that an image of 18x32, stored in a GL texture of 32x32 (none scaled, origin at 0,0) rendered with tex coords (0,0) (0.56,1.0) would be mapped onto your quad of any size. if your source image was red with a 1 pixel blue border, you'd see that blue border tight against every quad edge.

(A) is exactly what you'd get if you loaded a 18x32 image into a 32x32 texture and rendered with tex coords of (0,0)(1,1) you'd have a 'gap' along one side where the X coord of 1 (Which should be 0.56) is causing the unused part of the texture to be rendered, 'squashing' the original texture (not offset as it appears) so that it's mapped across 0.44 of the width of the quad.

Debug this exact example, ensure that texright=0.56, if it's right then that is very strange indeed, let me know and I'll do my best to help, if needed I'll make you a GL1.x example you can use as a reference