XFree86/src/xfstt/RasterScale.cpp
// only needed when emUnits != 2048, but since we don't know this until
// we know the TTFont we have to separate it from setP*Size()
only needed when emUnits != 2048, but since we don't know this until
we know the TTFont we have to separate it from setP*Size()
only needed when emUnits ! = 2048 but since we don ' t know this until we know the TTFont we have to separate it from setP * Size ()
void Rasterizer::applyTransformation()
{
	int emUnits = ttFont->getEmUnits();
	dprintf1( "emUnits = %d\n", emUnits);
	for( ; emUnits > 2048 && xxexp > 0; --xxexp)
		emUnits >>= 1;
	for( ; emUnits < 2048; ++xxexp)
		emUnits <<= 1;
	if( emUnits != 2048) {
		xx = (xx << 11) / emUnits;
		xy = (xy << 11) / emUnits;
		yx = (yx << 11) / emUnits;
		yy = (yy << 11) / emUnits;
	}
	mppem = (mppemx + mppemy) >> 1;
	dprintf2( "xx = %d, xy = %d\n", xx, xy);
	dprintf2( "yx = %d, yy = %d\n", yx, yy);
	dprintf1( "exp = %d\n", xxexp);
	dprintf3( "mppem = %d, mppemx = %d, mppemy = %d\n",mppem,mppemx,mppemy);
	if( grid_fitting)
		calcCVT();
	status = TRAFO_APPLIED;
}
void Rasterizer :: applyTransformation ( ) { int emUnits = ttFont -> getEmUnits ( ) ; dprintf1 ( " \n " , emUnits ) ; for ( ; emUnits > 2048 && xxexp > 0 ; -- xxexp ) emUnits >>= 1 ; for ( ; emUnits < 2048 ; ++ xxexp ) emUnits <<= 1 ; if ( emUnits != 2048 ) { xx = ( xx << 11 ) / emUnits ; xy = ( xy << 11 ) / emUnits ; yx = ( yx << 11 ) / emUnits ; yy = ( yy << 11 ) / emUnits ; } mppem = ( mppemx + mppemy ) >> 1 ; dprintf2 ( " \n " , xx , xy ) ; dprintf2 ( " \n " , yx , yy ) ; dprintf1 ( " \n " , xxexp ) ; dprintf3 ( " \n " , mppem , mppemx , mppemy ) ; if ( grid_fitting ) calcCVT ( ) ; status = TRAFO_APPLIED ; }
only needed when emUnits != 2048, but since we don't know this until
we know the TTFont we have to separate it from setP*Size()
only needed when emUnits ! = 2048 but since we don ' t know this until we know the TTFont we have to separate it from setP * Size ()