1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:27:44 +00:00

LibTTF: Parse OS/2 tables

The OS/2 table contains nice typographic ascent/descent information.
This commit is contained in:
Andreas Kling 2021-07-20 01:31:00 +02:00
parent 3b1e05f714
commit e984200206
3 changed files with 48 additions and 2 deletions

View file

@ -126,6 +126,27 @@ private:
u32 m_number_of_h_metrics { 0 };
};
class OS2 {
public:
enum class Offsets {
TypographicAscender = 68,
TypographicDescender = 70,
TypographicLineGap = 72,
};
i16 typographic_ascender() const;
i16 typographic_descender() const;
i16 typographic_line_gap() const;
explicit OS2(ReadonlyBytes const& slice)
: m_slice(slice)
{
}
private:
ReadonlyBytes m_slice;
};
class Name {
public:
enum class Platform {