Let 2 * PI * f vary from 0 to PI
It's best to see the original text, but I assume $f$ here is the normalized frequency (actual frequency divided by the sample rate), so we have $\omega = 2 \pi f$. This means that if you need to evaluate the transfer function from DC ($f = 0$) to Nyquist frequency ($f = \frac{1}{2}$), you need to evaluate the transfer function with $\omega$ varying from 0 to $\pi$. Practically, you decide on a grid size $N$ (say $N=100$ points) and evaluate the transfer function at the points $\omega_k = \frac{k \pi}{N - 1}$ for $k = 0, 1, \ldots, N - 1$.

You make it sound like there are two independent variables but there is only one, $\omega$ - the other one, $f$ is just the same thing with different units.