 His father Fang Yanqian (房彥謙) was a county magistrate during the Sui dynasty.Fang Xuanling was said to be intelligent and well-learned in his youth, and particularly skillful at calligraphy.It was said that once, when he accompanied his father to the capital Chang'an, the state was peaceful, and the popular sentiment was that Sui would last a long time.