Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
180 views
in Technique[技术] by (71.8m points)

c - How can I flexibly change an font's size in X window using XFontStruct

I have a program based on X11 window, using C & Motif, for some reason I want to change the font-size displayed on the interface, just as the text editor, which can change the font-size by choosing the specific number to realize.

But here I occurred this difficulty, in X11 lib, the method of using system font in the program is calling XLoadFont to load the specific font to the XFontSruct, and the parameters must be the font name that can be queried by "xlsfonts"

which means I can not change the font size flexibly, the font I am using now is

-bitstram-bitstram vera sans mono-medium-r-normal--0-0-0-0-m-0-isi8859-15

How can I probably change the font-size of this font flexibly in my program?

question from:https://stackoverflow.com/questions/65933979/how-can-i-flexibly-change-an-fonts-size-in-x-window-using-xfontstruct

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...