1 //========================================================================
5 // Copyright 2001-2002 Glyph & Cog, LLC
7 //========================================================================
10 #pragma implementation
16 //------------------------------------------------------------------------
18 SFontEngine::SFontEngine(Display *displayA, Visual *visualA, int depthA,
26 SFontEngine::~SFontEngine() {
29 void SFontEngine::useTrueColor(int rMaxA, int rShiftA, int gMaxA, int gShiftA,
30 int bMaxA, int bShiftA) {
40 void SFontEngine::useColorCube(Gulong *colorsA, int nRGBA) {
44 rMax = gMax = bMax = nRGB - 1;
47 Gulong SFontEngine::findColor(int r, int g, int b) {
51 r1 = ((r & 0xffff) * rMax) / 0xffff;
52 g1 = ((g & 0xffff) * gMax) / 0xffff;
53 b1 = ((b & 0xffff) * bMax) / 0xffff;
55 pix = (r1 << rShift) + (g1 << gShift) + (b1 << bShift);
57 pix = colors[(r1 * nRGB + g1) * nRGB + b1];
62 //------------------------------------------------------------------------
64 SFontFile::SFontFile() {
67 SFontFile::~SFontFile() {
70 //------------------------------------------------------------------------
78 GBool SFont::getCharPath(CharCode c, Unicode u, GfxState *state) {