He was a talented student who read widely in the classics. He served under the Sui Dynasty in 611 as Imperial Doctor. He served under the Tang Dynasty as censor and scholar at the Hongwen Academy. There he taught calligraphy. He was a principal contributor to the ''Yiwen Leiju''.
He became the Imperial Calligrapher and inscribed several major imperial steles.
He was considered a cultured scholar and a government official.
Along with Yu Shinan and Chu Suiliang became known as one of the Three Great Calligraphers of the Early Tang.