本文整理汇总了C++中UIntVector::back方法的典型用法代码示例。如果您正苦于以下问题:C++ UIntVector::back方法的具体用法?C++ UIntVector::back怎么用?C++ UIntVector::back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIntVector
的用法示例。
在下文中一共展示了UIntVector::back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateTrueTypeSubset
EStatusCode TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset( FreeTypeFaceWrapper& inFontInfo, /*consider requiring only the file path...actually i don't need the whole thing*/
const UIntVector& inSubsetGlyphIDs,
bool& outNotEmbedded,
MyStringBuf& outFontProgram)
{
EStatusCode status;
unsigned long* locaTable = NULL;
do
{
UIntVector subsetGlyphIDs = inSubsetGlyphIDs;
status = mTrueTypeFile.OpenFile(inFontInfo.GetFontFilePath());
if(status != PDFHummus::eSuccess)
{
TRACE_LOG1("TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset, cannot open true type font file at %s",inFontInfo.GetFontFilePath().c_str());
break;
}
status = mTrueTypeInput.ReadOpenTypeFile(mTrueTypeFile.GetInputStream(),(unsigned short)inFontInfo.GetFontIndex());
if(status != PDFHummus::eSuccess)
{
TRACE_LOG("TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset, failed to read true type file");
break;
}
if(mTrueTypeInput.GetOpenTypeFontType() != EOpenTypeTrueType)
{
TRACE_LOG("TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset, font file is not true type, so there is an exceptions here. expecting true types only");
break;
}
// see if font may be embedded
if(mTrueTypeInput.mOS2Exists && !FSType(mTrueTypeInput.mOS2.fsType).CanEmbed())
{
outNotEmbedded = true;
return PDFHummus::eSuccess;
}
else
outNotEmbedded = false;
AddDependentGlyphs(subsetGlyphIDs);
// K. this needs a bit explaining.
// i want to leave the glyph IDs as they were in the original font.
// this allows me to write a more comfotable font definition. something which is generic enough
// this assumption requires that the font will contain the glyphs in their original position
// to allow that, when the glyph count is smaller than the actual glyphs count, i'm
// padding with 0 length glyphs (their loca entries just don't move).
// don't worry - it's perfectly kosher.
// so - bottom line - the glyphs count will actually be 1 more than the maxium glyph index.
// and from here i'll just place the glyphs in their original indexes, and fill in the
// vacant glyphs with empties.
mSubsetFontGlyphsCount = subsetGlyphIDs.back() + 1;
mFontFileStream.Assign(&outFontProgram);
mPrimitivesWriter.SetOpenTypeStream(&mFontFileStream);
// assign also to some reader streams, so i can read items for checksums calculations
mFontFileReaderStream.Assign(&outFontProgram);
mPrimitivesReader.SetOpenTypeStream(&mFontFileReaderStream);
status = WriteTrueTypeHeader();
if(status != PDFHummus::eSuccess)
{
TRACE_LOG("TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset, failed to write true type header");
break;
}
status = WriteHead();
if(status != PDFHummus::eSuccess)
{
TRACE_LOG("TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset, failed to write head table");
break;
}
status = WriteHHea();
if(status != PDFHummus::eSuccess)
{
TRACE_LOG("TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset, failed to write hhea table");
break;
}
status = WriteHMtx();
if(status != PDFHummus::eSuccess)
{
TRACE_LOG("TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset, failed to write hmtx table");
break;
}
status = WriteMaxp();
if(status != PDFHummus::eSuccess)
{
TRACE_LOG("TrueTypeEmbeddedFontWriter::CreateTrueTypeSubset, failed to write Maxp table");
break;
}
if(mTrueTypeInput.mCVTExists)
{
//.........这里部分代码省略.........