mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixed line spacing not being consistent when changing fonts
This commit is contained in:
@@ -927,13 +927,13 @@ def getLineBrokenChunks(bitmap,value,width,dims,plain=false)
|
|||||||
minTextSize=bitmap.text_size(word.gsub(/\s*/,""))
|
minTextSize=bitmap.text_size(word.gsub(/\s*/,""))
|
||||||
if x>0 && x+minTextSize.width>width
|
if x>0 && x+minTextSize.width>width
|
||||||
x=0
|
x=0
|
||||||
# y+=32 # (textheight==0) ? bitmap.text_size("X").height : textheight
|
y+=32 # (textheight==0) ? bitmap.text_size("X").height : textheight
|
||||||
y+=(textheight==0) ? bitmap.text_size("X").height+1 : textheight
|
# y+=(textheight==0) ? bitmap.text_size("X").height+1 : textheight
|
||||||
textheight=0
|
textheight=0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# textheight=32 # [textheight,textSize.height].max
|
textheight=32 # [textheight,textSize.height].max
|
||||||
textheight=[textheight,textSize.height+1].max
|
# textheight=[textheight,textSize.height+1].max
|
||||||
ret.push([word,x,y,textwidth,textheight,color])
|
ret.push([word,x,y,textwidth,textheight,color])
|
||||||
x+=textwidth
|
x+=textwidth
|
||||||
dims[0]=x if dims && dims[0]<x
|
dims[0]=x if dims && dims[0]<x
|
||||||
|
|||||||
Reference in New Issue
Block a user