Skip to content

Commit de5bdc0

Browse files
author
Fraser Gordon
committed
Fixes to Linux-specific portions of the engine
1 parent 72f15b4 commit de5bdc0

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

engine/src/customprinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ void MCCustomMetaContext::dotextmark(MCMark *p_mark)
10321032
extern MCFontlist *MCFontlistGetCurrent(void);
10331033
const char *t_name;
10341034
uint2 t_size, t_style;
1035-
MCFontlistGetCurrent() -> getfontreqs(p_mark -> text . font, t_name, t_size, t_style);
1035+
MCFontlistGetCurrent() -> getfontreqs(f, t_name, t_size, t_style);
10361036
t_state . font_size = t_size;
10371037
#endif
10381038

engine/src/lnxpsprinter.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ void MCPSMetaContext::drawtext(MCMark * p_mark )
12181218
uint4 x = p_mark -> text . position . x ;
12191219
uint4 y = p_mark -> text . position . y ;
12201220
uint2 l = p_mark -> text . length ;
1221-
MCFontStruct *f = p_mark -> text . font ;
1221+
MCFontStruct *f = MCFontGetFontStruct(p_mark -> text . font);
12221222

12231223
if ( f != oldfont )
12241224
{
@@ -1233,8 +1233,7 @@ void MCPSMetaContext::drawtext(MCMark * p_mark )
12331233
char *text = new char[l + 1];
12341234
memcpy(text, p_mark -> text . data , l);
12351235

1236-
uint2 w = MCscreen->textwidth(f, text, l);
1237-
1236+
uint2 w = MCFontMeasureText(p_mark -> text . font, text, l, false);
12381237

12391238
text[l] = '\0';
12401239
const char *sptr = text;

0 commit comments

Comments
 (0)