Fluent-Qt

API 參考

Typography

本標頭檔宣告的公開型別、函式與常數。

Typography::FontStyle

預設字型層級的完整字型組態,包含靜態 styleName 與像素行高。

欄位

QString styleName

Figma 字型樣式名稱,例如 "Small Regular"。

int weight

QFont::Weight

int lineHeight

Figma 實測絕對像素值。

方法

Typography

列舉

enum class FontRole

預設 Fluent 字型大小與粗細層級。

  • Caption
  • Body
  • BodyStrong
  • BodyLarge
  • BodyLargeStrong
  • Subtitle
  • Title
  • TitleLarge
  • Display

方法

inline QString fontRoleKey(FontRole role)

傳回預設字體層級的穩定序列化鍵名。

inline const FontStyle& fontStyle(FontRole role)

傳回預設字體層級的預先定義字體設定。

Typography::FontFamily

常數

Typography::FontSize

常數

const int Caption = 12

Small Regular 12/16

const int Body = 14

Text Regular 14/20

const int BodyStrong = 14

Text Semibold 14/20

const int BodyLarge = 18

Text Regular 18/24

const int Subtitle = 20

Display Semibold 20/28

const int Title = 28

Display Semibold 28/36

const int TitleLarge = 40

Display Semibold 40/52

const int Display = 68

Display Semibold 68/92

Typography::IconSize

常數

Typography::LineHeight

常數

Typography::FontWeight

常數

const int Medium = QFont::Medium

備用字重,Figma 未定義。

const int Bold = QFont::Bold

備用字重,目前 Figma 未定義。

Typography::Icons

常數

extern const QString FlipViewPrevH

FlipView 專用箭頭,比一般 Chevron 更小更細。

extern const QString Add

常用動作與編輯

extern const QString Mail

通訊與使用者

extern const QString Folder

檔案與資料夾

extern const QString Wifi

System & Hardware

extern const QString Brush

設計與版面配置

Typography::Styles

常數