mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:47:34 +00:00
LibTTF: Parse OS/2 tables
The OS/2 table contains nice typographic ascent/descent information.
This commit is contained in:
parent
3b1e05f714
commit
e984200206
3 changed files with 48 additions and 2 deletions
|
@ -73,7 +73,7 @@ private:
|
|||
|
||||
static Result<NonnullRefPtr<Font>, String> try_load_from_offset(ReadonlyBytes, unsigned index = 0);
|
||||
|
||||
Font(ReadonlyBytes bytes, Head&& head, Name&& name, Hhea&& hhea, Maxp&& maxp, Hmtx&& hmtx, Cmap&& cmap, Loca&& loca, Glyf&& glyf)
|
||||
Font(ReadonlyBytes bytes, Head&& head, Name&& name, Hhea&& hhea, Maxp&& maxp, Hmtx&& hmtx, Cmap&& cmap, Loca&& loca, Glyf&& glyf, OS2&& os2)
|
||||
: m_buffer(move(bytes))
|
||||
, m_head(move(head))
|
||||
, m_name(move(name))
|
||||
|
@ -83,6 +83,7 @@ private:
|
|||
, m_loca(move(loca))
|
||||
, m_glyf(move(glyf))
|
||||
, m_cmap(move(cmap))
|
||||
, m_os2(move(os2))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -99,6 +100,7 @@ private:
|
|||
Loca m_loca;
|
||||
Glyf m_glyf;
|
||||
Cmap m_cmap;
|
||||
OS2 m_os2;
|
||||
};
|
||||
|
||||
class ScaledFont : public Gfx::Font {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue