Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Std r11091 aliasing fonts #664

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3d492d0
ADD: Aliasing fonts, but default font loading still broken
prissi Mar 17, 2024
194305c
FIX: start also with a wrong unloadable font specified
prissi Mar 20, 2024
8cdc75e
CHG: Almost impossible to have a language selected with a non-matchin…
prissi Mar 20, 2024
6c53d5c
FIX: default char for cyr.bdf and revision detection fpor MSVC
prissi Mar 20, 2024
277e8bc
UPDATE standard version and cherry-picked-commits text
Ranran-the-JuicyPork Apr 3, 2024
27d4f3d
Merge remote-tracking branch 'refs/remotes/origin/2403-std' into std-…
Ranran-the-JuicyPork Apr 3, 2024
51b6167
FIX: merging conflict
Ranran-the-JuicyPork Apr 3, 2024
335fd1f
Forgot to update file related to r11028
Ranran-the-JuicyPork Apr 3, 2024
5d04046
Fix: Font selection dialogue shown even for headless server
ceeac Apr 6, 2024
9b7d8b6
Merge remote-tracking branch 'refs/remotes/origin/std-r10996' into st…
Ranran-the-JuicyPork Apr 8, 2024
7ebb547
ADD: function find backend specific default TTF font dr_get_system_fo…
prissi Jun 4, 2023
4c77f96
FIX: actually return anything ...
prissi Jun 4, 2023
e3cda35
FIX: Crash when trying to load TTF font without family or style name
ceeac Jun 11, 2023
d2eebb0
Display only family name if TTF font has no style name
ceeac Jun 11, 2023
9584db3
dr_mkdir now makes directories recusively
prissi Jan 20, 2024
8f24f0f
FIX: Height conversion mode ignored if selected after heightmap
ceeac Mar 2, 2024
c0763bc
Completion of missing change in r11091
Ranran-the-JuicyPork Apr 9, 2024
0d56839
Completion of missing change in r11093
Ranran-the-JuicyPork Apr 9, 2024
6de1cb3
Completion of change in r11102
Ranran-the-JuicyPork Apr 9, 2024
c7f8c50
Remove superfluous newline from makeobj log message
ceeac Apr 2, 2024
7752e5a
CODE: Const correctness
ceeac Apr 2, 2024
32bf00f
Update cherry-picked-commits.txt
Ranran-the-JuicyPork Apr 9, 2024
f6bc466
run ./cleanup_code.sh
Ranran-the-JuicyPork Apr 9, 2024
b9cd1c7
CHG: Since we need anyway a wide string, jus use the windows font to …
prissi Apr 9, 2024
c4ee63c
Allow also for C++20 standard compilation
prissi Apr 9, 2024
0fc02ab
CHG: Fit roundbox to large font
Ranran-the-JuicyPork Apr 27, 2024
4b9a818
Merge remote-tracking branch 'refs/remotes/origin/std-r10996' into st…
Ranran-the-JuicyPork May 1, 2024
7bcdccb
Merge remote-tracking branch 'refs/remotes/origin/std-r10996' into st…
Ranran-the-JuicyPork May 13, 2024
39451cb
Merge remote-tracking branch 'refs/remotes/origin/std-r10996' into st…
Ranran-the-JuicyPork May 26, 2024
fb62b13
Merge remote-tracking branch 'refs/remotes/jamespetts/master' into st…
Ranran-the-JuicyPork Jun 2, 2024
32e64cc
CODE: standard's format
Ranran-the-JuicyPork Jun 1, 2024
2db287c
Silence compiler warnings
ceeac May 4, 2024
0216d17
CODE: remove unused parameter
Dwachs Dec 3, 2022
e8447ed
CODE: standard format
Ranran-the-JuicyPork Jun 1, 2024
c06ff41
FIX: call init/work directly if call is network-safe or call is not d…
Dwachs Dec 3, 2022
d6f471b
CODE: remove meaningless code
Ranran-the-JuicyPork Jun 2, 2024
d948922
CHG: Nickname input location
Ranran-the-JuicyPork Jun 2, 2024
f3a21a2
FIX: layout issue
Ranran-the-JuicyPork Jun 3, 2024
29dd94f
(ranran) remove undefined declaration
prissi Jun 2, 2024
d9e77d4
Update cherry-picked-commits.txt
Ranran-the-JuicyPork Jun 3, 2024
5c1ff0a
include link for ftbitmap
Ranran-the-JuicyPork Jun 4, 2024
599cf2b
FIX: compile error on Linux/Mac
Ranran-the-JuicyPork Jun 4, 2024
4b1d865
CHG: remove magic offset for display_outline_proportional_rgb, and fa…
prissi Sep 8, 2021
25e3e0a
FIX: width of tooltip boxes
prissi Sep 13, 2021
d710971
FIX: Additional fixes for r10106
Ranran-the-JuicyPork Jun 8, 2024
2e42c22
(HJ) Nicer borders around labels
prissi Mar 5, 2022
236e77a
CHG: fix for r10534. Station label sample exceeds component height
Ranran-the-JuicyPork Jun 8, 2024
4b6c12f
FIX: Label colours when label is unowned
ceeac Nov 8, 2023
9a8221f
CODE: same formatting with standard
Ranran-the-JuicyPork Jun 8, 2024
2bab711
FIX: [depot dialog] Addressing the negative impact of the new font sy…
Ranran-the-JuicyPork Jun 9, 2024
522b69d
Cleaned up personal settings in msvc project
Ranran-the-JuicyPork Jun 16, 2024
20db861
CODE: same format with standard
Ranran-the-JuicyPork Jun 17, 2024
c65ba11
ADD: function find backend specific default TTF font dr_get_system_fo…
prissi Jun 4, 2023
338c834
CHG: Increase the default font size from 11 to 12
Ranran-the-JuicyPork Jun 23, 2024
858623f
CODE: same formatting with standard
Ranran-the-JuicyPork Jun 8, 2024
f0a7e31
FIX: Some fonts do not fit the line height
Ranran-the-JuicyPork Jun 29, 2024
c76bbcd
CHG: Vehicle bar size based on font size
Ranran-the-JuicyPork Jun 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 39 additions & 44 deletions Simutrans-Extended.vcxproj

