From 5be3b8260cf47b3a88a3b8532b37b9f9cf3692af Mon Sep 17 00:00:00 2001 From: frto027 <602706150@qq.com> Date: Sun, 6 Jun 2021 11:37:06 +0800 Subject: [PATCH] Fixed the rendering width of text that containing inline icons --- eid_api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eid_api.lua b/eid_api.lua index e0a90c3c..9b2766c8 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -715,7 +715,7 @@ function EID:renderString(str, position, scale, kcolor) local strFiltered, spriteTable = EID:filterIconMarkup(textPart[1], position.X, position.Y) EID:renderInlineIcons(spriteTable, position.X + offsetX, position.Y) EID.font:DrawStringScaledUTF8(strFiltered, position.X + offsetX, position.Y, scale.X, scale.Y, textPart[2], 0, false) - offsetX = offsetX + textPart[3] + offsetX = offsetX + EID:getStrWidth(strFiltered) end return textPartsTable[#textPartsTable][2] end