当前位置: 首页>>代码示例>>C++>>正文


C++ PSFont::GetPrintFont方法代码示例

本文整理汇总了C++中PSFont::GetPrintFont方法的典型用法代码示例。如果您正苦于以下问题:C++ PSFont::GetPrintFont方法的具体用法?C++ PSFont::GetPrintFont怎么用?C++ PSFont::GetPrintFont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PSFont的用法示例。


在下文中一共展示了PSFont::GetPrintFont方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ConstProcs

void PostScriptView::ConstProcs (ostream& out) {
    UList* fonts = GetPSFonts();
    int nfonts = Count(fonts);

    out << "/IdrawDict " << (50 + nfonts) << " dict def\n";
    out << "IdrawDict begin\n\n";

    if (nfonts > 0) {
	for (const char** line = reencodeISO; *line != nil; ++line) {
	    out << *line << "\n";
	}

	for (UList* u = fonts->First(); u != fonts->End(); u = u->Next()) {
	    PSFont* font = GetFont(u);

	    // No way to check if the X font's encoding is iso8859-1, so...
	    if (strncmp(font->GetPrintFont(), "Symbol", 6) != 0) {
		out << "/" << font->GetPrintFont() << " reencodeISO def\n";
	    } else {
		out << "/" << font->GetPrintFont() << " dup findfont def\n";
	    }
	}
	out << "\n";
    }

    out << "/none null def\n";
    out << "/numGraphicParameters 17 def\n";
    out << "/stringLimit 65535 def\n\n";
}
开发者ID:jmzaleski,项目名称:ivtools-1.2,代码行数:29,代码来源:psview.c

示例2: Uncollected

static boolean Uncollected (const char* name, UList* fonts) {
    for (UList* u = fonts->First(); u != fonts->End(); u = u->Next()) {
        PSFont* font = (PSFont*) (*u)();

        if (strcmp(font->GetPrintFont(), name) == 0) {
            return false;
        }
    }
    return true;
}
开发者ID:jmzaleski,项目名称:ivtools-1.2,代码行数:10,代码来源:psview.c

示例3: FontNames

void PostScriptView::FontNames (ostream& out) {
    UList* fonts = GetPSFonts();
    const char* comment = "%%DocumentFonts:";
    int linelen = strlen(comment);
    out << comment;

    for (UList* u = fonts->First(); u != fonts->End(); u = u->Next()) {
	PSFont* font = GetFont(u);

	if (linelen + strlen(font->GetPrintFont()) + 2 <= MAXLINELEN) {
	    out << " ";
	    ++linelen;
	} else {
	    out << "\n%%+ ";
	    linelen = strlen("%%+ ");
	}
	out << font->GetPrintFont();
	linelen += strlen(font->GetPrintFont());
    }
    out << "\n";
}
开发者ID:jmzaleski,项目名称:ivtools-1.2,代码行数:21,代码来源:psview.c

示例4: CollectFonts

static void CollectFonts (GraphicComp* comp, UList* fonts) {
    PSFont* font = comp->GetGraphic()->GetFont();

    if (font != nil && Uncollected(font->GetPrintFont(), fonts)) {
        fonts->Append(new UList(font));
    }

    Iterator i;

    for (comp->First(i); !comp->Done(i); comp->Next(i)) {
        CollectFonts(comp->GetComp(i), fonts);
    }
}
开发者ID:jmzaleski,项目名称:ivtools-1.2,代码行数:13,代码来源:psview.c

示例5: Font

void PostScriptView::Font (ostream& out) {
    PSFont* font = (PSFont*) GetGraphicComp()->GetGraphic()->GetFont();

    if (font == nil) {
	out << MARK << " f u\n";
    } else {
	const char* name = font->GetName();
	const char* pf = font->GetPrintFont();
	const char* ps = font->GetPrintSize();
	out << MARK << " f " << name << "\n";
	out << pf << " " << ps << " SetF\n";
    }
}
开发者ID:jmzaleski,项目名称:ivtools-1.2,代码行数:13,代码来源:psview.c


注:本文中的PSFont::GetPrintFont方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。