font QML Value Type

QFont 속성을 가진 글꼴 값 font 유형은 QFont 속성을 가진 글꼴 값을 참조합니다.. ..

자세한 설명

font 유형의 속성은 애플리케이션의 기본값 font 을 기본값으로 합니다.

가장 일반적으로 사용되는 속성은 다음과 같습니다:

pointSizepixelSize 을 모두 지정하면 pixelSize 이 사용됩니다.

다음 속성도 사용할 수 있습니다:

예시:

    Text {
        font.family: "Helvetica"
        font.pointSize: 13
        font.bold: true
    }

fontstructured value 유형이므로 JavaScript 객체로 구성할 수도 있습니다:

    readonly property font myFont: ({
        family: "Helvetica",
        pointSize: 13,
        bold: true
    })

C++와 통합할 때, C++에서 QML로 전달된 QFont 값은 자동으로 font 값으로 변환되며, 그 반대의 경우도 마찬가지입니다.

이 값 유형은 QtQuick 가져오기를 통해 제공됩니다.

글꼴 가중치의 숫자 값은 CSS 사양을 따르며, 가중치 100은 매우 밝게, 900은 매우 굵게 표시됩니다. 지원되는 값은 다음과 같습니다:

상수설명
Font.Thin100
Font.ExtraLight200
Font.Light300
Font.Normal400
Font.Medium500
Font.DemiBold600
Font.Bold700
Font.ExtraBold800
Font.Black900

대문자화는 다음 값을 지원합니다:

상수설명
Font.MixedCase대문자 변경이 적용되지 않습니다.
Font.AllUppercase텍스트가 모든 대문자로 렌더링되도록 변경합니다.
Font.AllLowercase텍스트가 모든 소문자로 렌더링되도록 변경합니다.
Font.SmallCaps렌더링할 텍스트를 소문자 유형으로 변경합니다.
Font.Capitalize각 단어의 첫 글자를 대문자로 렌더링하도록 텍스트를 변경합니다.

힌트 기본 설정은 "NativeRendering" 렌더링 유형을 사용할 때만 적용됩니다. 이 속성은 다음 값을 지원합니다:

Constant설명
Font.PreferDefaultHinting대상 플랫폼의 기본 힌팅 수준을 사용합니다.
Font.PreferNoHinting가능하면 글리프의 윤곽선을 힌트하지 않고 텍스트를 렌더링합니다.
Font.PreferVerticalHinting가능하면 가로 힌트 없이 텍스트를 렌더링하되 글리프를 세로 방향의 픽셀 그리드에 정렬합니다.
Font.PreferFullHinting가능하면 가로 및 세로 방향 모두에 힌트가 있는 텍스트를 렌더링합니다.

QML 값 유형도참조하세요 .

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.