mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:37:35 +00:00
LibPDF: Make SimpleFont font matrix configurable
Type 3 fonts can set it to a custom value.
This commit is contained in:
parent
4cd1a2d319
commit
9632d8ee49
2 changed files with 9 additions and 2 deletions
|
@ -22,11 +22,18 @@ protected:
|
|||
RefPtr<Encoding>& encoding() { return m_encoding; }
|
||||
RefPtr<Encoding> const& encoding() const { return m_encoding; }
|
||||
|
||||
Gfx::AffineTransform& font_matrix() { return m_font_matrix; }
|
||||
|
||||
private:
|
||||
RefPtr<Encoding> m_encoding;
|
||||
RefPtr<StreamObject> m_to_unicode;
|
||||
HashMap<u8, u16> m_widths;
|
||||
u16 m_missing_width { 0 };
|
||||
|
||||
// "For all font types except Type 3, the units of glyph space are one-thousandth of a unit of text space;
|
||||
// for a Type 3 font, the transformation from glyph space to text space is defined by a font matrix specified
|
||||
// in an explicit FontMatrix entry in the font."
|
||||
Gfx::AffineTransform m_font_matrix { 1.0f / 1000.0f, 0, 0, 1.0f / 1000.0f, 0, 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue