Patric Stout
cd751a598a
Fix: Wayland crash on startup due to Pango also using FontConfig ( #10916 )
...
Basically, we haven't been a good neighbour. Turns out you shouldn't
actually call FcFini when you are done, as some library might still
want to use FontConfig. And they use a shared instance for their
administration.
The idea is that you call FcInit once, and use FcConfigReference
after that to get an instance, you can release. This entry is
ref-counted, and things happen automatically based on that.
At least, I think.
1 year ago
Patric Stout
21adfa7567
Fix: track "memory installed" for surveys less precisely ( #10910 )
...
It turns out, for Windows and Linux having the exact memory allows
for easy tracing of an individual. That is exactly against the idea
of the survey. And honestly, we don't need this precision.
1 year ago
Rubidium
d68b5c9162
Codechange: replace buffer + strecpy with std::string for getting clipboard contents
1 year ago
Rubidium
324c43eeb2
Codechange: let FiosGetDiskFreeSpace only return disk space and split FiosGetCurrentPath off
1 year ago
Rubidium
f2e704b9a7
Codechange: use std::string for FiosIsRoot
1 year ago
Rubidium
13789d1703
Codechange: use std::string for FiosIsValidFile
1 year ago
PeterN
d086f288cd
Codechange: Remove duplicated includes. ( #10888 )
...
These are now included by stdafx.h so don't need to be included again.
1 year ago
Peter Nelson
9976293c1e
Codechange: Return fontcache font name as std::string.
1 year ago
PeterN
876871157f
Fix: Ask FontConfig for the face index when opening fonts. ( #10878 )
...
This allows selection of the correct face in truetype fonts containing
multiple faces.
1 year ago
Rubidium
30b9e02dd9
Codechange: replace crashlog filenames with std::string in Crashlog
1 year ago
Rubidium
19304bd3d5
Codechange: replace seprintf with fmt::format for filling the crash log data
1 year ago
Rubidium
6f2f38b3ed
Codechange: fmt (and std::format) do explicitly not support enums out-of-the-box
...
That it works for the version we have packaged it pure coincidence, as that is
one of the few versions that due to a bug allow it. So add the appropriate
template specialisations to support it out-of-the-box within OpenTTD.
1 year ago
Rubidium
275ebf4509
Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*>
1 year ago
Rubidium
c518293135
Codechange: replace printf with fmt::print
1 year ago
Patric Stout
0850193a38
Fix: survey result on crash only worked on Linux ( #10855 )
...
Every OS-specific crashlog handler has their own MakeCrashLog
in some form. In result, only Linux was calling the generic one.
1 year ago
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
1 year ago
Peter Nelson
56085be9bd
Codechange: Move includes for common STL headers to stdafx.
1 year ago
Patric Stout
7634553d22
Feature: opt-in survey when exiting a game
...
On first start-up, the game will ask if you want to participate
in our automated survey. You have to opt-in, and can easily opt-out
(via the Options) at any time.
When opt-in, whenever you exit a game, a JSON blob will be send
to the survey server hosted by OpenTTD. This JSON blob contains
information that gives a global picture of the game just played:
- What settings were used
- How many humans vs AIs
- How long the game has been played
- Basic information about the OS / CPU
All this information is kept very generic, so there is no
chance we send private information to our survey server.
Nothing in the JSON blob could identify you as a person; it
mostly tells about the game played. At any time you can see
what the JSON blob includes, by pressing the "Preview Survey
Results" button in-game.
1 year ago
Rubidium
68ff3fd062
Change: include fmt.h C++ headers in stdafx.h
...
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Michael Lutz
b14c5aff1f
Fix: [Win32] Text line breaking did not properly handle punctuation characters. ( #10775 )
1 year ago
Peter Nelson
00bf42353a
Codechange: Place gamelog into its own class, along with internal data.
...
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
1 year ago
Michael Lutz
908be59699
Fix: [Win32] Wrong multi-line text layout due to incorrect whitespace handling.
1 year ago
Michael Lutz
715234502c
Fix: Typo in variable name.
1 year ago
Rubidium
3a822fcd01
Codechange: Make FiosItem's name and title std::string
1 year ago
Rubidium
c829930440
Codechange: replace strnatcmp with C++ string capable version
1 year ago
Rubidium
df19673fbd
Codechange: let convert_to_fs accept std::string
1 year ago
Rubidium
4dd5f994be
Codechange: replace strncasecmp with case ignoring variant of StrStarts/EndsWith
1 year ago
Rubidium
86786a7af6
Codechange: introduce StrEqualsIgnoreCase/StrCompareIgnoreCase to replace strcasecmp
1 year ago
Rubidium
f74e26ca7e
Codechange: replace error/usererror printf variant with fmt variant and rename
1 year ago
Rubidium
f5f6306af3
Codechange: use string/fmt instead of printf for ShowInfo(F)
1 year ago
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Rubidium
9b56505fec
Codechange: split building into a library and executable
1 year ago
Rubidium
9e89eb5726
Codechange: move main function(s) to separate files
1 year ago
Charles Pigott
6fc28d649e
Cleanup: Unused alloca definitions and includes
1 year ago
Charles Pigott
b282664242
Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives
1 year ago
PeterN
2376112c77
Fix #10477 : Not enough space for text due to rounding down (OSX) ( #10489 )
2 years ago
Rubidium
d51d08ddcb
Codechange: put stack variables in global variables for gamelog/crashlog
2 years ago
Peter Nelson
8149ba338f
Change: Check glyph size before trying to render it.
...
This change of order ensures that the "Font glyph is foot large" occurs
even if the glyph is too large for an alloca() allocation.
2 years ago
Peter Nelson
fa0c67b10a
Change: Remove guess-work from calls to GetGlyphOutline().
...
This API method is intended to be called twice, so don't attempt to guess
the required size.
2 years ago
Peter Nelson
5370e910d3
Change: Use std::vector for fallback font list.
2 years ago
Rubidium
b951332def
Codechange: use smart pointers when creating StringIterators
2 years ago
Rubidium
752cd5c0da
Cleanup 84b71f7: remove G5 detector as it's not referenced anymore
...
The last supported Mac OS X for G5 is 10.5.8 and support for < 10.7 has already been removed.
2 years ago
glx22
e6c857cdba
Codechange: [windows] cache the actually loaded font name
2 years ago
glx22
af3df959c2
Codechange: reduce code duplication
2 years ago
Peter Nelson
daaa058493
Change: Vertically centre sprite font relative to TrueType font.
2 years ago
Peter Nelson
8599041ce4
Fix: GetDefaultFontHeight() is static, don't use ->
2 years ago
Peter Nelson
9666e46739
Feature: Variable GUI scale.
...
GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
2 years ago
Peter Nelson
062ea68422
Change: Scale position of font shadow.
2 years ago
Peter Nelson
2cdd8b7429
Change: Separate fontcache implementations.
2 years ago
Peter Nelson
f6ad8e1c9c
Change: Rename some freetype things to fontcache.
...
The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.
This now uses more suitable terms.
2 years ago
Peter Nelson
273988551d
Fix: font_win32.cpp compile failure with WITH_FREETYPE
2 years ago
glx22
b6c5f49379
Change: add a timestamp in name of crash files
3 years ago
Danny de Bruijne
753b1d7e15
Feature: Add selected toolbar buttons to MacBook Pro Touch Bar
3 years ago
Patric Stout
eca73a810c
Change: rebrand 1.12.0 to 12.0
...
One question that keeps popping up: "when do we release 2.0?".
NewGRF will force that at least 1.16 will be 2.0, but to not wait
for this, let's drop the "1." and be for ever done with that
conversation.
We are following in the footstep of giants here.
3 years ago
glx22
16abdd5254
Change: [Win32] Set the console codepage to UTF-8
3 years ago
Michael Lutz
0d5d3083bd
Codechange: [OSX] Use more exact enum names where introduced with the 10.12 SDK.
...
The enum values still have the exact same numerical values, but the 10.12
SDK introduced more explicit names (e.g. like NSEventTypeApplicationDefined
instead of NSApplicationDefined) for several enum constants.
Use them when available.
3 years ago
Rubidium
f904aef176
Cleanup: use nullptr instead of 0 or NULL
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
glx22
744a9e4745
Codechange: [WIN32] Add a wrapper around GetProcAddress()
3 years ago
glx22
15f66329c2
Fix: [MinGW] Silence 2 cast warnings
3 years ago
glx22
b7250a42e1
Fix: [MinGW32] Linking error
3 years ago
glx22
3ca0239985
Fix: [MinGW32] SHGFP_TYPE_CURRENT is now present in win32api
3 years ago
glx22
5d05c4919b
Codechange: [WIN32] Reduce manual dynamic loading as WinXP is the minimum version
3 years ago
glx22
f4c7d5577e
Codechange: [WIN32] Use VersionHelpers where appropriate
3 years ago
Patric Stout
bcd7a7aafe
Codechange: rename _SQ64 into POINTER_IS_64BIT ( #9313 )
3 years ago
Patric Stout
ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) ( #9304 )
...
This to be more explicit the function changes the value, and not
returns yes/no.
3 years ago
rubidium42
77330d09fd
Codechange: move font settings to std::string
3 years ago
PeterN
f018471b36
Cleanup: Remove old FiosList helper methods. ( #9139 )
3 years ago
Loïc Guilloux
d4f0b6f434
Fix: [CMake] Auto-fill version details in rev.cpp and ottres.rc ( #9066 )
3 years ago
PeterN
56f982fa7f
Fix #9015 : Don't set free space value if not requested. ( #9016 )
4 years ago
Niels Martin Hansen
c800dcaff8
Fix: [Win32] Font glyphs of certain widths broke
...
Font glyphs between 33 and 39 pixels wide, in the Win32 font system, used wrong alignment and caused glyphs to appear broken.
When in the 33 to 39 pixel range, glyphs without AA were rounded down to 32 pixel pitch, instead of up to 64 pixel pitch.
4 years ago
Wim Leflere
5233fd2751
Change: [win32] Use user UI language for initial language selection ( #8973 ) ( #8974 )
4 years ago
Niels Martin Hansen
746f1ca11a
Codechange: Remove the now meaningless console_cp parameter from OTTD2FS
4 years ago
Niels Martin Hansen
e0561dbded
Fix #8713 : Change OTTD2FS and FS2OTTD to return string objects instead of static buffers
4 years ago
Michael Lutz
13011e00c6
Fix #8860 : [Win32] Crashlog window wasn't reliably shown for crashes not on the main thread.
4 years ago
Niels Martin Hansen
cc465efa67
Change: [Win32] Use more modern way of getting free disk space
4 years ago
Niels Martin Hansen
b427ddce88
Codechange: Switch to explicit wide strings
4 years ago
Niels Martin Hansen
beeb9e0a1b
Remove: [Win32] Last pretenses of being able to build for Windows 95
4 years ago
Michael Lutz
6776229047
Codechange: Make the simple Malloc sprite allocator globally usable.
4 years ago
Michael Lutz
70aa3b4011
Codechange: Give sprite encoders a hint which colour components of a sprite are filled with useful information.
4 years ago
Michael Lutz
ef478ade64
Add: [Win32] Video driver that uses OpenGL to transfer the video buffer to the screen.
4 years ago
Michael Lutz
b66e977acd
Change: [OSX] When auto-detecting a font, try for sans-serif first.
...
On a display, especially with small fonts or low pixel sizes, sans-serif
fonts are usually easier to read than serif fonts.
4 years ago
Michael Lutz
6755ff63e1
Add: [OSX] Native font rendering without using FreeType.
4 years ago
Michael Lutz
21a2cd7bc3
Codechange: Replace magic numbers by constants.
4 years ago
Michael Lutz
23389e9491
Remove: [OSX] Startup splash screen.
...
It wasn't displayed anyway as it was never copied to the bundle.
4 years ago
Michael Lutz
63ed3f3575
Codechange: Move Fontconfig-specific code to a seperate file.
4 years ago
Michael Lutz
f2294851e6
Codechange: [OSX] Move OSX-specific font code to a separate file.
4 years ago
Michael Lutz
c6af8f16f6
Codechange: [Win32] Move Win32-specific font code to a seperate file.
4 years ago
Michael Lutz
5ad1640984
Codechange: Make OS font handle of the FontCache read-only.
4 years ago
glx22
348f322df1
Fix f1f281b31: [Win32] MinGW doesn't know timeapi.h
4 years ago
Loïc Guilloux
f1f281b318
Fix: [Win32] Set minimum resolution for timers to 1ms. ( #8660 )
4 years ago
embeddedt
6c8f2227cd
Fix: [Emscripten] open links in browser ( #8655 )
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Michael Lutz
6ad5489d01
Codechange: [OSX] Silence some annoying warnings.
4 years ago
Michael Lutz
9ccef816f9
Codechange: [OSX] Re-arrange the OSX video driver code by combining all drawing code and moving the window/event handling to a different file.
...
This is just a code move/rename, not a functionality change.
4 years ago
Patric Stout
ab7da117e0
Add: always set PERSONAL_DIR "/content_download" in search path ( #8481 )
...
This means that if you start OpenTTD with "-c" to indicate another
location to store files, it can still read the content you already
downloaded from your PERSONAL_DIR. This folder is, however,
read-only.
This is useful for situations where you downloaded OpenGFX via
the content-service, but want to run the regression or want to
run with a clean configuration. With this change, you no longer
need to download OpenGFX again.
4 years ago
Michael Lutz
8c24b2b6ce
Fix: [OSX] Fonts loaded directly from a file have to be registered with CoreText for proper text layout.
4 years ago
Michael Lutz
f3326d34e7
Codechange: Use std::string in FIO search path handling.
4 years ago
Michael Lutz
0c6e8a8123
Codechange: Store file search paths as std::string.
4 years ago
Michael Lutz
dd138fc460
Codechange: Stringify config file paths.
4 years ago