/* configure device */
while(p) {
if(!strcmp(p->name,"forceType0Fonts")) {
this->forceType0Fonts = atoi(p->value);
} else if(!strcmp(p->name,"fontconfig")) {
this->config_use_fontconfig = atoi(p->value);
/* configure device */
while(p) {
if(!strcmp(p->name,"forceType0Fonts")) {
this->forceType0Fonts = atoi(p->value);
} else if(!strcmp(p->name,"fontconfig")) {
this->config_use_fontconfig = atoi(p->value);
void GFXOutputDev::fillGfxLine(GfxState *state, gfxline_t*line)
{
gfxcolor_t col = getFillColor(state);
void GFXOutputDev::fillGfxLine(GfxState *state, gfxline_t*line)
{
gfxcolor_t col = getFillColor(state);
if(getLogLevel() >= LOGLEVEL_TRACE) {
msg("<trace> fill %02x%02x%02x%02x\n", col.r, col.g, col.b, col.a);
dump_outline(line);
}
if(getLogLevel() >= LOGLEVEL_TRACE) {
msg("<trace> fill %02x%02x%02x%02x\n", col.r, col.g, col.b, col.a);
dump_outline(line);
}
device->fill(device, line, &col);
}
void GFXOutputDev::fill(GfxState *state)
device->fill(device, line, &col);
}
void GFXOutputDev::fill(GfxState *state)
if the ligature doesn't exist, we need to draw
the characters one-by-one. */
int t;
if the ligature doesn't exist, we need to draw
the characters one-by-one. */
int t;
for(t=0;t<uLen;t++) {
drawChar(state, x, y, dx, dy, originX, originY, c, nBytes, _u+t, 1);
}
for(t=0;t<uLen;t++) {
drawChar(state, x, y, dx, dy, originX, originY, c, nBytes, _u+t, 1);
}
}
if(charid<0) {
msg("<warning> Didn't find character '%s' (c=%d,u=%d) in current charset (%s, %d characters)",
}
if(charid<0) {
msg("<warning> Didn't find character '%s' (c=%d,u=%d) in current charset (%s, %d characters)",
- FIXNULL(name),c, u, FIXNULL((char*)current_font_id), current_gfxfont->num_glyphs);
+ FIXNULL(name),c, u, FIXNULL((char*)current_gfxfont->id), current_gfxfont->num_glyphs);
- device->drawchar(device, current_font_id, charid, &col, &m);
+ device->drawchar(device, current_gfxfont, charid, &col, &m);
double quality = (1024 * 0.05) / maxSize;
msg("<verbose> Loading %s...", filename);
double quality = (1024 * 0.05) / maxSize;
msg("<verbose> Loading %s...", filename);
- font = gfxfont_load(filename, quality);
- msg("<verbose> Font %s loaded successfully", filename);
+ font = gfxfont_load(id, filename, quality);
+ if(!font) {
+ msg("<verbose> Couldn't load Font %s (%s)", filename, id);
+ return 0;
+ }
+ msg("<verbose> Font %s (%s) loaded successfully", filename, id);
int width, int height, GBool invert,
GBool inlineImg)
{
int width, int height, GBool invert,
GBool inlineImg)
{
msg("<verbose> drawImageMask %dx%d, invert=%d inline=%d", width, height, invert, inlineImg);
drawGeneralImage(state,ref,str,width,height,0,invert,inlineImg,1, 0, 0,0,0,0, 0);
}
msg("<verbose> drawImageMask %dx%d, invert=%d inline=%d", width, height, invert, inlineImg);
drawGeneralImage(state,ref,str,width,height,0,invert,inlineImg,1, 0, 0,0,0,0, 0);
}
int width, int height, GfxImageColorMap *colorMap,
int *maskColors, GBool inlineImg)
{
int width, int height, GfxImageColorMap *colorMap,
int *maskColors, GBool inlineImg)
{
msg("<verbose> drawImage %dx%d, %s, %s, inline=%d", width, height,
colorMap?"colorMap":"no colorMap",
maskColors?"maskColors":"no maskColors",
msg("<verbose> drawImage %dx%d, %s, %s, inline=%d", width, height,
colorMap?"colorMap":"no colorMap",
maskColors?"maskColors":"no maskColors",
Stream *maskStr, int maskWidth, int maskHeight,
GBool maskInvert)
{
Stream *maskStr, int maskWidth, int maskHeight,
GBool maskInvert)
{
msg("<verbose> drawMaskedImage %dx%d, %s, %dx%d mask", width, height,
colorMap?"colorMap":"no colorMap",
maskWidth, maskHeight);
msg("<verbose> drawMaskedImage %dx%d, %s, %dx%d mask", width, height,
colorMap?"colorMap":"no colorMap",
maskWidth, maskHeight);
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap)
{
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap)
{
msg("<verbose> drawSoftMaskedImage %dx%d, %s, %dx%d mask", width, height,
colorMap?"colorMap":"no colorMap",
maskWidth, maskHeight);
msg("<verbose> drawSoftMaskedImage %dx%d, %s, %dx%d mask", width, height,
colorMap?"colorMap":"no colorMap",
maskWidth, maskHeight);