Yes, any (monospaced) font you install into your Mac will work in the Terminal or Xcode.
Your Mac takes TrueType (.ttf) and OpenType (.otf) fonts.