The simplest way to do this is via the contract you have with the programmer, where you state that all copyright arising from this project is assigned to you. There does exist a "work for hire" doctrine, but that doesn't mean "anything you pay to get created". The problem (in part) is that a program is not included in the list of things that are works for hire: "literary works" are not included, and software is considered legally a "literary work".
If there is no money involved, that could be a problem for the customer. Ordinarily, there would be a contract between Customer and Programmer where Programmer creates the font and assigns copyright to Customer (one way of doing it), and in exchange, Customer pays Programmer – this is known as "consideration" (each party does something for the other, which they didn't have to do already). There does not actually have to be monetary payment, but a gift of a font is not a contract, and isn't enforceable in court in the same way. Whereas is the contract states that each party gets something of value, then you would have a contract (assuming you didn't foul up somewhere else).
One matter that you would want to discuss with the programmer / artist is exactly how much of the work product you want to prohibit him from using in the future. For example, the computer file doesn't contain ink drawings, but such drawings are likely to be necessary in creating the computer file. It may be, then, that your interest is in purchasing a TTF file but not precursor drawings, scans, etc. Or maybe you want everything. Carefully defining the objecting being purchased is a good idea: do not just say "font" and think that that is unambiguous.
Since copyright transfer does not happen (in the desired way) automatically by law, under 17 USC 204(A),
A transfer of copyright ownership, other than by operation of law, is
not valid unless an instrument of conveyance, or a note or memorandum
of the transfer, is in writing and signed by the owner of the rights
conveyed or such owner’s duly authorized agent.
Hence something in writing, with a signature, is required to effect complete transfer of the programmer's copyright. This can be done electronically, so it doesn't need to be ink-on-paper.