Control the size of the content in a zenity window?

橙三吉。 提交于 2019-12-09 11:59:44

问题


I can control the size of a zenity window with the --width and the --height arguments:

$ zenity --info --text="This is an information box." --width=600 --height=400

Is there a way to control the size of the content? For example, can I double the size of the font used to display the text?


回答1:


Zenity allows some markup like <b>, <i> or <span>. In fact it's Pango Markup. So larger text can be achieved with a span that has a font or size attribute:

For example:

zenity --info --text '<span foreground="blue" font="32">Some\nbig text</span>\n\n<i>(it is also blue)</i>'

Note that font="32" is another way to write size="32768" since size is in 1024ths of a point. font="32" is a partial font description containing only a size. See the documentation page.

See also:

zenity --info --text 'Normal <big>Big <big>Bigger</big></big>'

To increase the font size without specifying an exact size.



来源:https://stackoverflow.com/questions/18234920/control-the-size-of-the-content-in-a-zenity-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!