【问题标题】:Change default XTerm font size in Cygwin在 Cygwin 中更改默认 XTerm 字体大小
【发布时间】:2011-12-10 07:28:29
【问题描述】:

有人知道在 Cygwin 中打开新的 XTERM 窗口时如何更改默认字体大小吗?

我找到了将信息放入 ~/.Xresources 文件的参考,但该文件对我来说不存在...

谢谢

【问题讨论】:

    标签: configuration cygwin font-size xterm


    【解决方案1】:

    这是我修复它的方法:

    1. 确保你在你的主目录中,所以“cd”和“pwd”可以看到你在那里
    2. 创建 .Xresources 文件,就像“touch .Xresources”一样
    3. 用你最喜欢的编辑器编辑它;)
    4. 这是我的设置,它其实很有用,它包括一个侧边栏,并移除了顶部栏:

      Xft*antialias:          true
      Xft*autohint:           true
      XTerm*background:   black
      XTerm*foreground:   grey
      XTerm*cursorColor:  grey
      XTerm.vt100.geometry:   79x25
      XTerm*scrollBar:    true
      XTerm*rightScrollBar:   true
      XTerm*saveLines:    10000
      XTerm*faceName:     BitStream Vera Sans Mono
      XTerm*faceSize:     12
      XTerm*toolBar:      off
      
    5. 您可以使用“xrdb -merge .Xresources”测试此更改,然后打开另一个 xterm

    6. 为了保存这些更改,您将不得不创建或修改另一个文件“touch .startxwinrc”,打开您的编辑器并包含以下内容:

      #!/bin/sh
      
      xrdb -merge ~/.Xresources
      
    7. 重新启动 XWin 服务器,您将拥有一个更漂亮的 cygwin 终端。

    【讨论】:

    • 终于有一些实际工作了。如果 xrdb 命令没有问题,则更改不会生效。
    【解决方案2】:

    Gonzalo 你的修复让我很开心。 还可以使用以下键盘快捷键动态更改字体大小:

    • Shift+NumPadPlus = 增加字体大小
    • Shift+NumPadMinus = 减小字体大小

    请注意新字体大小对当前 xterm 窗口有效,并且仅对当前进程会话有效。一个新进程将从 XTerm*faceSize 大小的字体开始。

    【讨论】:

    • 您可以使用Ctrl+右键单击(或左键单击)来获取一些选项,包括字体选项。
    【解决方案3】:

    大约在 2015 年左右,XWin 服务器进行了大修,您不再需要创建 .startxwinrc,因为它不再存在。我发现 ~/.Xresources 是自动读入的。我还发现 XTerm.vt100.geometry 不再有效。

    这是我的 .Xresources:

    Xft*antialias:      true
    Xft*autohint:       true
    XTerm*background:   white  <== These settings mimics 
    XTerm*foreground:   black      the default back, fore
    XTerm*cursorColor:  grey       and cursor colors
    XTerm*scrollBar:    true
    XTerm*rightScrollBar:   false  <== This causes the scroll bar to be 
                                       on the default left side
    XTerm*saveLines:    10000
    XTerm*faceName:     BitStream Vera Sans Mono
    XTerm*faceSize:     12
    XTerm*toolBar:      On <== This causes the menu bar to appear with 
                               Main Options, VT Options, and VT Fonts
    

    【讨论】:

      猜你喜欢
      • 2012-06-12
      • 1970-01-01
      • 2011-03-21
      • 2021-03-17
      • 2012-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-28
      相关资源
      最近更新 更多