typeset 0.1.0
縦書き・横書きの日本語組版ライブラリ(JLReq 水準、ラスタ / PDF / SVG)
読み取り中…
検索中…
一致する文字列を見つけられません
font_set.hpp ファイル
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include <glyphware/Face.h>
#include "typeset/geom.hpp"

[ソースコード]

クラス

struct  typeset::font::FontDeclaration
 フォントの宣言(開かずに登録するためのメタデータ) [詳解]
 
class  typeset::font::FontSet
 
struct  typeset::font::DecorationMetrics
 下線・打消し線のメトリクス(pt、size で換算)。位置はベースラインからの距離で下が正 (横組みの block 軸と同じ向き。打消し線は通常負) [詳解]
 

名前空間

namespace  typeset
 geom — 単位と幾何
 
namespace  typeset::font
 font — フォント層(glyphware の薄い包み)
 

関数

uint32_t typeset::font::makeTag (const std::string &s)
 OpenType タグ("wght")を glyphware / HarfBuzz の 32bit タグに
 
int typeset::font::effectiveWeight (const glyphware::Face &face)
 face の実効ウェイト。バリアブルフォントのインスタンスなら wght 軸の値、無ければ OS/2 の値
 
float typeset::font::unitsPerEm (const glyphware::Face &face)
 face の unitsPerEm(取れなければ 1000)
 
void typeset::font::faceAscentDescent (const glyphware::Face &face, Pt size, Pt &ascent, Pt &descent)
 face の ascender / descender(正・正、pt)を size で返す
 
DecorationMetrics typeset::font::decorationMetrics (FontSet &fonts, const glyphware::Face &face, Pt size)
 post / OS/2 から取る(hb_ot_metrics)。無ければ下線 0.1em / 太さ 0.05em、打消し線 -0.3em