mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-03 03:07:58 +02:00
PS: Remember position when changing font
Previously the PS emulation of the PDF operators would change the current position to the text line matrix instead of the the text matrix when changing the font.
This commit is contained in:
parent
1c729f85ed
commit
0f748df670
1 changed files with 10 additions and 8 deletions
|
|
@ -180,23 +180,25 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface)
|
|||
" /cleartomark load def end } ifelse\n"
|
||||
"/BDC { mark 3 1 roll /BDC pdfmark } bind def\n"
|
||||
"/EMC { mark /EMC pdfmark } bind def\n"
|
||||
"/Tj { show } bind def\n"
|
||||
"/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def\n"
|
||||
"/Tj { show currentpoint cairo_store_point } bind def\n"
|
||||
"/TJ {\n"
|
||||
" {\n"
|
||||
" dup\n"
|
||||
" type /stringtype eq\n"
|
||||
" { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse\n"
|
||||
" } forall\n"
|
||||
" currentpoint cairo_store_point\n"
|
||||
"} bind def\n"
|
||||
"/cairo_selectfont { cairo_font_matrix aload pop 6 2 roll\n"
|
||||
" 0 0 6 array astore cairo_font exch selectfont moveto } bind def\n"
|
||||
"/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore\n"
|
||||
" cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def\n"
|
||||
"/Tf { pop /cairo_font exch def /cairo_font_matrix where\n"
|
||||
" { cairo_selectfont } if } bind def\n"
|
||||
"/Td { matrix translate cairo_font_matrix matrix concatmatrix\n"
|
||||
" /cairo_font_matrix exch def /cairo_font where\n"
|
||||
" { cairo_selectfont } if } bind def\n"
|
||||
"/Tm { 6 array astore /cairo_font_matrix exch def /cairo_font where\n"
|
||||
" { cairo_selectfont } if } bind def\n"
|
||||
"/Td { matrix translate cairo_font_matrix matrix concatmatrix dup\n"
|
||||
" /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point\n"
|
||||
" /cairo_font where { cairo_selectfont } if } bind def\n"
|
||||
"/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def\n"
|
||||
" cairo_store_point /cairo_font where { cairo_selectfont } if } bind def\n"
|
||||
"/g { setgray } bind def\n"
|
||||
"/rg { setrgbcolor } bind def\n"
|
||||
"/d1 { setcachedevice } bind def\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue