示例#1
0
文件: post.c 项目: Acidburn0zzz/afdko
void postDump(IntX level, LongN start)
	{
	DL(1, (OUTPUTBUFF, "### [post] (%08lx)\n", start));

	if (!loaded)
		return;

	DLV(2, "version           =", post->version);
	DLF(2, "italicAngle       =", post->italicAngle);
	DLs(2, "underlinePosition =", post->underlinePosition);
	DLs(2, "underlineThickness=", post->underlineThickness);
	DLU(2, "isFixedPitch      =", post->isFixedPitch);
	DLU(2, "minMemType42      =", post->minMemType42);
	DLU(2, "maxMemType42      =", post->maxMemType42);
	DLU(2, "minMemType1       =", post->minMemType1);
	DLU(2, "maxMemType1       =", post->maxMemType1);

	switch (post->version)
		{
	case VERSION(1,0):
		break;
	case VERSION(2,0):
		dump2_0((Format2_0 *)post->format, level);
		break;
	case VERSION(2,5):
		dump2_5((Format2_5 *)post->format, level);
		break;
	case VERSION(3,0):
		break;
	case VERSION(4,0):
		dump4_0((Format4_0 *)post->format, level);
		}
	}
示例#2
0
void ENCODump(IntX level, LongN start) {
    IntX i;

    DL(1, (OUTPUTBUFF, "### [ENCO] (%08lx)\n", start));

    DLV(2, "version  =", ENCO->version);

    DL(2, (OUTPUTBUFF, "--- offset[index]=value\n"));
    for (i = 0; i <= nEncodings; i++)
        DL(2, (OUTPUTBUFF, "[%d]=%08x ", i, ENCO->offset[i]));
    DL(2, (OUTPUTBUFF, "\n"));

    for (i = 0; i < nEncodings; i++) {
        void *encoding = ENCO->encoding[i];

        DL(2, (OUTPUTBUFF, "--- encoding[%d]\n", i));

        switch (*(Card16 *)encoding) {
            case ENCO_STANDARD:
                dumpFormat0(encoding, level);
                break;
            case ENCO_SPARSE:
                dumpFormat1(encoding, level);
                break;
            case ENCO_DENSE:
                dumpFormat2(encoding, level);
                break;
        }
    }
}
示例#3
0
void CID_Dump(IntX level, LongN start) {
    DL(1, (OUTPUTBUFF, "### [CID ] (%08lx)\n", start));

    DLV(2, "Version     =", CID_->Version);
    DLx(2, "Flags       =", CID_->Flags);
    DLu(2, "CIDCount    =", CID_->CIDCount);
    DLX(2, "TotalLength =", CID_->TotalLength);
    DLX(2, "AsciiLength =", CID_->AsciiLength);
    DLX(2, "BinaryLength=", CID_->BinaryLength);
    DLu(2, "FDCount     =", CID_->FDCount);
}
示例#4
0
void HFMXDump(IntX level, LongN start) {
    DL(1, (OUTPUTBUFF, "### [HFMX] (%08lx)\n", start));

    DLV(2, "Version           =", HFMX->Version);

    hybridDump("Ascent            =", HFMX->Ascent, level);
    hybridDump("Descent           =", HFMX->Descent, level);
    hybridDump("LineGap           =", HFMX->LineGap, level);
    hybridDump("CaretSlopeRise    =", HFMX->CaretSlopeRise, level);
    hybridDump("CaretSlopeRun     =", HFMX->CaretSlopeRun, level);
    hybridDump("CaretOffset       =", HFMX->CaretOffset, level);
}
示例#5
0
void BBOXDump(IntX level, LongN start) {
    IntX i;
    IntX j;

    DL(1, (OUTPUTBUFF, "### [BBOX] (%08lx)\n", start));

    DLV(2, "version =", BBOX->version);
    DLu(2, "flags   =", BBOX->flags);
    DLu(2, "nGlyphs =", BBOX->nGlyphs);
    DLu(2, "nMasters=", BBOX->nMasters);

    if (BBOX->nMasters == 1) {
        DL(3, (OUTPUTBUFF, "--- bbox[glyphId]={left,bottom,right,top}\n"));

        for (i = 0; i < BBOX->nGlyphs; i++) {
            BBox *bbox = &BBOX->bbox[i];
            DL(3, (OUTPUTBUFF, "[%d]={%hd,%hd,%hd,%hd} ", i,
                   bbox->left[0], bbox->bottom[0],
                   bbox->right[0], bbox->top[0]));
        }
        DL(3, (OUTPUTBUFF, "\n"));
    } else {
        DL(3, (OUTPUTBUFF, "--- bbox[glyphId]={{left+},{bottom+},{right+},{top+}}\n"));
        for (i = 0; i < BBOX->nGlyphs; i++) {
            BBox *bbox = &BBOX->bbox[i];
            DL(3, (OUTPUTBUFF, "[%d]={{", i));

            for (j = 0; j < BBOX->nMasters; j++)
                DL(3, (OUTPUTBUFF, "%hd%s", bbox->left[j],
                       j == BBOX->nMasters - 1 ? "},{" : ","));

            for (j = 0; j < BBOX->nMasters; j++)
                DL(3, (OUTPUTBUFF, "%hd%s", bbox->bottom[j],
                       j == BBOX->nMasters - 1 ? "},{" : ","));

            for (j = 0; j < BBOX->nMasters; j++)
                DL(3, (OUTPUTBUFF, "%hd%s", bbox->right[j],
                       j == BBOX->nMasters - 1 ? "},{" : ","));

            for (j = 0; j < BBOX->nMasters; j++)
                DL(3, (OUTPUTBUFF, "%hd%s", bbox->top[j],
                       j == BBOX->nMasters - 1 ? "}} " : ","));
        }
        DL(3, (OUTPUTBUFF, "\n"));
    }
}
示例#6
0
文件: MMVR.c 项目: Acidburn0zzz/afdko
void MMVRDump(IntX level, LongN start)
	{
	IntX i;

	DL(1, (OUTPUTBUFF, "### [MMVR] (%08lx)\n", start));

	DLV(2, "Version  =", MMVR->Version);
	DLx(2, "Flags    =", MMVR->Flags);
	DLu(2, "AxisCount=", MMVR->AxisCount);

	for (i = 0; i < MMVR->AxisCount; i++)
		{
		Axis *axis = &MMVR->axis[i];
		
		DL(2, (OUTPUTBUFF, "--- axis[%d]\n", i));
		DLT(2, "Tag    =", axis->Tag);
		DLu(2, "Default=", axis->Default);
		DLu(2, "Scale  =", axis->Scale);
		}
	}
示例#7
0
文件: WDTH.c 项目: Acidburn0zzz/afdko
void WDTHDump(IntX level, LongN start)
	{
	IntX i;
	IntX j;
	IntX k;
	IntX iWidth;
	IntX nElements = WDTH->nRanges + 1;

	DL(1, (OUTPUTBUFF, "### [WDTH] (%08lx)\n", start));

	DLV(2, "version =", WDTH->version);
	DLu(2, "flags   =", WDTH->flags);
	DLu(2, "nMasters=", WDTH->nMasters);
	DLu(2, "nRanges =", WDTH->nRanges);

	DL(3, (OUTPUTBUFF, "--- firstGlyph[index]=glyphId\n"));
	for (i = 0; i < nElements; i++)
		DL(3, (OUTPUTBUFF, "[%d]=%hu ", i, WDTH->firstGlyph[i]));
	DL(3, (OUTPUTBUFF, "\n"));

	DL(3, (OUTPUTBUFF, "--- offset[index]=offset\n"));
	if (WDTH->flags & LONG_OFFSETS)
		for (i = 0; i < nElements; i++)
			DL(3, (OUTPUTBUFF, "[%d]=%08lx ", i, ((Card32 *)WDTH->offset)[i]));
	else
		for (i = 0; i < nElements; i++)
			DL(3, (OUTPUTBUFF, "[%d]=%04hx ", i, ((Card16 *)WDTH->offset)[i]));
	DL(3, (OUTPUTBUFF, "\n"));

	iWidth = 0;
	if (WDTH->nMasters == 1)
		{
		DL(3, (OUTPUTBUFF, "--- width[offset]=value\n"));
		if (WDTH->flags & LONG_OFFSETS)
			{
			Card32 *offset = WDTH->offset;
			for (i = 0; i < WDTH->nRanges; i++)
				{
				IntX span = (offset[i + 1] - offset[i]) / sizeof(uFWord);
				for (j = 0; j < span; j++)
					DL(3, (OUTPUTBUFF, "[%08lx]=%hu ", offset[i] + j * sizeof(uFWord),
						   WDTH->width[iWidth++]));
				}
			}
		else
			{
			Card16 *offset = WDTH->offset;
			for (i = 0; i < WDTH->nRanges; i++)
				{
				IntX span = (offset[i + 1] - offset[i]) / sizeof(uFWord);
				for (j = 0; j < span; j++)
					DL(3, (OUTPUTBUFF, "[%04lx]=%hu ", offset[i] + j * sizeof(uFWord),
						   WDTH->width[iWidth++]));
				}
			}
		}
	else
		{
		DL(3, (OUTPUTBUFF, "--- width[offset]={value+}\n"));
		if (WDTH->flags & LONG_OFFSETS)
			{
			Card32 *offset = WDTH->offset;
			for (i = 0; i < WDTH->nRanges; i++)
				{
				IntX span = (offset[i + 1] - offset[i]) / sizeof(uFWord);
				for (j = 0; j < span; j++)
					{
					DL(3, (OUTPUTBUFF, "[%08lx]={", offset[i] + j * sizeof(uFWord)));
					for (k = 0; k < WDTH->nMasters; k++)
						DL(3, (OUTPUTBUFF, "%hu%s", WDTH->width[iWidth++],
							   k == WDTH->nMasters - 1 ? "} " : ","));
					}
				}
			}
		else
			{
			Card16 *offset = WDTH->offset;
			for (i = 0; i < WDTH->nRanges; i++)
				{
				IntX span = (offset[i + 1] - offset[i]) / sizeof(uFWord);
				for (j = 0; j < span; j++)
					{
					DL(3, (OUTPUTBUFF, "[%04lx]={", offset[i] + j * sizeof(uFWord)));
					for (k = 0; k < WDTH->nMasters; k++)
						DL(3, (OUTPUTBUFF, "%hu%s", WDTH->width[iWidth++],
							   k == WDTH->nMasters - 1 ? "} " : ","));
					}
				}
			}
		}
	DL(3, (OUTPUTBUFF, "\n"));
	}
