XFree86/src/xfstt/RasterScale.cpp
// useTTFont must be executed before setP*Size!
useTTFont must be executed before setP*Size!
useTTFont must be executed before setP * Size!
void Rasterizer::useTTFont( TTFont* _ttFont, int _flags)
{
	flags = _flags;
	xx = yy = (16 * VGARES + 36) / 72;
	xy = yx = 0;
	if( !_ttFont || _ttFont->badFont()) {
		status = INVALID_FONT;
		return;
	}
	if( ttFont == _ttFont)
;
	ttFont = _ttFont;
	status = NOT_READY;
	initInterpreter();
#define MEMSLACK 2
	int i = ttFont->maxpTable->maxPoints
		+ ttFont->maxpTable->maxCompPoints + 2;
	if( sizePoints[1] < i) {
		if( sizePoints[1]) delete[] p[1];
		sizePoints[1]	= MEMSLACK * i;
		p[1]		= new point[ sizePoints[1]];
	}
	i = ttFont->maxpTable->maxContours + ttFont->maxpTable->maxCompContours;
	if( sizeContours < i) {
		if( sizeContours) delete[] endPoints;
		sizeContours	= MEMSLACK * i;
		endPoints	= new int[ sizeContours];
	}
	ttFont->points		= p[1];
	ttFont->endPoints	= endPoints;
}
void Rasterizer :: useTTFont ( TTFont * _ttFont , int _flags ) { flags = _flags ; xx = yy = ( 16 * VGARES + 36 ) / 72 ; xy = yx = 0 ; if ( ! _ttFont || _ttFont -> badFont ( ) ) { status = INVALID_FONT ; return ; } if ( ttFont == _ttFont ) ; ttFont = _ttFont ; status = NOT_READY ; initInterpreter ( ) ; #define MEMSLACK  2 int i = ttFont -> maxpTable -> maxPoints + ttFont -> maxpTable -> maxCompPoints + 2 ; if ( sizePoints [ 1 ] < i ) { if ( sizePoints [ 1 ] ) delete [ ] p [ 1 ] ; sizePoints [ 1 ] = MEMSLACK * i ; p [ 1 ] = new point [ sizePoints [ 1 ] ] ; } i = ttFont -> maxpTable -> maxContours + ttFont -> maxpTable -> maxCompContours ; if ( sizeContours < i ) { if ( sizeContours ) delete [ ] endPoints ; sizeContours = MEMSLACK * i ; endPoints = new int [ sizeContours ] ; } ttFont -> points = p [ 1 ] ; ttFont -> endPoints = endPoints ; }
useTTFont must be executed before setP*Size!
useTTFont must be executed before setP * Size!
// set scaling defaults = 16points //###		return;