mirror of https://github.com/OpenTTD/OpenTTD
(svn r26037) -Fix (r26036): there was a reason they weren't references...
parent
a36fb735c0
commit
5b3d3b7240
|
@ -653,6 +653,9 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
|
||||||
} else {
|
} else {
|
||||||
/* Line is new, layout it */
|
/* Line is new, layout it */
|
||||||
#ifdef WITH_ICU
|
#ifdef WITH_ICU
|
||||||
|
FontState old_state = state;
|
||||||
|
const char *old_str = str;
|
||||||
|
|
||||||
GetLayouter<ICUParagraphLayout>(line, str, state);
|
GetLayouter<ICUParagraphLayout>(line, str, state);
|
||||||
if (line.layout == NULL) {
|
if (line.layout == NULL) {
|
||||||
static bool warned = false;
|
static bool warned = false;
|
||||||
|
@ -660,6 +663,9 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
|
||||||
DEBUG(misc, 0, "ICU layouter bailed on the font. Falling back to the fallback layouter");
|
DEBUG(misc, 0, "ICU layouter bailed on the font. Falling back to the fallback layouter");
|
||||||
warned = true;
|
warned = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state = old_state;
|
||||||
|
str = old_str;
|
||||||
GetLayouter<FallbackParagraphLayout>(line, str, state);
|
GetLayouter<FallbackParagraphLayout>(line, str, state);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue