1#ifndef TYPESET_DL_GLYPH_TRANSFORM_HPP
2#define TYPESET_DL_GLYPH_TRANSFORM_HPP
32 float skewX = 0.0f,
float fakeScaleX = 1.0f) {
39 if (scaleX != 1.0f || scaleY != 1.0f) {
45 if (rotation != 0.0f) {
48 const float c = std::cos(rotation);
49 const float s = std::sin(rotation);
Pt fakeBoldWidth(Pt fontSize)
フェイクボールドのストローク幅(フォントサイズの 1/24)
constexpr float kFakeItalicSkew
フェイクイタリックのシアー係数(Android と同じ -0.25 ≒ 14度)
Mat2 glyphMatrix(float rotation, float scaleX=1.0f, float scaleY=1.0f, float skewX=0.0f, float fakeScaleX=1.0f)
グリフ固有の変形を 1 つの 2x2 へ畳む(ペン原点・y-down)
Matrix multiply(const Matrix &a, const Matrix &b)
a を後から適用する合成(結果 = a ∘ b。b で写してから a)
2x2 行列(平行移動なし)。グリフ固有の変形に使う。 x' = xx*x + xy*y y' = yx*x + yy*y