move setup_outline_context() to a more sensible shared location