From your question alone, I personally think it was Zhao Ji, Emperor Huizong of the Song Dynasty. His self-created thin gold calligraphy is famous both at home and abroad, and has become a calligraphy that many people in later generations strive to copy. Song Huizong not only had high artistic achievements in calligraphy. He also made outstanding contributions in painting, especially good at flower and bird painting.
But looking at Song Huizong's life, I don't think his words are the most beautiful. When he was in power, the government was corrupt, the economy was in decline, he favored traitors, and his military power was weak. This eventually led to a large-scale invasion by the Liao people. Later, it was rumored that his son Song Qinzong Zhao Heng was captured by the Liao army, causing the famous "Jingkang Shame". When he signed the book of succession, I believe his handwriting must have been very ugly.
In contrast, although Emperor Kangxi of the Qing Dynasty did not have any calligraphy achievements that will be remembered in history, he said that the four characters "upright and bright" he wrote have been hanging on the Qianqing Palace. Let future emperors and civil and military officials always keep these four words in mind. Although this did not change the fact that the Qing Dynasty gradually declined since Kangxi. But Emperor Kangxi, who was the only emperor throughout the ages, must have been brilliant and shining when he wrote the four characters "upright and bright".
So, as an emperor, his first priority is not how high his artistic achievements are, or how good his calligraphy and painting skills are, but to take the life of the people in the world as his own responsibility, the development of the country and the prosperity of the nation. For the mission, be an emperor who is diligent and loves the people. For such an emperor, even if your handwriting is ugly, even if you have no ability to appreciate calligraphy and painting, every imperial edict he writes and every edict he issues can bring benefits to all people in the world and bring great benefits to the development of the nation. With help, such calligraphy can always shine brightly for thousands of generations. However, no matter how brilliant the calligraphy of a subjugated king like Song Huizong is, it cannot be remembered in history.