| 1 |
/* Copyright (C) 2018-2023 Artifex Software, Inc. |
| 2 |
All Rights Reserved. |
| 3 |
|
| 4 |
This software is provided AS-IS with no warranty, either express or |
| 5 |
implied. |
| 6 |
|
| 7 |
This software is distributed under license and may not be copied, |
| 8 |
modified or distributed except as expressly authorized under the terms |
| 9 |
of the license contained in the file LICENSE in this distribution. |
| 10 |
|
| 11 |
Refer to licensing information at http://www.artifex.com or contact |
| 12 |
Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco, |
| 13 |
CA 94129, USA, for further information. |
| 14 |
*/ |
| 15 |
|
| 16 |
/* Text operations for the PDF interpreter */ |
| 17 |
|
| 18 |
#ifndef PDF_TEXT_OPERATORS |
| 19 |
#define PDF_TEXT_OPERATORS |
| 20 |
|
| 21 |
typedef struct pdf_text_tracking_s |
| 22 |
{ |
| 23 |
int text_block_depth; |
| 24 |
gs_matrix initial_CTM; |
| 25 |
gs_matrix saved_Tm; |
| 26 |
gs_matrix saved_Tl; |
| 27 |
int initial_gsave_depth; |
| 28 |
void *next_block; |
| 29 |
} pdf_text_tracking; |
| 30 |
|
| 31 |
int pdfi_BT(pdf_context *ctx); |
| 32 |
int pdfi_ET(pdf_context *ctx); |
| 33 |
int pdfi_T_star(pdf_context *ctx); |
| 34 |
int pdfi_Tc(pdf_context *ctx); |
| 35 |
int pdfi_Td(pdf_context *ctx); |
| 36 |
int pdfi_TD(pdf_context *ctx); |
| 37 |
int pdfi_Tj(pdf_context *ctx); |
| 38 |
int pdfi_TJ(pdf_context *ctx); |
| 39 |
int pdfi_TL(pdf_context *ctx); |
| 40 |
int pdfi_Tm(pdf_context *ctx); |
| 41 |
int pdfi_Tr(pdf_context *ctx); |
| 42 |
int pdfi_Ts(pdf_context *ctx); |
| 43 |
int pdfi_Tw(pdf_context *ctx); |
| 44 |
int pdfi_Tz(pdf_context *ctx); |
| 45 |
int pdfi_backslash(pdf_context *ctx); |
| 46 |
int pdfi_singlequote(pdf_context *ctx); |
| 47 |
int pdfi_doublequote(pdf_context *ctx); |
| 48 |
|
| 49 |
/* Returns the bounding box of a string drawn with the current graphics state. |
| 50 |
Stroking implies a slightly larger bounding box - the parameter is ignored |
| 51 |
for Type 3 fonts. Also returns the accumlated "advance width" of all the glyphs |
| 52 |
in the string. |
| 53 |
This can be an expensive operation, so should be used sparingly, with care. |
| 54 |
NOTE: the bounding box this generates has llx and lly at 0,0, |
| 55 |
so is arguably not a "real" bounding box |
| 56 |
*/ |
| 57 |
int pdfi_string_bbox(pdf_context *ctx, pdf_string *s, gs_rect *bboxout, gs_point *advance_width, bool for_stroke); |
| 58 |
|
| 59 |
#endif |