diff options
-rw-r--r-- | base/gstext.c | 20 | ||||
-rw-r--r-- | base/gxchar.c | 11 |
2 files changed, 20 insertions, 11 deletions
diff --git a/base/gstext.c b/base/gstext.c index 32e486624..fb069238d 100644 --- a/base/gstext.c +++ b/base/gstext.c | |||
@@ -149,6 +149,9 @@ gx_device_text_begin(gx_device * dev, gs_gstate * pgs, | |||
149 | static int | 149 | static int |
150 | gs_text_enum_init_dynamic(gs_text_enum_t *pte, gs_font *font) | 150 | gs_text_enum_init_dynamic(gs_text_enum_t *pte, gs_font *font) |
151 | { | 151 | { |
152 | uint operation = pte->text.operation; | ||
153 | bool propagate_charpath = (operation & TEXT_DO_DRAW) != 0; | ||
154 | |||
152 | pte->current_font = font; | 155 | pte->current_font = font; |
153 | pte->index = 0; | 156 | pte->index = 0; |
154 | pte->xy_index = 0; | 157 | pte->xy_index = 0; |
@@ -158,6 +161,23 @@ gs_text_enum_init_dynamic(gs_text_enum_t *pte, gs_font *font) | |||
158 | pte->outer_CID = GS_NO_GLYPH; | 161 | pte->outer_CID = GS_NO_GLYPH; |
159 | pte->single_byte_space = false; | 162 | pte->single_byte_space = false; |
160 | pte->cc = NULL; | 163 | pte->cc = NULL; |
164 | |||
165 | /* We need to set the charpath_flag, as the PCL interpreter calls the | ||
166 | * graphics lib to do some measurement operations, which relies on the | ||
167 | * charpath_flag. See bug 700577 for more details. */ | ||
168 | if (operation & TEXT_DO_ANY_CHARPATH) | ||
169 | pte->charpath_flag = | ||
170 | (operation & TEXT_DO_FALSE_CHARPATH ? cpm_false_charpath : | ||
171 | operation & TEXT_DO_TRUE_CHARPATH ? cpm_true_charpath : | ||
172 | operation & TEXT_DO_FALSE_CHARBOXPATH ? cpm_false_charboxpath : | ||
173 | operation & TEXT_DO_TRUE_CHARBOXPATH ? cpm_true_charboxpath : | ||
174 | operation & TEXT_DO_CHARWIDTH ? cpm_charwidth : | ||
175 | cpm_show /* can't happen */ ); | ||
176 | else | ||
177 | pte->charpath_flag = | ||
178 | (propagate_charpath ? (pte->pgs ? pte->pgs->in_charpath : 0) : cpm_show); | ||
179 | pte->is_pure_color = pte->pgs ? gs_color_writes_pure(pte->pgs) : 0; | ||
180 | |||
161 | return font->procs.init_fstack(pte, font); | 181 | return font->procs.init_fstack(pte, font); |
162 | } | 182 | } |
163 | int | 183 | int |
diff --git a/base/gxchar.c b/base/gxchar.c index 029127c3d..4acf09cdc 100644 --- a/base/gxchar.c +++ b/base/gxchar.c | |||
@@ -141,17 +141,6 @@ gx_default_text_begin(gx_device * dev, gs_gstate * pgs1, | |||
141 | } | 141 | } |
142 | penum->auto_release = false; /* new API */ | 142 | penum->auto_release = false; /* new API */ |
143 | penum->level = pgs->level; | 143 | penum->level = pgs->level; |
144 | if (operation & TEXT_DO_ANY_CHARPATH) | ||
145 | penum->charpath_flag = | ||
146 | (operation & TEXT_DO_FALSE_CHARPATH ? cpm_false_charpath : | ||
147 | operation & TEXT_DO_TRUE_CHARPATH ? cpm_true_charpath : | ||
148 | operation & TEXT_DO_FALSE_CHARBOXPATH ? cpm_false_charboxpath : | ||
149 | operation & TEXT_DO_TRUE_CHARBOXPATH ? cpm_true_charboxpath : | ||
150 | operation & TEXT_DO_CHARWIDTH ? cpm_charwidth : | ||
151 | cpm_show /* can't happen */ ); | ||
152 | else | ||
153 | penum->charpath_flag = | ||
154 | (propagate_charpath ? pgs->in_charpath : cpm_show); | ||
155 | penum->cc = 0; | 144 | penum->cc = 0; |
156 | penum->continue_proc = continue_show; | 145 | penum->continue_proc = continue_show; |
157 | switch (penum->charpath_flag) { | 146 | switch (penum->charpath_flag) { |