We can represent $f(x)$ by
$$f(x)=H(\pi-|x|)\cos(x)$$
where $H(x)$ is the Heaviside step function.
The Fourier Transform of $\cos(x)$ is
$$\mathcal{F}[\cos(x)](\omega)=\sqrt{\frac{\pi}{2}}\left(\delta(\omega-1)+\delta(\omega+1)\right)$$
and the Fourier Transform of $H(\pi-|x|)$ is easily calculated:
\begin{align}
\mathcal{F}[H(\pi-|x|)](\omega)&=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty H(\pi-|x|)e^{-i\omega x}dx\\
&=\frac{1}{\sqrt{2\pi}}\int_{-\pi}^\pi e^{-i\omega x}dx\\
&=-\frac{2}{2i\omega\sqrt{2\pi}}\left[e^{-i\omega\pi}-e^{i\omega\pi}\right]\\
&=\sqrt{\frac{2}{\pi}}\frac{\sin(\pi\omega)}{\omega}
\end{align}
Now, by the Convolution Theorem, the Fourier Transform of the product of two functions is given by the convolution of their Fourier Transforms:
\begin{align}
\mathcal{F}[H(\pi-|x|)\cos(x)](\omega)&=\int_{-\infty}^\infty\left(\delta(s-\omega-1)+\delta(s-\omega+1)\right)\frac{\sin(\pi s)}{s}ds\\
&=\frac{\sin(\pi(\omega-1))}{\omega-1}+\frac{\sin(\pi(\omega+1))}{\omega+1}
\end{align}