Changing the font sizes in ANSYS Fluent (for high DPI display)

Solution

Assuming the version is 17.2, navigate to:

C:\Program Files\ANSYS Inc\v172\fluent\fluent17.2.0\cortex\resources

and open cxdisplay.qss with a text editor (e.g. Atom, Notepad++, or whatever). You may need the Admin right (I did).

It seems this is CSS, so just modify the font sizes under “QWidget” and “QDockWidget#RibbonDockWidget QGroupBox” (I’m assuming the latter is for the ribbon menu but I don’t know for sure).

Specifically, change the numbers before the “px” in:

QWidget{
        font: normal 20px;
}

and

QDockWidget#RibbonDockWidget QGroupBox {
    font-size: 18px;
}

(Note I already changed them and forgot what were the original sizes. Probably 14 px and 13 px, respectively)

Background

I’m using high DPI displays on Windows 10. The scaling worked for the Workbench but not for Fluent, which made me so unhappy. I tried the .manifest thing in vain. So I tried searching the Fluent help app, which led me to the file cxdisplay.qss!

UPDATE 2017-03-27

I noticed this only works for Fluent. 200% display scaling worked for Workbench but instead it introduced another problem in DesignModeler and Meshing, where the heights of the texts in menu bars are too small, i.e. only some top portion of the texts are visible in the menu bars. Maybe the real problem is not the font size but the height of each menu bar, which is apparently fixed and not scaled properly.

Unfortunately, I haven’t found the workaround for this. I could not find corresponding CSS yet. Therefore I am using 150% or 175% as a compromise. Another way is to go without the texts in menu bars and only the icons (except for the main menu bar). You can set this in the Workbench options. For this, from main menu in Workbench, Tool > Options > Appearance > uncheck “Text on Toolbars”. Tooltips are still available when you hover the mouse cursor on the buttons.

Hope ANSYS implement the support for the hi-DPI displays in the update…

日本語の説明(需要あるのか…?)

2Kだか4Kだかの高解像度ディスプレイで Fluent (17.2) を開くと文字が小さくて死ぬ。Workbench は Windows 10 のスケーリングでうまくいったのに Fluent はダメ。つらい。ググって出てくる .manifest ファイルとレジストリいじるやつをやってもダメだった。

ダメ元で Fluent 内のヘルプ検索したら「CSS いじれよ」みたいにあった。マジかよ…

C:\Program Files\ANSYS Inc\v172\fluent\fluent17.2.0\cortex\resources

にある cxdisplay.qss をテキストエディタで開いて(管理者権限必要かも)、

QWidget{
        font: normal 20px;
}

QDockWidget#RibbonDockWidget QGroupBox {
    font-size: 18px;
}

を好きなサイズに変えればよい(確か、もともとは 14 px と 13 px だった気がする)。

UPDATE 2017-05-09

I noticed that for workbench fonts to be enlarged you need to tick the “Disable display scaling on high DPI settings” for your launching shortcut icon of the workbench.

Workbench については、起動するためのショートカットアイコンを右クリックし、Properties > Compatibility の下の方、Settings 内の “Disable display scaling on high DPI settings” にチェックを入れることが必要だった。これは 18.0 をインストールしたときに気づいた。