Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: removing advancement code from glyph measuring, it's not actually used #294

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions PDFWriter/PDFUsedFont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,22 +200,8 @@ PDFUsedFont::TextMeasures PDFUsedFont::CalculateTextDimensions(const UIntList& i
{
// now calculate the placement bounding box. using the algorithm described in the FreeType turtorial part 2, minus the kerning part, and with no scale

// first, calculate the pen advancements
int pen_x, pen_y;
std::list<FT_Vector> pos;
pen_x = 0; /* start at (0,0) */
pen_y = 0;

UIntList::const_iterator it = inGlyphsList.begin();
for(; it != inGlyphsList.end();++it)
{
pos.push_back(FT_Vector());

pos.back().x = pen_x;
pos.back().y = pen_y;

pen_x += mFaceWrapper.GetGlyphWidth(*it);
}
UIntList::const_iterator it;

// now let's combine with the bbox, so we get the nice bbox for the whole string

Expand Down
Loading