w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cidgload.c
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * cidgload.c
4  *
5  * CID-keyed Type1 Glyph Loader (body).
6  *
7  * Copyright (C) 1996-2020 by
8  * David Turner, Robert Wilhelm, and Werner Lemberg.
9  *
10  * This file is part of the FreeType project, and may only be used,
11  * modified, and distributed under the terms of the FreeType project
12  * license, LICENSE.TXT. By continuing to use, modify, or distribute
13  * this file you indicate that you have read the license and
14  * understand and accept it fully.
15  *
16  */
17 
18 
19 #include "cidload.h"
20 #include "cidgload.h"
21 #include <freetype/internal/ftdebug.h>
22 #include <freetype/internal/ftstream.h>
23 #include <freetype/ftoutln.h>
24 #include <freetype/internal/ftcalc.h>
25 
26 #include <freetype/internal/psaux.h>
27 #include <freetype/internal/cfftypes.h>
28 #include <freetype/ftdriver.h>
29 
30 #include "ciderrs.h"
31 
32 
33  /**************************************************************************
34  *
35  * The macro FT_COMPONENT is used in trace mode. It is an implicit
36  * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
37  * messages during execution.
38  */
39 #undef FT_COMPONENT
40 #define FT_COMPONENT cidgload
41 
42 
46  {
47  CID_Face face = (CID_Face)decoder->builder.face;
48  CID_FaceInfo cid = &face->cid;
49  FT_Byte* p;
50  FT_ULong fd_select;
51  FT_Stream stream = face->cid_stream;
53  FT_Byte* charstring = NULL;
54  FT_Memory memory = face->root.memory;
56  PSAux_Service psaux = (PSAux_Service)face->psaux;
57 
58  FT_Bool force_scaling = FALSE;
59 
60 #ifdef FT_CONFIG_OPTION_INCREMENTAL
62  face->root.internal->incremental_interface;
63 #endif
64 
65 
66  FT_TRACE1(( "cid_load_glyph: glyph index %d\n", glyph_index ));
67 
68 #ifdef FT_CONFIG_OPTION_INCREMENTAL
69 
70  /* For incremental fonts get the character data using */
71  /* the callback function. */
72  if ( inc )
73  {
74  FT_Data glyph_data;
75 
76 
77  error = inc->funcs->get_glyph_data( inc->object,
78  glyph_index, &glyph_data );
79  if ( error )
80  goto Exit;
81 
82  p = (FT_Byte*)glyph_data.pointer;
83  fd_select = cid_get_offset( &p, (FT_Byte)cid->fd_bytes );
84 
85  if ( glyph_data.length != 0 )
86  {
87  glyph_length = (FT_ULong)( glyph_data.length - cid->fd_bytes );
88  (void)FT_ALLOC( charstring, glyph_length );
89  if ( !error )
90  ft_memcpy( charstring, glyph_data.pointer + cid->fd_bytes,
91  glyph_length );
92  }
93 
94  inc->funcs->free_glyph_data( inc->object, &glyph_data );
95 
96  if ( error )
97  goto Exit;
98  }
99 
100  else
101 
102 #endif /* FT_CONFIG_OPTION_INCREMENTAL */
103 
104  /* For ordinary fonts read the CID font dictionary index */
105  /* and charstring offset from the CIDMap. */
106  {
107  FT_UInt entry_len = (FT_UInt)( cid->fd_bytes + cid->gd_bytes );
108  FT_ULong off1, off2;
109 
110 
111  if ( FT_STREAM_SEEK( cid->data_offset + cid->cidmap_offset +
112  glyph_index * entry_len ) ||
113  FT_FRAME_ENTER( 2 * entry_len ) )
114  goto Exit;
115 
116  p = (FT_Byte*)stream->cursor;
117  fd_select = cid_get_offset( &p, (FT_Byte)cid->fd_bytes );
118  off1 = cid_get_offset( &p, (FT_Byte)cid->gd_bytes );
119  p += cid->fd_bytes;
120  off2 = cid_get_offset( &p, (FT_Byte)cid->gd_bytes );
121  FT_FRAME_EXIT();
122 
123  if ( fd_select >= (FT_ULong)cid->num_dicts ||
124  off2 > stream->size ||
125  off1 > off2 )
126  {
127  FT_TRACE0(( "cid_load_glyph: invalid glyph stream offsets\n" ));
128  error = FT_THROW( Invalid_Offset );
129  goto Exit;
130  }
131 
132  glyph_length = off2 - off1;
133  if ( glyph_length == 0 )
134  goto Exit;
135  if ( FT_ALLOC( charstring, glyph_length ) )
136  goto Exit;
137  if ( FT_STREAM_READ_AT( cid->data_offset + off1,
138  charstring, glyph_length ) )
139  goto Exit;
140  }
141 
142  /* Now set up the subrs array and parse the charstrings. */
143  {
144  CID_FaceDict dict;
145  CID_Subrs cid_subrs = face->subrs + fd_select;
146  FT_UInt cs_offset;
147 
148 
149  /* Set up subrs */
150  decoder->num_subrs = cid_subrs->num_subrs;
151  decoder->subrs = cid_subrs->code;
152  decoder->subrs_len = 0;
153  decoder->subrs_hash = NULL;
154 
155  /* Set up font matrix */
156  dict = cid->font_dicts + fd_select;
157 
158  decoder->font_matrix = dict->font_matrix;
159  decoder->font_offset = dict->font_offset;
160  decoder->lenIV = dict->private_dict.lenIV;
161 
162  /* Decode the charstring. */
163 
164  /* Adjustment for seed bytes. */
165  cs_offset = decoder->lenIV >= 0 ? (FT_UInt)decoder->lenIV : 0;
166  if ( cs_offset > glyph_length )
167  {
168  FT_TRACE0(( "cid_load_glyph: invalid glyph stream offsets\n" ));
169  error = FT_THROW( Invalid_Offset );
170  goto Exit;
171  }
172 
173  /* Decrypt only if lenIV >= 0. */
174  if ( decoder->lenIV >= 0 )
175  psaux->t1_decrypt( charstring, glyph_length, 4330 );
176 
177  /* choose which renderer to use */
178 #ifdef T1_CONFIG_OPTION_OLD_ENGINE
179  if ( ( (PS_Driver)FT_FACE_DRIVER( face ) )->hinting_engine ==
181  decoder->builder.metrics_only )
182  error = psaux->t1_decoder_funcs->parse_charstrings_old(
183  decoder,
184  charstring + cs_offset,
185  glyph_length - cs_offset );
186 #else
187  if ( decoder->builder.metrics_only )
188  error = psaux->t1_decoder_funcs->parse_metrics(
189  decoder,
190  charstring + cs_offset,
191  glyph_length - cs_offset );
192 #endif
193  else
194  {
195  PS_Decoder psdecoder;
197 
198 
199  psaux->ps_decoder_init( &psdecoder, decoder, TRUE );
200 
201  psaux->t1_make_subfont( FT_FACE( face ),
202  &dict->private_dict,
203  &subfont );
204  psdecoder.current_subfont = &subfont;
205 
206  error = psaux->t1_decoder_funcs->parse_charstrings(
207  &psdecoder,
208  charstring + cs_offset,
209  glyph_length - cs_offset );
210 
211  /* Adobe's engine uses 16.16 numbers everywhere; */
212  /* as a consequence, glyphs larger than 2000ppem get rejected */
213  if ( FT_ERR_EQ( error, Glyph_Too_Big ) )
214  {
215  /* this time, we retry unhinted and scale up the glyph later on */
216  /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */
217  /* 0x400 for both `x_scale' and `y_scale' in this case) */
218  ((CID_GlyphSlot)decoder->builder.glyph)->hint = FALSE;
219 
220  force_scaling = TRUE;
221 
222  error = psaux->t1_decoder_funcs->parse_charstrings(
223  &psdecoder,
224  charstring + cs_offset,
225  glyph_length - cs_offset );
226  }
227  }
228  }
229 
230 #ifdef FT_CONFIG_OPTION_INCREMENTAL
231 
232  /* Incremental fonts can optionally override the metrics. */
233  if ( !error && inc && inc->funcs->get_glyph_metrics )
234  {
236 
237 
238  metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x );
239  metrics.bearing_y = 0;
240  metrics.advance = FIXED_TO_INT( decoder->builder.advance.x );
241  metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y );
242 
243  error = inc->funcs->get_glyph_metrics( inc->object,
245 
246  decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x );
247  decoder->builder.advance.x = INT_TO_FIXED( metrics.advance );
248  decoder->builder.advance.y = INT_TO_FIXED( metrics.advance_v );
249  }
250 
251 #endif /* FT_CONFIG_OPTION_INCREMENTAL */
252 
253  Exit:
254  FT_FREE( charstring );
255 
256  ((CID_GlyphSlot)decoder->builder.glyph)->scaled = force_scaling;
257 
258  return error;
259  }
260 
261 
262 #if 0
263 
264 
265  /*************************************************************************/
266  /*************************************************************************/
267  /*************************************************************************/
268  /********** *********/
269  /********** *********/
270  /********** COMPUTE THE MAXIMUM ADVANCE WIDTH *********/
271  /********** *********/
272  /********** The following code is in charge of computing *********/
273  /********** the maximum advance width of the font. It *********/
274  /********** quickly processes each glyph charstring to *********/
275  /********** extract the value from either a `sbw' or `seac' *********/
276  /********** operator. *********/
277  /********** *********/
278  /*************************************************************************/
279  /*************************************************************************/
280  /*************************************************************************/
281 
282 
284  cid_face_compute_max_advance( CID_Face face,
285  FT_Int* max_advance )
286  {
287  FT_Error error;
288  T1_DecoderRec decoder;
290 
291  PSAux_Service psaux = (PSAux_Service)face->psaux;
292 
293 
294  *max_advance = 0;
295 
296  /* Initialize load decoder */
297  error = psaux->t1_decoder_funcs->init( &decoder,
298  (FT_Face)face,
299  0, /* size */
300  0, /* glyph slot */
301  0, /* glyph names! XXX */
302  0, /* blend == 0 */
303  0, /* hinting == 0 */
304  cid_load_glyph );
305  if ( error )
306  return error;
307 
308  /* TODO: initialize decoder.len_buildchar and decoder.buildchar */
309  /* if we ever support CID-keyed multiple master fonts */
310 
311  decoder.builder.metrics_only = 1;
312  decoder.builder.load_points = 0;
313 
314  /* for each glyph, parse the glyph charstring and extract */
315  /* the advance width */
316  for ( glyph_index = 0; glyph_index < face->root.num_glyphs;
317  glyph_index++ )
318  {
319  /* now get load the unscaled outline */
320  error = cid_load_glyph( &decoder, glyph_index );
321  /* ignore the error if one occurred - skip to next glyph */
322  }
323 
324  *max_advance = FIXED_TO_INT( decoder.builder.advance.x );
325 
326  psaux->t1_decoder_funcs->done( &decoder );
327 
328  return FT_Err_Ok;
329  }
330 
331 
332 #endif /* 0 */
333 
334 
336  cid_slot_load_glyph( FT_GlyphSlot cidglyph, /* CID_GlyphSlot */
337  FT_Size cidsize, /* CID_Size */
339  FT_Int32 load_flags )
340  {
341  CID_GlyphSlot glyph = (CID_GlyphSlot)cidglyph;
342  FT_Error error;
343  T1_DecoderRec decoder;
344  CID_Face face = (CID_Face)cidglyph->face;
345  FT_Bool hinting;
346  FT_Bool scaled;
347 
348  PSAux_Service psaux = (PSAux_Service)face->psaux;
349  FT_Matrix font_matrix;
350  FT_Vector font_offset;
351  FT_Bool must_finish_decoder = FALSE;
352 
353 
354  if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
355  {
356  error = FT_THROW( Invalid_Argument );
357  goto Exit;
358  }
359 
360  if ( load_flags & FT_LOAD_NO_RECURSE )
361  load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
362 
363  glyph->x_scale = cidsize->metrics.x_scale;
364  glyph->y_scale = cidsize->metrics.y_scale;
365 
366  cidglyph->outline.n_points = 0;
367  cidglyph->outline.n_contours = 0;
368 
369  hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
370  ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
371  scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 );
372 
373  glyph->hint = hinting;
374  glyph->scaled = scaled;
375  cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;
376 
377  error = psaux->t1_decoder_funcs->init( &decoder,
378  cidglyph->face,
379  cidsize,
380  cidglyph,
381  0, /* glyph names -- XXX */
382  0, /* blend == 0 */
383  hinting,
384  FT_LOAD_TARGET_MODE( load_flags ),
385  cid_load_glyph );
386  if ( error )
387  goto Exit;
388 
389  /* TODO: initialize decoder.len_buildchar and decoder.buildchar */
390  /* if we ever support CID-keyed multiple master fonts */
391 
392  must_finish_decoder = TRUE;
393 
394  /* set up the decoder */
395  decoder.builder.no_recurse = FT_BOOL( load_flags & FT_LOAD_NO_RECURSE );
396 
397  error = cid_load_glyph( &decoder, glyph_index );
398  if ( error )
399  goto Exit;
400 
401  /* copy flags back for forced scaling */
402  hinting = glyph->hint;
403  scaled = glyph->scaled;
404 
405  font_matrix = decoder.font_matrix;
406  font_offset = decoder.font_offset;
407 
408  /* save new glyph tables */
409  psaux->t1_decoder_funcs->done( &decoder );
410 
411  must_finish_decoder = FALSE;
412 
413  /* now set the metrics -- this is rather simple, as */
414  /* the left side bearing is the xMin, and the top side */
415  /* bearing the yMax */
416  cidglyph->outline.flags &= FT_OUTLINE_OWNER;
417  cidglyph->outline.flags |= FT_OUTLINE_REVERSE_FILL;
418 
419  /* for composite glyphs, return only left side bearing and */
420  /* advance width */
421  if ( load_flags & FT_LOAD_NO_RECURSE )
422  {
423  FT_Slot_Internal internal = cidglyph->internal;
424 
425 
426  cidglyph->metrics.horiBearingX =
427  FIXED_TO_INT( decoder.builder.left_bearing.x );
428  cidglyph->metrics.horiAdvance =
429  FIXED_TO_INT( decoder.builder.advance.x );
430 
431  internal->glyph_matrix = font_matrix;
432  internal->glyph_delta = font_offset;
433  internal->glyph_transformed = 1;
434  }
435  else
436  {
437  FT_BBox cbox;
438  FT_Glyph_Metrics* metrics = &cidglyph->metrics;
439 
440 
441  /* copy the _unscaled_ advance width */
442  metrics->horiAdvance =
443  FIXED_TO_INT( decoder.builder.advance.x );
444  cidglyph->linearHoriAdvance =
445  FIXED_TO_INT( decoder.builder.advance.x );
446  cidglyph->internal->glyph_transformed = 0;
447 
448  /* make up vertical ones */
449  metrics->vertAdvance = ( face->cid.font_bbox.yMax -
450  face->cid.font_bbox.yMin ) >> 16;
451  cidglyph->linearVertAdvance = metrics->vertAdvance;
452 
453  cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;
454 
455  if ( cidsize->metrics.y_ppem < 24 )
456  cidglyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
457 
458  /* apply the font matrix, if any */
459  if ( font_matrix.xx != 0x10000L || font_matrix.yy != 0x10000L ||
460  font_matrix.xy != 0 || font_matrix.yx != 0 )
461  {
462  FT_Outline_Transform( &cidglyph->outline, &font_matrix );
463 
464  metrics->horiAdvance = FT_MulFix( metrics->horiAdvance,
465  font_matrix.xx );
466  metrics->vertAdvance = FT_MulFix( metrics->vertAdvance,
467  font_matrix.yy );
468  }
469 
470  if ( font_offset.x || font_offset.y )
471  {
472  FT_Outline_Translate( &cidglyph->outline,
473  font_offset.x,
474  font_offset.y );
475 
476  metrics->horiAdvance += font_offset.x;
477  metrics->vertAdvance += font_offset.y;
478  }
479 
480  if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 || scaled )
481  {
482  /* scale the outline and the metrics */
483  FT_Int n;
484  FT_Outline* cur = decoder.builder.base;
485  FT_Vector* vec = cur->points;
486  FT_Fixed x_scale = glyph->x_scale;
487  FT_Fixed y_scale = glyph->y_scale;
488 
489 
490  /* First of all, scale the points */
491  if ( !hinting || !decoder.builder.hints_funcs )
492  for ( n = cur->n_points; n > 0; n--, vec++ )
493  {
494  vec->x = FT_MulFix( vec->x, x_scale );
495  vec->y = FT_MulFix( vec->y, y_scale );
496  }
497 
498  /* Then scale the metrics */
499  metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );
500  metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale );
501  }
502 
503  /* compute the other metrics */
504  FT_Outline_Get_CBox( &cidglyph->outline, &cbox );
505 
506  metrics->width = cbox.xMax - cbox.xMin;
507  metrics->height = cbox.yMax - cbox.yMin;
508 
509  metrics->horiBearingX = cbox.xMin;
510  metrics->horiBearingY = cbox.yMax;
511 
512  if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
513  {
514  /* make up vertical ones */
516  metrics->vertAdvance );
517  }
518  }
519 
520  Exit:
521 
522  if ( must_finish_decoder )
523  psaux->t1_decoder_funcs->done( &decoder );
524 
525  return error;
526  }
527 
528 
529 /* END */
static point_t cur
Definition: backend_eps.c:108
off1
Definition: bmpfont.h:210
off2
Definition: bmpfont.h:210
#define n
Definition: t4ht.c:1290
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
#define error(a)
Definition: dviinfo.c:48
static unsigned int glyph_length(char **glyphs)
Definition: ttf.c:471
void Exit(int code)
Definition: dvispc.c:374
static void
Definition: fpif.c:118
double y_scale
Definition: hbf2gf.c:275
#define ft_memcpy
Definition: ftstdlib.h:82
#define FT_LOAD_VERTICAL_LAYOUT
Definition: freetype.h:3026
#define FT_LOAD_TARGET_MODE(x)
Definition: freetype.h:3154
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3022
#define FT_LOAD_NO_RECURSE
Definition: freetype.h:3031
#define FT_LOAD_NO_HINTING
Definition: freetype.h:3023
FT_MulFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:508
#define FT_HINTING_FREETYPE
Definition: ftdriver.h:343
@ FT_GLYPH_FORMAT_OUTLINE
Definition: ftimage.h:749
#define FT_OUTLINE_HIGH_PRECISION
Definition: ftimage.h:443
#define FT_OUTLINE_OWNER
Definition: ftimage.h:435
#define FT_OUTLINE_REVERSE_FILL
Definition: ftimage.h:437
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
Definition: ftoutln.c:507
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
Definition: ftoutln.c:706
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
Definition: ftoutln.c:457
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
unsigned long FT_ULong
Definition: fttypes.h:253
unsigned char FT_Byte
Definition: fttypes.h:154
#define FT_ERR_EQ(x, e)
Definition: fttypes.h:604
signed long FT_Fixed
Definition: fttypes.h:287
int FT_Error
Definition: fttypes.h:299
unsigned int FT_UInt
Definition: fttypes.h:231
#define FT_BOOL(x)
Definition: fttypes.h:591
signed int FT_Int
Definition: fttypes.h:220
#define FT_CALLBACK_DEF(x)
#define FT_LOCAL_DEF(x)
#define FIXED_TO_INT(x)
Definition: ftcalc.h:450
#define INT_TO_FIXED(x)
Definition: ftcalc.h:448
#define FT_TRACE0(varformat)
Definition: ftdebug.h:187
#define FT_THROW(e)
Definition: ftdebug.h:243
#define FT_TRACE1(varformat)
Definition: ftdebug.h:188
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:311
#define FT_FREE(ptr)
Definition: ftmemory.h:337
#define NULL
Definition: ftobjs.h:61
#define FT_FACE(x)
Definition: ftobjs.h:597
#define FT_FACE_DRIVER(x)
Definition: ftobjs.h:601
void ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
Definition: ftobjs.c:2997
#define FT_FRAME_ENTER(size)
Definition: ftstream.h:548
#define FT_STREAM_SEEK(position)
Definition: ftstream.h:525
#define FT_FRAME_EXIT()
Definition: ftstream.h:553
#define FT_STREAM_READ_AT(position, buffer, count)
Definition: ftstream.h:538
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
struct PSAux_ServiceRec_ * PSAux_Service
struct CID_FaceRec_ * CID_Face
Definition: t1types.h:199
small capitals from c petite p
Definition: afcover.h:72
FT_Vector * vec
Definition: ftbbox.c:469
return FT_Err_Ok
Definition: ftbbox.c:526
FT_Face face
Definition: cffdrivr.c:659
cid_slot_load_glyph(FT_GlyphSlot cidglyph, FT_Size cidsize, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: cidgload.c:336
cid_load_glyph(T1_Decoder decoder, FT_UInt glyph_index)
Definition: cidgload.c:44
cid_get_offset(FT_Byte **start, FT_Byte offsize)
Definition: cidload.c:43
struct CID_GlyphSlotRec_ * CID_GlyphSlot
Definition: cidobjs.h:67
#define scaled
Definition: pdftypes.h:88
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
struct stream_s stream
Definition: pts_fax.h:93
#define glyph_index()
PS_PrivateRec private_dict
Definition: t1tables.h:349
FT_Matrix font_matrix
Definition: t1tables.h:358
FT_Vector font_offset
Definition: t1tables.h:359
FT_Byte ** code
Definition: t1types.h:135
FT_Int num_subrs
Definition: t1types.h:134
FT_Pos xMin
Definition: ftimage.h:120
FT_Pos yMax
Definition: ftimage.h:121
FT_Pos yMin
Definition: ftimage.h:120
FT_Pos xMax
Definition: ftimage.h:121
const FT_Byte * pointer
Definition: fttypes.h:415
FT_Int length
Definition: fttypes.h:416
FT_Long num_glyphs
Definition: freetype.h:1036
FT_Face_Internal internal
Definition: freetype.h:1080
FT_Memory memory
Definition: freetype.h:1072
FT_Incremental_FreeGlyphDataFunc free_glyph_data
Definition: ftincrem.h:273
FT_Incremental_GetGlyphDataFunc get_glyph_data
Definition: ftincrem.h:272
FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics
Definition: ftincrem.h:274
const FT_Incremental_FuncsRec * funcs
Definition: ftincrem.h:317
FT_Fixed xx
Definition: fttypes.h:392
FT_Fixed yx
Definition: fttypes.h:393
FT_Fixed yy
Definition: fttypes.h:393
FT_Fixed xy
Definition: fttypes.h:392
FT_Pos x
Definition: ftimage.h:77
FT_Pos y
Definition: ftimage.h:78
const T1_Decoder_FuncsRec * t1_decoder_funcs
Definition: psaux.h:1350
CFF_SubFont current_subfont
Definition: psaux.h:645
FT_Int lenIV
Definition: t1tables.h:139
FT_Bool no_recurse
Definition: psaux.h:845
FT_Vector advance
Definition: psaux.h:840
void * hints_funcs
Definition: psaux.h:849
FT_Vector left_bearing
Definition: psaux.h:839
FT_Bool metrics_only
Definition: psaux.h:847
FT_Bool load_points
Definition: psaux.h:844
FT_Outline * base
Definition: psaux.h:833
FT_Matrix font_matrix
Definition: psaux.h:960
T1_BuilderRec builder
Definition: psaux.h:942
FT_Vector font_offset
Definition: psaux.h:961
FT_Error(* init)(T1_Decoder decoder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Byte **glyph_names, PS_Blend blend, FT_Bool hinting, FT_Render_Mode hint_mode, T1_Decoder_Callback callback)
Definition: psaux.h:906
void(* done)(T1_Decoder decoder)
Definition: psaux.h:917
Definition: pbmfont.h:4
long long scaled
Definition: vf_ng.c:93