vendor/swftools/lib/pdf/CharOutputDev.cc
GBool CharOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode charid, Unicode *u, int uLen)
{
    msg("<debug> beginType3Char %d u=%d", charid, uLen?u[0]:0);
    type3active = 1;
    
    if(config_extrafontdata) {

	FontInfo*current_fontinfo = info->getFontInfo(state);
	if(!current_fontinfo) {
	    msg("<error> Couldn't find font info");
	    return gFalse;
	}
	gfxfont_t*current_gfxfont = current_fontinfo->getGfxFont();

	/*m.m00*=INTERNAL_FONT_SIZE;
	m.m01*=INTERNAL_FONT_SIZE;
	m.m10*=INTERNAL_FONT_SIZE;
	m.m11*=INTERNAL_FONT_SIZE;*/

	if(!current_fontinfo || (unsigned)charid >= current_fontinfo->num_glyphs || !current_fontinfo->glyphs[charid]) {
	    msg("<error> Invalid type3 charid %d for font %p", charid, current_fontinfo);
	    return gFalse;
	}
	gfxcolor_t col={0,0,0,0};
	CharCode glyphid = current_fontinfo->glyphs[charid]->glyphid;
	gfxmatrix_t m = current_fontinfo->get_gfxmatrix(state);
	this->transformXY(state, 0, 0, &m.tx, &m.ty);
	device->drawchar(device, current_gfxfont, glyphid, &col, &m);
    }


    /* the character itself is going to be passed using the draw functions */
    return gFalse; /* gTrue= is_in_cache? */
}
/* the logic seems to be as following:
   first, beginType3Char is called, with the charcode and the coordinates.
   if this function returns true, it already knew about the char and has now drawn it.
   if the function returns false, it's a new char, and type3D0 and/or type3D1 might be 
   called with some parameters.
   Afterwards, all draw operations until endType3Char are part of the char (which in this moment is
   at the position first passed to beginType3Char). the char ends with endType3Char.

   The drawing operations between beginType3Char and endType3Char are somewhat different to
   the normal ones. For example, the fillcolor equals the stroke color. (Because the stroke
   color determines the color of a font)
*/
the logic seems to be as following:
first, beginType3Char is called, with the charcode and the coordinates.
if this function returns true, it already knew about the char and has now drawn it.
if the function returns false, it's a new char, and type3D0 and/or type3D1 might be
called with some parameters.
Afterwards, all draw operations until endType3Char are part of the char (which in this moment is
at the position first passed to beginType3Char). the char ends with endType3Char.

The drawing operations between beginType3Char and endType3Char are somewhat different to
the normal ones. For example, the fillcolor equals the stroke color. (Because the stroke
color determines the color of a font)
the logic seems to be as following : first beginType3Char is called with the charcode and the coordinates . if this function returns true it already knew about the char and has now drawn it . if the function returns false it ' s a new char and type3D0 and / or type3D1 might be called with some parameters . Afterwards all draw operations until endType3Char are part of the char ( which in this moment is at the position first passed to beginType3Char ) . the char ends with endType3Char . The drawing operations between beginType3Char and endType3Char are somewhat different to the normal ones . For example the fillcolor equals the stroke color . ( Because the stroke color determines the color of a font )
GBool CharOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode charid, Unicode *u, int uLen)
{
    msg("<debug> beginType3Char %d u=%d", charid, uLen?u[0]:0);
    type3active = 1;
    if(config_extrafontdata) {
	FontInfo*current_fontinfo = info->getFontInfo(state);
	if(!current_fontinfo) {
	    msg("<error> Couldn't find font info");
	    return gFalse;
	}
	gfxfont_t*current_gfxfont = current_fontinfo->getGfxFont();
	if(!current_fontinfo || (unsigned)charid >= current_fontinfo->num_glyphs || !current_fontinfo->glyphs[charid]) {
	    msg("<error> Invalid type3 charid %d for font %p", charid, current_fontinfo);
	    return gFalse;
	}
	gfxcolor_t col={0,0,0,0};
	CharCode glyphid = current_fontinfo->glyphs[charid]->glyphid;
	gfxmatrix_t m = current_fontinfo->get_gfxmatrix(state);
	this->transformXY(state, 0, 0, &m.tx, &m.ty);
	device->drawchar(device, current_gfxfont, glyphid, &col, &m);
    }
    return gFalse; 
}
GBool CharOutputDev :: beginType3Char ( GfxState * state , double x , double y , double dx , double dy , CharCode charid , Unicode * u , int uLen ) { msg ( " " , charid , uLen ? u [ 0 ] : 0 ) ; type3active = 1 ; if ( config_extrafontdata ) { FontInfo * current_fontinfo = info -> getFontInfo ( state ) ; if ( ! current_fontinfo ) { msg ( " " ) ; return gFalse ; } gfxfont_t * current_gfxfont = current_fontinfo -> getGfxFont ( ) ; if ( ! current_fontinfo || ( unsigned ) charid >= current_fontinfo -> num_glyphs || ! current_fontinfo -> glyphs [ charid ] ) { msg ( " " , charid , current_fontinfo ) ; return gFalse ; } gfxcolor_t col = { 0 , 0 , 0 , 0 } ; CharCode glyphid = current_fontinfo -> glyphs [ charid ] -> glyphid ; gfxmatrix_t m = current_fontinfo -> get_gfxmatrix ( state ) ; this -> transformXY ( state , 0 , 0 , & m . tx , & m . ty ) ; device -> drawchar ( device , current_gfxfont , glyphid , & col , & m ) ; } return gFalse ; }
the logic seems to be as following:
first, beginType3Char is called, with the charcode and the coordinates.
the logic seems to be as following : first beginType3Char is called with the charcode and the coordinates .
/*m.m00*=INTERNAL_FONT_SIZE;
	m.m01*=INTERNAL_FONT_SIZE;
	m.m10*=INTERNAL_FONT_SIZE;
	m.m11*=INTERNAL_FONT_SIZE;*/ /* the character itself is going to be passed using the draw functions */ /* gTrue= is_in_cache? */