summaryrefslogtreecommitdiff
path: root/fxbarcode
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode')
-rw-r--r--fxbarcode/oned/BC_OneDimWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fxbarcode/oned/BC_OneDimWriter.cpp b/fxbarcode/oned/BC_OneDimWriter.cpp
index 0fa23bb91e..040257b425 100644
--- a/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -142,9 +142,9 @@ void CBC_OneDimWriter::CalcTextInfo(const ByteString& text,
float charWidth = 0;
for (size_t j = 0; j < length; j++) {
pCharCode[j] = encoding->CharCodeFromUnicode(text[j]);
- int32_t glyp_code = encoding->GlyphFromCharCode(pCharCode[j]);
- int32_t glyp_value = cFont->GetGlyphWidth(glyp_code);
- float temp = (float)((glyp_value)*fontSize / 1000.0);
+ int32_t glyph_code = encoding->GlyphFromCharCode(pCharCode[j]);
+ uint32_t glyph_value = cFont->GetGlyphWidth(glyph_code);
+ float temp = glyph_value * fontSize / 1000.0;
charWidth += temp;
}
charsLen = charWidth;