The terms "heteronym" and "homograph" are not synonymous. The latter refers to any two words with the same spelling and different meanings. Heteronyms are a proper subset of homographs. Heteronyms are hoomographs that also have different pronunciations. Your examples are both heteronyms and homographs. An example of a pair of terms that are homographs but not heteronyms would be (river) "bank" and (financial) "bank." They are spelled and pronounced the same way, but they have different meanings.

Joy,
Lynn