# HG changeset patch # User nemo # Date 1266817829 0 # Node ID 75f18393d70addc6bd559c8186fabcdb2412936c # Parent 03d6a304a8e0095b6fe810c53d4c06beb2533f13 Check the right midpoint font diff -r 03d6a304a8e0 -r 75f18393d70a hedgewars/uStore.pas --- a/hedgewars/uStore.pas Mon Feb 22 05:41:25 2010 +0000 +++ b/hedgewars/uStore.pas Mon Feb 22 05:50:29 2010 +0000 @@ -807,7 +807,7 @@ u: WideChar; tmpstr: array[0..256] of WideChar; begin -if font >= CJKfntSmall then exit(font); +if (font >= CJKfnt16) or (length(s) = 0) then exit(font); l:= Utf8ToUnicode(@tmpstr, Str2PChar(s), length(s))-1; i:= 0; @@ -1360,15 +1360,15 @@ wa, ha: LongInt; tmpline, tmpline2, tmpdesc: shortstring; begin +// make sure there is a caption as well as a sub caption - description is optional +if caption = '' then caption:= '???'; +if subcaption = '' then subcaption:= ' '; + font:= CheckCJKFont(caption,fnt16); font:= CheckCJKFont(subcaption,font); font:= CheckCJKFont(description,font); font:= CheckCJKFont(extra,font); -// make sure there is a caption as well as a sub caption - description is optional -if caption = '' then caption:= '???'; -if subcaption = '' then subcaption:= ' '; - w:= 0; h:= 0; wa:= FontBorder * 2 + 4;