From 0cee3b79d02c11a673809c13c0570be715ea613f Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Wed, 16 Oct 2013 17:13:03 +0100 Subject: Fix colour variable type with gtkmm 3 Fixed bugs: - https://launchpad.net/bugs/1239370 (bzr r12694) --- src/color-profile.cpp | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/src/color-profile.cpp b/src/color-profile.cpp index f0a06f73b..b18112ece 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -1165,13 +1165,24 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayTransform() cmsUInt32Number dwFlags = cmsFLAGS_SOFTPROOFING; if ( gamutWarn ) { dwFlags |= cmsFLAGS_GAMUTCHECK; + +#if WITH_GTKMM_3_0 + gushort gamutColor_r = gamutColor.get_red_u(); + gushort gamutColor_g = gamutColor.get_green_u(); + gushort gamutColor_b = gamutColor.get_blue_u(); +#else + gushort gamutColor_r = gamutColor.get_red(); + gushort gamutColor_g = gamutColor.get_green(); + gushort gamutColor_b = gamutColor.get_blue(); +#endif + #if HAVE_LIBLCMS1 - cmsSetAlarmCodes(gamutColor.get_red() >> 8, gamutColor.get_green() >> 8, gamutColor.get_blue() >> 8); + cmsSetAlarmCodes(gamutColor_r >> 8, gamutColor_g >> 8, gamutColor_b >> 8); #elif HAVE_LIBLCMS2 cmsUInt16Number newAlarmCodes[cmsMAXCHANNELS] = {0}; - newAlarmCodes[0] = gamutColor.get_red(); - newAlarmCodes[1] = gamutColor.get_green(); - newAlarmCodes[2] = gamutColor.get_blue(); + newAlarmCodes[0] = gamutColor_r; + newAlarmCodes[1] = gamutColor_g; + newAlarmCodes[2] = gamutColor_b; newAlarmCodes[3] = ~0; cmsSetAlarmCodes(newAlarmCodes); #endif @@ -1339,13 +1350,24 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayPer( Glib::ustring const& id ) cmsUInt32Number dwFlags = cmsFLAGS_SOFTPROOFING; if ( gamutWarn ) { dwFlags |= cmsFLAGS_GAMUTCHECK; + +#if WITH_GTKMM_3_0 + gushort gamutColor_r = gamutColor.get_red_u(); + gushort gamutColor_g = gamutColor.get_green_u(); + gushort gamutColor_b = gamutColor.get_blue_u(); +#else + gushort gamutColor_r = gamutColor.get_red(); + gushort gamutColor_g = gamutColor.get_green(); + gushort gamutColor_b = gamutColor.get_blue(); +#endif + #if HAVE_LIBLCMS1 - cmsSetAlarmCodes(gamutColor.get_red() >> 8, gamutColor.get_green() >> 8, gamutColor.get_blue() >> 8); + cmsSetAlarmCodes(gamutColor_r >> 8, gamutColor_g >> 8, gamutColor_b >> 8); #elif HAVE_LIBLCMS2 cmsUInt16Number newAlarmCodes[cmsMAXCHANNELS] = {0}; - newAlarmCodes[0] = gamutColor.get_red(); - newAlarmCodes[1] = gamutColor.get_green(); - newAlarmCodes[2] = gamutColor.get_blue(); + newAlarmCodes[0] = gamutColor_r; + newAlarmCodes[1] = gamutColor_g; + newAlarmCodes[2] = gamutColor_b; newAlarmCodes[3] = ~0; cmsSetAlarmCodes(newAlarmCodes); #endif -- cgit v1.2.3 From af8374a9745905bde55e5b19425bf95b2fd3f935 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Wed, 16 Oct 2013 21:47:12 +0200 Subject: static code analysis: performance (bzr r12695) --- src/desktop.cpp | 2 +- src/flood-context.cpp | 2 +- src/gradient-drag.cpp | 2 +- src/libcola/cola.cpp | 2 +- src/libcola/straightener.cpp | 2 +- src/libvpsc/constraint.cpp | 4 ++-- src/seltrans.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/desktop.cpp b/src/desktop.cpp index dbad37b92..f5c35514c 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1930,7 +1930,7 @@ SPDesktop::show_dialogs() mapVerbPreference.insert(std::make_pair ("SpellCheck", "/dialogs/spellcheck") ); mapVerbPreference.insert(std::make_pair ("Symbols", "/dialogs/symbols") ); - for (std::map::const_iterator iter = mapVerbPreference.begin(); iter != mapVerbPreference.end(); iter++) { + for (std::map::const_iterator iter = mapVerbPreference.begin(); iter != mapVerbPreference.end(); ++iter) { Glib::ustring pref = iter->second; int visible = prefs->getInt(pref + "/visible", 0); if (visible) { diff --git a/src/flood-context.cpp b/src/flood-context.cpp index 28aedba6e..dc89fb0a9 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -955,7 +955,7 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even unsigned int sort_y = (unsigned int)cp[Geom::Y]; unsigned int current_y = sort_y; - for (std::deque::iterator i = fill_queue.begin(); i != fill_queue.end(); i++) { + for (std::deque::iterator i = fill_queue.begin(); i != fill_queue.end(); ++i) { Geom::Point current = *i; current_y = (unsigned int)current[Geom::Y]; if (current_y != sort_y) { diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index b3622107b..0b250fe52 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -879,7 +879,7 @@ static void gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, gui if (!bsp.getSnapped()) { // If we didn't truly snap to an object or to a grid, then we will still have to look for the // closest projection onto one of the constraints. findBestSnap() will not do this for us - for (std::list::const_iterator i = isr.points.begin(); i != isr.points.end(); i++) { + for (std::list::const_iterator i = isr.points.begin(); i != isr.points.end(); ++i) { if (i == isr.points.begin() || (Geom::L2((*i).getPoint() - p) < Geom::L2(bsp.getPoint() - p))) { bsp.setPoint((*i).getPoint()); bsp.setTarget(Inkscape::SNAPTARGET_CONSTRAINED_ANGLE); diff --git a/src/libcola/cola.cpp b/src/libcola/cola.cpp index 87fbf9f79..51560a79c 100644 --- a/src/libcola/cola.cpp +++ b/src/libcola/cola.cpp @@ -271,7 +271,7 @@ void ConstrainedMajorizationLayout::straighten(std::vector& double b[n],*coords=dim==HORIZONTAL?X:Y,dist_ub,dist_bv; std::fill(b,b+n,0); for(LinearConstraints::iterator i=linearConstraints.begin(); - i!= linearConstraints.end();i++) { + i!= linearConstraints.end();++i) { LinearConstraint* c=*i; if(straightenToProjection) { Q[c->u][c->u]+=c->w*c->duu; diff --git a/src/libcola/straightener.cpp b/src/libcola/straightener.cpp index fab30d48d..9e1ab1809 100644 --- a/src/libcola/straightener.cpp +++ b/src/libcola/straightener.cpp @@ -82,7 +82,7 @@ namespace straightener { double bx=route->xs[i]; double by=route->ys[i]; double t=0; - list::iterator copyit=j++; + list::iterator copyit=++j; //printf(" px=%f, py=%f, ax=%f, ay=%f, bx=%f, by=%f\n",px,py,ax,ay,bx,by); if(pointOnLine(px,py,ax,ay,bx,by,t)) { //printf(" got node %d\n",*copyit); diff --git a/src/libvpsc/constraint.cpp b/src/libvpsc/constraint.cpp index 2bd173155..0ec06dfac 100644 --- a/src/libvpsc/constraint.cpp +++ b/src/libvpsc/constraint.cpp @@ -24,11 +24,11 @@ Constraint::Constraint(Variable *left, Variable *right, double gap, bool equalit } Constraint::~Constraint() { Constraints::iterator i; - for(i=left->out.begin(); i!=left->out.end(); i++) { + for(i=left->out.begin(); i!=left->out.end(); ++i) { if(*i==this) break; } left->out.erase(i); - for(i=right->in.begin(); i!=right->in.end(); i++) { + for(i=right->in.begin(); i!=right->in.end(); ++i) { if(*i==this) break; } right->in.erase(i); diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 7a8f5ec17..ed0fd3a08 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1394,7 +1394,7 @@ void Inkscape::SelTrans::moveTo(Geom::Point const &xy, guint state) /* Pick one */ Inkscape::SnappedPoint best_snapped_point; - for (std::list::const_iterator i = s.begin(); i != s.end(); i++) { + for (std::list::const_iterator i = s.begin(); i != s.end(); ++i) { if (i->getSnapped()) { if (best_snapped_point.isOtherSnapBetter(*i, true)) { best_snapped_point = *i; -- cgit v1.2.3 From 253b3147b483104b996861d4aa26ed92431de755 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Wed, 16 Oct 2013 15:54:11 -0400 Subject: couple of typos affecting Path->Linked Offset (Bug 1236830) Fixed bugs: - https://launchpad.net/bugs/1236830 (bzr r12696) --- src/livarot/PathOutline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/livarot/PathOutline.cpp b/src/livarot/PathOutline.cpp index 3b5ce79f9..2cd359328 100644 --- a/src/livarot/PathOutline.cpp +++ b/src/livarot/PathOutline.cpp @@ -1047,7 +1047,7 @@ void Path::TangentOnArcAt(double at, const Geom::Point &iS, PathDescrArcTo const dtgt[0] = -ca * rx * cb + sa * ry * sb; dtgt[1] = -sa * rx * cb - ca * ry * sb; len = L2(tgt); - rad = len * dot(tgt, tgt) / (tgt[0] * dtgt[1] - tgt[1] * dtgt[0]); + rad = -len * dot(tgt, tgt) / (tgt[0] * dtgt[1] - tgt[1] * dtgt[0]); tgt /= len; } else @@ -1476,7 +1476,7 @@ Path::RecStdArcTo (outline_callback_data * data, double tol, double width, } const Geom::Point diff = req - chk; const double err = (dot(diff,diff)); - if (err <= tol * tol) + if (err <= tol) // tolerance is given as a quadratic value, no need to use tol*tol here { int n_d = data->dest->CubicTo (enPos + width*enNor, stGue*scal*stTgt, -- cgit v1.2.3 From f304ed29d6f2b92b872ffc2b218bc8398b879ef0 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Wed, 16 Oct 2013 22:21:27 +0200 Subject: cppcheck initialisation (bzr r12697) --- src/libcola/cola.cpp | 10 +++++----- src/libcola/gradient_projection.h | 23 +++++++++++++++++++++-- src/libcola/straightener.h | 4 ++-- src/xml/repr-io.cpp | 11 +++++++---- 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/libcola/cola.cpp b/src/libcola/cola.cpp index 51560a79c..168ef5533 100644 --- a/src/libcola/cola.cpp +++ b/src/libcola/cola.cpp @@ -23,7 +23,8 @@ ConstrainedMajorizationLayout double* eweights, double idealLength, TestConvergence& done) - : constrainedLayout(false), + : avoidOverlaps(false), + constrainedLayout(false), n(rs.size()), lapSize(n), lap2(new double*[lapSize]), Q(lap2), Dij(new double*[lapSize]), @@ -116,18 +117,17 @@ void ConstrainedMajorizationLayout::majlayout( void ConstrainedMajorizationLayout::majlayout( double** Dij, GradientProjection* gp, double* coords, double* b) { - double L_ij,dist_ij,degree; /* compute the vector b */ /* multiply on-the-fly with distance-based laplacian */ for (unsigned i = 0; i < n; i++) { - degree = 0; if(i 1e-30 && Dij[i][j] > 1e-30) { /* skip zero distances */ /* calculate L_ij := w_{ij}*d_{ij}/dist_{ij} */ - L_ij = 1.0 / (dist_ij * Dij[i][j]); + double L_ij = 1.0 / (dist_ij * Dij[i][j]); degree -= L_ij; b[i] += L_ij * coords[j]; } diff --git a/src/libcola/gradient_projection.h b/src/libcola/gradient_projection.h index 8cf45586c..980fa6064 100644 --- a/src/libcola/gradient_projection.h +++ b/src/libcola/gradient_projection.h @@ -25,7 +25,12 @@ typedef std::vector SimpleConstraints; class AlignmentConstraint { friend class GradientProjection; public: - AlignmentConstraint(double pos) : position(pos), variable(NULL) {} + AlignmentConstraint(double pos) : + offsets(), + guide(NULL), + position(pos), + variable(NULL) + {} void updatePosition() { position = variable->position(); } @@ -74,7 +79,21 @@ typedef std::vector > CList; */ class DummyVarPair { public: - DummyVarPair(double desiredDist) : dist(desiredDist), lap2(1.0/(desiredDist*desiredDist)) { } + DummyVarPair(double desiredDist) : + leftof(), + rightof(), + place_l(0), + place_r(0), + dist(desiredDist), + b(0), + left(NULL), + right(NULL), + lap2(1.0/(desiredDist*desiredDist)), + g(0), + old_place_l(0), + old_place_r(0) + {} + CList leftof; // variables to which left dummy var must be to the left of CList rightof; // variables to which right dummy var must be to the right of double place_l; diff --git a/src/libcola/straightener.h b/src/libcola/straightener.h index b1ce665f4..927780140 100644 --- a/src/libcola/straightener.h +++ b/src/libcola/straightener.h @@ -38,7 +38,7 @@ namespace straightener { std::vector dummyNodes; std::vector path; Edge(unsigned id, unsigned start, unsigned end, Route* route) - : id(id), startNode(start), endNode(end), route(route) + : id(id), openInd(0), startNode(start), endNode(end), route(route) { route->boundingBox(xmin,ymin,xmax,ymax); } @@ -98,7 +98,7 @@ namespace straightener { double weight; bool open; Node(unsigned id, vpsc::Rectangle* r) : - id(id),x(r->getCentreX()),y(r->getCentreY()), width(r->width()), height(r->height()), + id(id),x(r->getCentreX()),y(r->getCentreY()), scanpos(0), width(r->width()), height(r->height()), xmin(x-width/2),xmax(x+width/2), ymin(y-height/2),ymax(y+height/2), edge(NULL),dummy(false),weight(-0.1),open(false) { } diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index f7e75a83b..54eff00bc 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -78,11 +78,14 @@ public: XmlSource() : filename(0), encoding(0), - fp(0), + fp(NULL), firstFewLen(0), + LoadEntities(false), + cachedData(), + cachedPos(0), dummy("x"), - instr(0), - gzin(0) + instr(NULL), + gzin(NULL) { for (int k=0;k<4;k++) { @@ -191,7 +194,7 @@ int XmlSource::setFile(char const *filename, bool load_entities=false) buffer[len] = 0; this->cachedData += buffer; } - free(buffer); + delete[] buffer; // Check for SYSTEM or PUBLIC entities and remove them from the cache GMatchInfo *info; -- cgit v1.2.3 From 13eb684248511215a761eaa6dd16bdb7d8b055fa Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Wed, 16 Oct 2013 22:25:04 +0200 Subject: cppcheck: printf variable identifier (bzr r12698) --- src/libuemf/uemf_print.c | 2 +- src/livarot/Shape.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libuemf/uemf_print.c b/src/libuemf/uemf_print.c index b4e1753c6..b7cbf9a14 100644 --- a/src/libuemf/uemf_print.c +++ b/src/libuemf/uemf_print.c @@ -735,7 +735,7 @@ void core10_print(const char *name, const char *contents){ printf(" Points: "); PU_POINT16 papts = (PU_POINT16)((char *)pEmr->aPolyCounts + sizeof(uint32_t)* pEmr->nPolys); for(i=0; icpts; i++){ - printf(" [%d]:",i); point16_print(papts[i]); + printf(" [%u]:",i); point16_print(papts[i]); } printf("\n"); diff --git a/src/livarot/Shape.cpp b/src/livarot/Shape.cpp index 628e0fe9f..ac6c72342 100644 --- a/src/livarot/Shape.cpp +++ b/src/livarot/Shape.cpp @@ -59,10 +59,10 @@ void Shape::Affiche(void) { printf("sh=%p nbPt=%i nbAr=%i\n", this, static_cast(_pts.size()), static_cast(_aretes.size())); // localizing ok for (unsigned int i=0; i<_pts.size(); i++) { - printf("pt %i : x=(%f %f) dI=%i dO=%i\n",i, _pts[i].x[0], _pts[i].x[1], _pts[i].dI, _pts[i].dO); // localizing ok + printf("pt %u : x=(%f %f) dI=%i dO=%i\n",i, _pts[i].x[0], _pts[i].x[1], _pts[i].dI, _pts[i].dO); // localizing ok } for (unsigned int i=0; i<_aretes.size(); i++) { - printf("ar %i : dx=(%f %f) st=%i en=%i\n",i, _aretes[i].dx[0], _aretes[i].dx[1], _aretes[i].st, _aretes[i].en); // localizing ok + printf("ar %u : dx=(%f %f) st=%i en=%i\n",i, _aretes[i].dx[0], _aretes[i].dx[1], _aretes[i].st, _aretes[i].en); // localizing ok } } -- cgit v1.2.3 From 7663b4e9885ff2de00681fb9487abf0a54f83a9d Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Thu, 17 Oct 2013 19:43:23 +0200 Subject: fix wrong memory deallocation (bzr r12699) --- src/libuemf/uemf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libuemf/uemf.c b/src/libuemf/uemf.c index b06990dbd..220c88545 100644 --- a/src/libuemf/uemf.c +++ b/src/libuemf/uemf.c @@ -1371,8 +1371,8 @@ int emf_htable_create( } ehtl->stack = malloc(initsize * sizeof(uint32_t)); if(!ehtl->stack){ - free(ehtl); free(ehtl->table); + free(ehtl); return(5); } memset(ehtl->table , 0, initsize * sizeof(uint32_t)); // zero all slots in the table -- cgit v1.2.3 From ea793393baaaf1e195799618470f0f35b24fb6fe Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Thu, 17 Oct 2013 20:08:10 +0200 Subject: fix memory reallocation (bzr r12700) --- src/libnrtype/TextWrapper.cpp | 84 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/src/libnrtype/TextWrapper.cpp b/src/libnrtype/TextWrapper.cpp index 63af17f2e..32877e275 100644 --- a/src/libnrtype/TextWrapper.cpp +++ b/src/libnrtype/TextWrapper.cpp @@ -107,8 +107,24 @@ void text_wrapper::AppendUTF8(char const *text, int len) /* effic: (Not an issue for the sole caller at the time of writing.) This implementation takes quadratic time if the text is composed of n appends. Use a proper data structure. STL vector would suffice. */ - utf8_text = (char*)realloc(utf8_text, (utf8_length + nlen + 1) * sizeof(char)); - uni32_codepoint = (int*)realloc(uni32_codepoint, (utf8_length + nlen + 1) * sizeof(int)); + char *newdata = static_cast(realloc(utf8_text, (utf8_length + nlen + 1) * sizeof(char))); + if (newdata != NULL) + { + utf8_text = newdata; + } + else + { + g_warning("Failed to reallocate utf8_text"); + } + int* newdata2 = static_cast(realloc(uni32_codepoint, (utf8_length + nlen + 1) * sizeof(int))); + if (newdata2 != NULL) + { + uni32_codepoint = newdata2; + } + else + { + g_warning("Failed to reallocate uni32_codepoint"); + } // copy the source text in the newly lengthened array memcpy(utf8_text + utf8_length, text, nlen * sizeof(char)); @@ -164,11 +180,27 @@ void text_wrapper::AppendUTF8(char const *text, int len) // so setting the dx to 0 is mandatory if ( uni32_length > last_addition ) { if ( kern_x ) { - kern_x = (double*)realloc(kern_x, (uni32_length + 1) * sizeof(double)); + double *newdata = static_cast(realloc(kern_x, (uni32_length + 1) * sizeof(double))); + if (newdata != NULL) + { + kern_x = newdata; + } + else + { + g_warning("Failed to reallocate kern_x"); + } for (int i = last_addition; i <= uni32_length; i++) kern_x[i] = 0; } if ( kern_y ) { - kern_y = (double*)realloc(kern_y, (uni32_length + 1) * sizeof(double)); + double *newdata = static_cast(realloc(kern_y, (uni32_length + 1) * sizeof(double))); + if (newdata != NULL) + { + kern_y = newdata; + } + else + { + g_warning("Failed to reallocate kern_y"); + } for (int i = last_addition; i <= uni32_length; i++) kern_y[i] = 0; } } @@ -214,7 +246,15 @@ void text_wrapper::DoLayout(void) // realloc the structures if ( glyph_length >= max_g ) { max_g = 2 * glyph_length + 1; - glyph_text = (one_glyph*)realloc(glyph_text, (max_g + 1) * sizeof(one_glyph)); + one_glyph *newdata = static_cast(realloc(glyph_text, (max_g + 1) * sizeof(one_glyph))); + if (newdata != NULL) + { + glyph_text = newdata; + } + else + { + g_warning("Failed to reallocate glyph_text"); + } } // fill the glyph info glyph_text[glyph_length].font = pRun->item->analysis.font; @@ -354,7 +394,15 @@ void text_wrapper::ChunkText(void) } while ( n_en < g_en && glyph_text[n_en].font == curPF ); if ( nbBox >= maxBox ) { maxBox = 2 * nbBox + 1; - boxes = (one_box*)realloc(boxes, maxBox * sizeof(one_box)); + one_box *newdata = static_cast(realloc(boxes, maxBox * sizeof(one_box))); + if (newdata != NULL) + { + boxes = newdata; + } + else + { + g_warning("Failed to reallocate boxes"); + } } boxes[nbBox].g_st = n_st; boxes[nbBox].g_en = n_en; @@ -378,7 +426,15 @@ void text_wrapper::ChunkText(void) if ( b_en < nbBox && boxes[b_en].g_en == g_en ) { if ( nbPara >= maxPara ) { maxPara = 2 * nbPara + 1; - paras = (one_para*)realloc(paras, maxPara * sizeof(one_para)); + one_para *newdata = static_cast(realloc(paras, maxPara * sizeof(one_para))); + if (newdata != NULL) + { + paras = newdata; + } + else + { + g_warning("Failed to reallocate paras"); + } } paras[nbPara].b_st = b_st; paras[nbPara].b_en = b_en; @@ -571,7 +627,15 @@ unsigned text_wrapper::AddBoundary(text_boundary const &ib) { if ( nbBound >= maxBound ) { maxBound = 2 * nbBound + 1; - bounds = (text_boundary*)realloc(bounds, maxBound * sizeof(text_boundary)); + text_boundary *newdata = static_cast(realloc(bounds, maxBound * sizeof(text_boundary))); + if (newdata != NULL) + { + bounds = newdata; + } + else + { + g_warning("Failed to reallocate bounds"); + } } unsigned const ix = nbBound++; bounds[ix] = ib; @@ -893,7 +957,7 @@ void text_wrapper::AddDxDy(void) } else if ( l_pos > n_pos ) { for (int j = l_pos; j > n_pos; j--) sum -= kern_x[j]; } - l_pos = n_pos; + // l_pos = n_pos; glyph_text[glyph_length].x += sum; } } @@ -918,7 +982,7 @@ void text_wrapper::AddDxDy(void) } else if ( l_pos > n_pos ) { for (int j = l_pos; j > n_pos; j--) sum -= kern_y[j]; } - l_pos = n_pos; + // l_pos = n_pos; glyph_text[glyph_length].y += sum; } } -- cgit v1.2.3