From e6b6bdc0b80abc4d64ebd410ef90fee88a0778d1 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sun, 18 Oct 2020 17:38:44 +0100 Subject: [PATCH] Fixed line spacing not being consistent when changing fonts --- Data/Scripts/009_Objects and windows/010_DrawText.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Data/Scripts/009_Objects and windows/010_DrawText.rb b/Data/Scripts/009_Objects and windows/010_DrawText.rb index 42b581cdd..ca4c8bf8d 100644 --- a/Data/Scripts/009_Objects and windows/010_DrawText.rb +++ b/Data/Scripts/009_Objects and windows/010_DrawText.rb @@ -927,13 +927,13 @@ def getLineBrokenChunks(bitmap,value,width,dims,plain=false) minTextSize=bitmap.text_size(word.gsub(/\s*/,"")) if x>0 && x+minTextSize.width>width x=0 -# y+=32 # (textheight==0) ? bitmap.text_size("X").height : textheight - y+=(textheight==0) ? bitmap.text_size("X").height+1 : textheight + y+=32 # (textheight==0) ? bitmap.text_size("X").height : textheight +# y+=(textheight==0) ? bitmap.text_size("X").height+1 : textheight textheight=0 end end -# textheight=32 # [textheight,textSize.height].max - textheight=[textheight,textSize.height+1].max + textheight=32 # [textheight,textSize.height].max +# textheight=[textheight,textSize.height+1].max ret.push([word,x,y,textwidth,textheight,color]) x+=textwidth dims[0]=x if dims && dims[0]