示例#8
0
文件: MMFX.c 项目: brawer/afdko
void MMFXDump(IntX level, LongN start)
{
    IntX i, pos;
    Int16 tmp;
    Card8 *ptr;
    Card16 nMasters;

    DL(1, (OUTPUTBUFF, "### [MMFX] (%08lx)\n", start));

    DLV(2, "Version  =", MMFX->version);
    DLu(2, "nMetrics =", MMFX->nMetrics);
    DLu(2, "offSize  =", MMFX->offSize);

    DL(2, (OUTPUTBUFF, "--- offset[index]=offset\n"));
    if (MMFX->offSize == 2)
    {
        for (i = 0; i < MMFX->nMetrics; i++)
        {
            tmp = (Int16)MMFX->offset[i];
            DL(2, (OUTPUTBUFF, "[%d]=%04hx ", i, tmp) );
        }
        DL(2, (OUTPUTBUFF, "\n"));
    }
    else
    {
        for (i = 0; i < MMFX->nMetrics; i++)
            DL(2, (OUTPUTBUFF, "[%d]=%08lx ", i, MMFX->offset[i]) );
        DL(2, (OUTPUTBUFF, "\n"));
    }
    DL(2, (OUTPUTBUFF, "\n"));

    CFF_GetNMasters(&nMasters, MMFX_);

    DL(2, (OUTPUTBUFF, "--- cstring[index]=<charstring ops>\n"));
    for (i = 0; i < MMFX->nMetrics; i++)
    {
        pos = MMFX->offset[i] - minoffset;
        ptr = &(MMFX->cstrs[pos]);
        if (i < 8)
            switch (i)
            {
            case 0:
                DL(2, (OUTPUTBUFF, "[0=Zero]           = <") );
                break;
            case 1:
                DL(2, (OUTPUTBUFF, "[1=Ascender]       = <") );
                break;
            case 2:
                DL(2, (OUTPUTBUFF, "[2=Descender]      = <") );
                break;
            case 3:
                DL(2, (OUTPUTBUFF, "[3=LineGap]        = <") );
                break;
            case 4:
                DL(2, (OUTPUTBUFF, "[4=AdvanceWidthMax]= <") );
                break;
            case 5:
                DL(2, (OUTPUTBUFF, "[5=AvgCharWidth]   = <") );
                break;
            case 6:
                DL(2, (OUTPUTBUFF, "[6=xHeight]        = <") );
                break;
            case 7:
                DL(2, (OUTPUTBUFF, "[7=CapHeight]      = <") );
                break;
            }
        else
        {
            DL(2, (OUTPUTBUFF, "[%d]= <", i) );
        }

        dump_csDump(MAX_INT32, ptr, nMasters);

        DL(2, (OUTPUTBUFF, ">\n"));
    }
    DL(2, (OUTPUTBUFF, "\n"));
}