在zenity窗口中控制内容的大小? [英] Control the size of the content in a zenity window?
问题描述
我可以使用--width
和
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?
推荐答案
Zenity允许某些标记,例如< b> ;、< i>或< span>.实际上,它是 Pango标记.因此,可以使用具有font或size属性的span来实现较大的文本:
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:
例如:
zenity --info --text '<span foreground="blue" font="32">Some\nbig text</span>\n\n<i>(it is also blue)</i>'
请注意, font ="32" 是另一种写 size ="32768" 的方法,因为大小在一个点的1024分之内. font ="32" 是仅包含大小的部分字体描述.请参阅文档页面.
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.
另请参阅:
zenity --info --text 'Normal <big>Big <big>Bigger</big></big>'
在不指定确切大小的情况下增加字体大小.
To increase the font size without specifying an exact size.
这篇关于在zenity窗口中控制内容的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!