typeset 0.1.0
縦書き・横書きの日本語組版ライブラリ(JLReq 水準、ラスタ / PDF / SVG)
読み取り中…
検索中…
一致する文字列を見つけられません
typeset::TextStyle 構造体

文字スタイル [詳解]

#include <typeset/style.hpp>

公開メンバ関数

bool hasProportionalFeature () const
 features に字幅を変える feature(palt / halt / pwid / hwid / vpal / vhal / twid / qwid)が有効に入っているか
 
std::vector< TextLayerresolvedLayers () const
 実際に描く層(下から上): shadow → layers(空なら fill / stroke の 1 層)
 

公開変数類

FontSpec font
 
Pt size = 10.0f
 
Paint fill {Color{0, 0, 0, 255}}
 塗り(単色またはグラデーション)
 
std::optional< Strokestroke
 縁取り
 
std::optional< TextShadowshadow
 影。layers の下に 1 層足す
 
std::vector< TextLayerlayers
 外観の層(下から上)。空なら fill / stroke の 1 層。指定すると fill / stroke は描画に使わない (下線の既定色としては fill が使われる)
 
std::optional< TextDecorationunderline
 
std::optional< TextDecorationstrikethrough
 
float letterSpacing = 0.0f
 字間(em 単位)。組版層ではクラスタ間の Glue として扱う
 
std::optional< TextOrientationorientation
 縦組み中の向きの部分指定(段落の指定を上書き)
 
float scaleX = 1.0f
 平体・長体
 
float scaleY = 1.0f
 
bool fakeBold = false
 合成ボールド/斜体(フォントに該当ウェイト・斜体が無い場合に明示指定する)
 
bool fakeItalic = false
 
float baselineShift = 0.0f
 ベースラインのずらし(このスタイルの em 単位)。注記側が正(横組み: 上、縦組み: 右)。上付き文字・脚注記号用
 
std::string language = "ja"
 BCP47(シェイピングの言語タグ。"ja" で日本語字形が選ばれる)
 
EmojiPresentation emojiPresentation = EmojiPresentation::Auto
 絵文字の表示形式(既定は異体字セレクタに従う)
 
std::vector< std::string > features
 OpenType feature(HarfBuzz の書式: "palt" "+liga" "-kern" "liga=0" "ss01")。そのまま HarfBuzz へ渡す。 palt / halt / pwid / hwid など字幅を変える feature を有効にした文字は、JLReq の約物の詰め(仮想ボディの 半角化と約物間のアキ)を使わずフォントの送りをそのまま使う(二重に詰めない)
 

詳解

文字スタイル

style.hpp86 行目に定義があります。

関数詳解

◆ hasProportionalFeature()

bool typeset::TextStyle::hasProportionalFeature ( ) const
inline

features に字幅を変える feature(palt / halt / pwid / hwid / vpal / vhal / twid / qwid)が有効に入っているか

style.hpp130 行目に定義があります。

参照先 features.

◆ resolvedLayers()

std::vector< TextLayer > typeset::TextStyle::resolvedLayers ( ) const
inline

実際に描く層(下から上): shadow → layers(空なら fill / stroke の 1 層)

style.hpp147 行目に定義があります。

参照先 typeset::TextLayer::blur, typeset::TextLayer::fill, fill, layers, typeset::TextLayer::offset, shadow, typeset::TextLayer::stroke, stroke.

メンバ詳解

◆ font

FontSpec typeset::TextStyle::font

style.hpp87 行目に定義があります。

◆ size

Pt typeset::TextStyle::size = 10.0f

style.hpp88 行目に定義があります。

参照元 typeset::inl::superscriptStyle().

◆ fill

Paint typeset::TextStyle::fill {Color{0, 0, 0, 255}}

塗り(単色またはグラデーション)

style.hpp89 行目に定義があります。

参照元 resolvedLayers().

◆ stroke

std::optional<Stroke> typeset::TextStyle::stroke

縁取り

style.hpp90 行目に定義があります。

参照元 resolvedLayers().

◆ shadow

std::optional<TextShadow> typeset::TextStyle::shadow

影。layers の下に 1 層足す

style.hpp93 行目に定義があります。

参照元 resolvedLayers().

◆ layers

std::vector<TextLayer> typeset::TextStyle::layers

外観の層(下から上)。空なら fill / stroke の 1 層。指定すると fill / stroke は描画に使わない (下線の既定色としては fill が使われる)

style.hpp96 行目に定義があります。

参照元 resolvedLayers().

◆ underline

std::optional<TextDecoration> typeset::TextStyle::underline

style.hpp98 行目に定義があります。

◆ strikethrough

std::optional<TextDecoration> typeset::TextStyle::strikethrough

style.hpp99 行目に定義があります。

◆ letterSpacing

float typeset::TextStyle::letterSpacing = 0.0f

字間(em 単位)。組版層ではクラスタ間の Glue として扱う

style.hpp102 行目に定義があります。

◆ orientation

std::optional<TextOrientation> typeset::TextStyle::orientation

縦組み中の向きの部分指定(段落の指定を上書き)

style.hpp105 行目に定義があります。

◆ scaleX

float typeset::TextStyle::scaleX = 1.0f

平体・長体

style.hpp108 行目に定義があります。

◆ scaleY

float typeset::TextStyle::scaleY = 1.0f

style.hpp109 行目に定義があります。

◆ fakeBold

bool typeset::TextStyle::fakeBold = false

合成ボールド/斜体(フォントに該当ウェイト・斜体が無い場合に明示指定する)

style.hpp112 行目に定義があります。

◆ fakeItalic

bool typeset::TextStyle::fakeItalic = false

style.hpp113 行目に定義があります。

◆ baselineShift

float typeset::TextStyle::baselineShift = 0.0f

ベースラインのずらし(このスタイルの em 単位)。注記側が正(横組み: 上、縦組み: 右)。上付き文字・脚注記号用

style.hpp116 行目に定義があります。

参照元 typeset::inl::superscriptStyle().

◆ language

std::string typeset::TextStyle::language = "ja"

BCP47(シェイピングの言語タグ。"ja" で日本語字形が選ばれる)

style.hpp119 行目に定義があります。

◆ emojiPresentation

EmojiPresentation typeset::TextStyle::emojiPresentation = EmojiPresentation::Auto

絵文字の表示形式(既定は異体字セレクタに従う)

style.hpp122 行目に定義があります。

◆ features

std::vector<std::string> typeset::TextStyle::features

OpenType feature(HarfBuzz の書式: "palt" "+liga" "-kern" "liga=0" "ss01")。そのまま HarfBuzz へ渡す。 palt / halt / pwid / hwid など字幅を変える feature を有効にした文字は、JLReq の約物の詰め(仮想ボディの 半角化と約物間のアキ)を使わずフォントの送りをそのまま使う(二重に詰めない)

style.hpp127 行目に定義があります。

参照元 hasProportionalFeature().


この構造体詳解は次のファイルから抽出されました: