if (x + advance/2 > length) { cp[i].draw = PR_FALSE; continue; }
if (x + advance/2 > length) break;
nsSVGGlyphFrame::GetCharacterPosition(nsSVGCharacterPosition **aCharacterPosition){  *aCharacterPosition = nsnull;  nsISVGPathFlatten *textPath = nsnull;  /* check if we're the child of a textPath */  for (nsIFrame *frame = this; frame != nsnull; frame = frame->GetParent())    if (frame->GetType() == nsLayoutAtoms::svgTextPathFrame) {      frame->QueryInterface(NS_GET_IID(nsISVGPathFlatten), (void **)&textPath);      break;    }  /* we're an ordinary fragment - return */  /* XXX: we might want to use this for individual x/y/dx/dy adjustment */  if (!textPath)    return NS_OK;  nsSVGPathData *data;  textPath->GetFlattenedPath(&data);  /* textPath frame, but invalid target */  if (!data)    return NS_ERROR_FAILURE;  float length = data->Length();  PRUint32 strLength = mCharacterData.Length();  nsSVGCharacterPosition *cp = new nsSVGCharacterPosition[strLength];  float x = mX;  for (PRUint32 i = 0; i < strLength; i++) {    float advance;    mMetrics->GetAdvanceOfChar(i, &advance);    if (x + advance/2 > length) {      cp[i].draw = PR_FALSE;      continue;    }    if (x + advance/2 < 0.0f)      cp[i].draw = PR_FALSE;    else {      cp[i].draw = PR_TRUE;      // add y (normal)      // add rotation      // move point back along tangent      FindPoint(data, x, mY, advance, &(cp[i]));    }    x += advance;  }  *aCharacterPosition = cp;  delete data;  return NS_OK;}