I understand the meaning of "synonym", I'm just not sure of its usage, in particular the correct preposition follows it.

From Cambridge Dictionary


> Cool is not **a synonym for** all things good.

Which indicates "a synonym for" is a correct use.

Ngram Viewers shows "a synonym of" could also be a correct use.

[![enter image description here][1]][1]

Does this mean the same thing as the quotation?

> Cool is not **a synonym of** all things good.

  [1]: https://i.sstatic.net/ivRCC.png