Fixed label alignment issues

Fixed off-center label alignment issues. Dynamically handles differing font sizes and string lengths.