mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
Fix PS glyph positioning bug in PDF operator emulation
The emulation of the PDF 'TJ' operator in the PS prolog was incorrectly updating the glyph position between strings. The glyph position values are a negative x offset that are in 1/1000 unit of text space. We were incorrectly multiplying the number by -0.0001 instead of -0.001. We also need to transform this to device space before calling rmoveto.
This commit is contained in:
parent
8348668452
commit
13e05bffd5
1 changed files with 3 additions and 2 deletions
|
|
@ -180,11 +180,12 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface)
|
|||
" {\n"
|
||||
" dup\n"
|
||||
" type /stringtype eq\n"
|
||||
" { show } { -0.0001 mul 0 rmoveto } ifelse\n"
|
||||
" { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse\n"
|
||||
" } forall\n"
|
||||
"} bind def\n"
|
||||
"/Td { moveto } bind def\n"
|
||||
"/Tm { 6 array astore cairo_font exch selectfont 0 0 moveto } bind def\n"
|
||||
"/Tm { 6 array astore dup /cairo_font_matrix exch def\n"
|
||||
" cairo_font exch selectfont 0 0 moveto } bind def\n"
|
||||
"/g { setgray } bind def\n"
|
||||
"/rg { setrgbcolor } bind def\n");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue