Fluent-Qt

API 参考

Typography

该头文件公开的类型、函数与常量参考。

Typography::FontStyle

一个 Fluent 排版角色的完整字体度量。

方法

字段

QString styleName

Figma 字体样式名。

int weight

QFont::Weight

int lineHeight

Figma 实测绝对像素值。

Typography

方法

inline QString fontRoleKey(FontRole role)

返回排版角色用于序列化的稳定 key。

inline const FontStyle& fontStyle(FontRole role)

解析排版角色对应的不可变字体度量。

枚举

enum class FontRole

强类型 Fluent 排版角色。

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

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 SemiBold = QFont::DemiBold

标题类主要使用。

const int Bold = QFont::Bold

备用档,当前 Figma 未定义。

Typography::Icons

常量

extern const QString FlipViewPrevH

FlipView 专用箭头,比常规 Chevron 更小更细。

extern const QString Add

Common Actions & Editing

extern const QString Mail

Communication & User

extern const QString Wifi

System & Hardware

Typography::Styles

常量