增加对空格的处理

master
Matthew 11 months ago
parent 1cec8c6ec8
commit 94387ff96e

@ -354,7 +354,18 @@ namespace cv {
mvFn(NULL, (void*)userData);
// Update current position ( in FreeType coordinates )
#if defined(USING_HB)
currentPos.x += mFace->glyph->advance.x;
#else
if (wstr[i] == ' ')
{
currentPos.x += mFace->glyph->advance.x << 1;
}
else
{
currentPos.x += mFace->glyph->advance.x;
}
#endif
currentPos.y += mFace->glyph->advance.y;
}
delete userData;
@ -1036,7 +1047,19 @@ namespace cv {
(this->*putPixel)(dst, gPos.y + row, gPos.x + col, _colorUC8n, cl);
}
}
_org.x += (mFace->glyph->advance.x) >> 6;
#if defined(USING_HB)
_org.x += (mFace->glyph->advance.x) >> 6;
#else
if (wstr[i] == ' ')
{
_org.x += ((mFace->glyph->advance.x) >> 6) << 1;
}
else
{
_org.x += (mFace->glyph->advance.x) >> 6;
}
#endif
_org.y += (mFace->glyph->advance.y) >> 6;
}

Loading…
Cancel
Save