Horizontal Alignment in Photoshop – Which is correct?

I usually align two text within a box using "Horizontal align center" button at the top menu in Photoshop. Is it the right way to align a text horizontally, or should i measure pixel by pixel using a Marque tool to make it visually horizontal?

It visually appears to the user that it is not aligned center. But technically i am right. How will the UI developer measure it to align it in HTML? Will the user think the alignment is not centre even though it is technically right? enter image description here - The above picture is technically aligned centre.

enter image description here - This image shows the manual alignment which is visually correct.

Which method should i follow being an UX designer?

Please explain me with an example.