Added support for scaling using branches in primitive and text.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>