font ==== .. py:module:: qfluentwidgets.common.font Module Contents --------------- .. autoapisummary:: qfluentwidgets.common.font.setFontFamilies qfluentwidgets.common.font.fontFamilies qfluentwidgets.common.font.setFont qfluentwidgets.common.font.getFont qfluentwidgets.common.font.fontStyleSheet .. py:function:: setFontFamilies(families: List[str], save=False) set the font families used by all widgets Parameters ---------- families: List[str] font family names, the default value is `['Segoe UI', 'Microsoft YaHei', 'PingFang SC']` save: bool whether to save the change to config file .. py:function:: fontFamilies() -> List[str] Returns the font families used by all widgets .. py:function:: setFont(widget: PyQt5.QtWidgets.QWidget, fontSize=14, weight=QFont.Normal) set the font of widget Parameters ---------- widget: QWidget the widget to set font fontSize: int font pixel size weight: `QFont.Weight` font weight .. py:function:: getFont(fontSize=14, weight=QFont.Normal) create font Parameters ---------- fontSize: int font pixel size weight: `QFont.Weight` font weight .. py:function:: fontStyleSheet(font: PyQt5.QtGui.QFont) Returns the style sheet of font