Origins of "suits you to a T"

What is the origin of the phrase "it suits you to a T"? I was thinking it has to do with how a jacket fit when it was tailored and you
extended your arms straight out from your sides to see if the sleeves and the shoulders fit well.

See link below:

See also: the meaning and origin of the phrase 'To a T'.