How do I know if a current source supplies or receive energy?
To determine if an element is absorbing or providing power you need to apply the passive sign convention, which says that current enters the node of an element that is assumed to be at the higher voltage. If the product of current and voltage is positive, meaning that both current and voltage are positive or both are negative, then the power is positive. Positive power is power absorbed. If the calculated power is negative then the element is providing power.

The question that you actually ask in the body of your question was about determining the polarity of the voltage across \$I_f\$. Well, this is a typical circuit analysis problem. Apply KVL, KCL, and Ohm's Law as necessary until you have found all of the circuit voltages and current.