Large diffs are not rendered by default.

26 changes: 17 additions & 9 deletions boden/grund.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1817,17 +1817,25 @@ void display_text_label(sint16 xpos, sint16 ypos, const char* text, const player
{
sint16 pc = player ? player->get_player_color1()+4 : SYSCOL_TEXT_HIGHLIGHT;
switch( env_t::show_names >> 2 ) {
case 0:
display_ddd_proportional_clip( xpos, ypos, proportional_string_width(text)+7, 0, color_idx_to_rgb(pc), color_idx_to_rgb(COL_BLACK), text, dirty );
case 0: {
const PIXVAL bg_color = player ? color_idx_to_rgb(player->get_player_color1()+4) : SYSCOL_TEXT_HIGHLIGHT;
display_ddd_proportional_clip( xpos, ypos, bg_color, color_idx_to_rgb(COL_BLACK), text, dirty );
break;
case 1:
display_outline_proportional_rgb( xpos, ypos-(LINESPACE/2), color_idx_to_rgb(pc+3), color_idx_to_rgb(COL_BLACK), text, dirty );
}
case 1: {
const PIXVAL text_color = player ? color_idx_to_rgb(player->get_player_color1()+7) : SYSCOL_TEXT_HIGHLIGHT;
display_outline_proportional_rgb( xpos, ypos, text_color, color_idx_to_rgb(COL_BLACK), text, dirty );
break;
case 2:
display_outline_proportional_rgb( xpos + LINESPACE + D_H_SPACE, ypos-(LINESPACE/4), color_idx_to_rgb(COL_YELLOW), color_idx_to_rgb(COL_BLACK), text, dirty );
display_ddd_box_clip_rgb( xpos, ypos-(LINESPACE/2), LINESPACE, LINESPACE, color_idx_to_rgb(pc-2), PLAYER_FLAG|color_idx_to_rgb(pc+2) );
display_fillbox_wh_rgb( xpos+1, ypos-(LINESPACE/2)+1, LINESPACE-2, LINESPACE-2, color_idx_to_rgb(pc), dirty );
}
case 2: {
const PIXVAL dark = player ? color_idx_to_rgb(player->get_player_color1()+2) : SYSCOL_TEXT_HIGHLIGHT;
const PIXVAL normal = player ? color_idx_to_rgb(player->get_player_color1()+4) : SYSCOL_TEXT_HIGHLIGHT;
const PIXVAL bright = player ? color_idx_to_rgb(player->get_player_color1()+6) : SYSCOL_TEXT_HIGHLIGHT;
display_outline_proportional_rgb( xpos + LINESPACE + D_H_SPACE, ypos, color_idx_to_rgb(COL_YELLOW), color_idx_to_rgb(COL_BLACK), text, dirty );
display_ddd_box_clip_rgb( xpos, ypos, LINESPACE, LINESPACE, dark, PLAYER_FLAG|bright );
display_fillbox_wh_rgb( xpos+1, ypos+1, LINESPACE-2, LINESPACE-2, normal, dirty );
break;
}
}
}

Expand Down Expand Up @@ -1860,7 +1868,7 @@ void grund_t::display_overlay(const sint16 xpos, const sint16 ypos)
}
}

if( env_t::show_factory_storage_bar ) {
if( env_t::show_factory_storage_bar ) {
if( get_building() ) {
if( env_t::show_factory_storage_bar == 1 || get_building()->get_first_tile()==get_building() ) {
if (fabrik_t *fab = get_building()->get_first_tile()->get_fabrik()) {
Expand Down
10 changes: 5 additions & 5 deletions dataobj/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,12 @@ uint8 env_t::gui_player_color_dark = 1;
uint8 env_t::gui_player_color_bright = 4;
uint8 env_t::gui_titlebar_player_color_background_brightness;

#ifndef __ANDROID__
std::string env_t::fontname = FONT_PATH_X "prop.fnt";
uint8 env_t::fontsize = 11;
#else
std::string env_t::fontname = FONT_PATH_X "Roboto-Regular.ttf";
#ifdef __ANDROID__
uint8 env_t::fontsize = 17;
#else
uint8 env_t::fontsize = 12;
#endif
std::string env_t::fontname;

rgb888_t env_t::front_window_text_color_rgb;
PIXVAL env_t::front_window_text_color;
Expand All @@ -218,6 +217,7 @@ bool env_t::hide_keyboard = false;
// Define default settings.
void env_t::init()
{
fontname = dr_get_system_font();
// settings for messages
message_flags[0] = 0x017F;
message_flags[1] = 0x0108;
Expand Down
2 changes: 1 addition & 1 deletion dataobj/tabfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ bool tabfile_t::read(tabfileobj_t &objinfo, FILE *fp)
strcpy(delim_expand, delim);
}

dbg->message("tabfile_t::read", "Parameter expansion %s = %s\n", line_expand, delim_expand);
dbg->message("tabfile_t::read", "Parameter expansion: %s = %s", line_expand, delim_expand);
objinfo.put(line_expand, delim_expand);
if (fp != NULL) {
fprintf(fp, "%s=%s\n", line_expand, delim_expand);
Expand Down
Loading
Loading