blob: ba94ca69c79502bcaf86a0d319dc753bb57449d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/* gstate.c -- manage graphics state
* Copyright (C) 1996 Li-Da Lho, All right reserved.
*/
#include <stdlib.h>
#include "config.h"
#include "ttf.h"
#include "ttfutil.h"
#ifdef MEMCHECK
#include <dmalloc.h>
#endif
/* $Id: gstate.c,v 1.1.1.1 1998/06/05 07:47:52 robert Exp $ */
#ifndef lint
static char vcid[] = "$Id: gstate.c,v 1.1.1.1 1998/06/05 07:47:52 robert Exp $";
#endif /* lint */
GraphicsState gsdefault;
void ttfInitGraphicsState(TTFontPtr font)
{
/*font->gstate = GS_DEFAULT;
font->gstate_init = GS_DEFAULT;*/
/*ttfExecuteInstruction(font, font->fpgm);
ttfExecuteInstruction(font, font->prep);*/
}
void ttfInitStack(TTFontPtr font)
{
font->vm.sp = 0;
font->vm.Stack = (LONG *) calloc (font->maxp->maxStackElements, sizeof(LONG));
if (font->vm.Stack == NULL)
ttfError("Out of memory\n");
}
void ttfInitStorageArea(TTFontPtr font)
{
font->vm.StorageArea = (LONG *) calloc (font->maxp->maxStorage, sizeof(LONG));
if (font->vm.StorageArea == NULL)
ttfError("Out of memory\n");
}
|