Merge branch 'master' into jgrpp

# Conflicts:
#	src/cheat_gui.cpp
#	src/main_gui.cpp
#	src/network/network_gui.cpp
#	src/saveload/saveload.h
#	src/smallmap_gui.cpp
#	src/station_cmd.cpp
#	src/timetable_cmd.cpp
#	src/toolbar_gui.cpp
#	src/widget.cpp
#	src/widget_type.h
#	src/widgets/dropdown_type.h
This commit is contained in:
Jonathan G Rennison
2023-11-25 14:02:04 +00:00
100 changed files with 450 additions and 655 deletions

View File

@@ -557,7 +557,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
* another size would be chosen it won't have truncated too little for
* the truncation dots.
*/
FontCache *fc = ((const Font*)line.GetVisualRun(0).GetFont())->fc;
FontCache *fc = line.GetVisualRun(0).GetFont()->fc;
GlyphID dot_glyph = fc->MapCharToGlyph('.');
dot_width = fc->GetGlyphWidth(dot_glyph);
dot_sprite = fc->GetGlyph(dot_glyph);
@@ -608,7 +608,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
bool draw_shadow = false;
for (int run_index = 0; run_index < line.CountRuns(); run_index++) {
const ParagraphLayouter::VisualRun &run = line.GetVisualRun(run_index);
const Font *f = (const Font*)run.GetFont();
const Font *f = run.GetFont();
FontCache *fc = f->fc;
colour = f->colour;