mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
LibPDF: Fix text positioning with operator TJ
As per spec, the positioning (or kerning) parameter of this operator should translate the text matrix before the next showing of text. Previously, this calculation was slightly wrong and also only applied after the text was already shown.
This commit is contained in:
parent
563d91b6c4
commit
97ed4106e5
2 changed files with 6 additions and 5 deletions
|
@ -98,8 +98,7 @@ private:
|
|||
PDFErrorOr<void> handle_text_next_line_show_string_set_spacing(Vector<Value> const& args);
|
||||
|
||||
PDFErrorOr<void> set_graphics_state_from_dict(NonnullRefPtr<DictObject>);
|
||||
// shift is the manual advance given in the TJ operator array
|
||||
void show_text(String const&, float shift = 0.0f);
|
||||
void show_text(String const&);
|
||||
PDFErrorOr<NonnullRefPtr<ColorSpace>> get_color_space(Value const&);
|
||||
|
||||
ALWAYS_INLINE GraphicsState const& state() const { return m_graphics_state_stack.last(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue