- made adjustments to the text placement on the summary screen.
With extended fonts much of the old code did not work anymore, this needed more precise checks for the sources of the printed texts.
This commit is contained in:
parent
370f5ef234
commit
c36dc137ba
5 changed files with 122 additions and 23 deletions
|
|
@ -2032,6 +2032,19 @@ DEFINE_ACTION_FUNCTION_NATIVE(FFont, StringWidth, StringWidth)
|
|||
ACTION_RETURN_INT(StringWidth(self, str));
|
||||
}
|
||||
|
||||
static int GetMaxAscender(FFont* font, const FString& str)
|
||||
{
|
||||
const char* txt = str[0] == '$' ? GStrings(&str[1]) : str.GetChars();
|
||||
return font->GetMaxAscender(txt);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetMaxAscender, GetMaxAscender)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
||||
PARAM_STRING(str);
|
||||
ACTION_RETURN_INT(GetMaxAscender(self, str));
|
||||
}
|
||||
|
||||
static int CanPrint(FFont *font, const FString &str)
|
||||
{
|
||||
const char *txt = str[0] == '$' ? GStrings(&str[1]) : str.GetChars();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue