Commit graph

175 commits

Author SHA1 Message Date
bruvzg
930be37bb4
[TextServer GDExtension] Update build scripts and .gdextension files to use new target names and arch suffixes. 2022-10-05 11:41:03 +03:00
Rémi Verschelde
f47979f087
Merge pull request #66242 from akien-mga/scons-unify-tools-target 2022-09-30 12:28:50 +02:00
Rémi Verschelde
44799b896f Merge pull request #66534 from akien-mga/scons-msvc-graphite-silence-c++17-deprecation-warnings
SCons: Silence MSVC C++17 deprecation warnings in Graphite
2022-09-29 15:33:45 +02:00
Rémi Verschelde
24b36354ff Merge pull request #66532 from bruvzg/mipmap_change
[Text Server] Clear textures after "generate mipmaps" property change.
2022-09-28 17:13:57 +02:00
Rémi Verschelde
965022e5f6 SCons: Silence MSVC C++17 deprecation warnings in Graphite
Fixes #66497.
2022-09-28 13:27:19 +02:00
bruvzg
51978dde5a
[Text Server] Clear textures after "generate mipmaps" property change. 2022-09-28 12:43:34 +03:00
bruvzg
8f5d56e04a
[GDExtension] Use function names with underscore for TextServer extension, add macros to generate wrappers for module functions. 2022-09-28 10:04:11 +03:00
Rémi Verschelde
39facb35a0 SCons: Unify tools/target build type configuration
Implements https://github.com/godotengine/godot-proposals/issues/3371.

New `target` presets
====================

The `tools` option is removed and `target` changes to use three new presets,
which match the builds users are familiar with. These targets control the
default optimization level and enable editor-specific and debugging code:

- `editor`: Replaces `tools=yes target=release_debug`.
  * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_debug`: Replaces `tools=no target=release_debug`.
  * Defines: `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_release`: Replaces `tools=no target=release`.
  * Defines: `-O3`/`/O2`

New `dev_build` option
======================

The previous `target=debug` is now replaced by a separate `dev_build=yes`
option, which can be used in combination with either of the three targets,
and changes the following:

- `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`),
  enables generating debug symbols, does not define `NDEBUG` so `assert()`
  works in thirdparty libraries, adds a `.dev` suffix to the binary name.

Note: Unlike previously, `dev_build` defaults to off so that users who
compile Godot from source get an optimized and small build by default.
Engine contributors should now set `dev_build=yes` in their build scripts or
IDE configuration manually.

Changed binary names
====================

The name of generated binaries and object files are changed too, to follow
this format:

`godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]`

For example:
- `godot.linuxbsd.editor.dev.arm64`
- `godot.windows.template_release.double.x86_64.mono.exe`

Be sure to update your links/scripts/IDE config accordingly.

More flexible `optimize` and `debug_symbols` options
====================================================

The optimization level and whether to generate debug symbols can be further
specified with the `optimize` and `debug_symbols` options. So the default
values listed above for the various `target` and `dev_build` combinations
are indicative and can be replaced when compiling, e.g.:

`scons p=linuxbsd target=template_debug dev_build=yes optimize=debug`
will make a "debug" export template with dev-only code enabled, `-Og`
optimization level for GCC/Clang, and debug symbols. Perfect for debugging
complex crashes at runtime in an exported project.
2022-09-26 16:31:46 +02:00
bruvzg
970592274d
[RTL] Fix font variations / OpenType features of theme default font not updated when default font is changed. 2022-09-26 13:04:40 +03:00
bruvzg
8cdb482738
[TextServer] Always prefer main font over fallbacks, regardless of script/language support. 2022-09-25 23:07:30 +03:00
bruvzg
163257d51b
[GDExtension] Implement support for typed arrays. 2022-09-22 23:31:27 +03:00
Rémi Verschelde
a0c85c11c6 Merge pull request #65914 from bruvzg/fix_trim_wo_space
Fix line trim/ellipsis when line do not have space or newline at the end.
2022-09-21 18:55:44 +02:00
kobewi
9f2dc68279 Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
Haoyu Qiu
2d0d6e4f63 Fix crash when executing FontFile.get_face_count 2022-09-18 14:38:57 +08:00
bruvzg
19443a7fef
Fix line trim/ellipsis when line do not have space or newline at the end. 2022-09-16 19:46:26 +03:00
Rémi Verschelde
3a62c294c7 Merge pull request #65170 from KoBeWi/your_argument_is_TypedArray 2022-09-02 13:57:02 +02:00
kobewi
7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
bruvzg
d83b6b1e1c
[TextServer] Fix LCD AA fonts reading wrong glyphs. 2022-09-01 08:10:33 +03:00
Rémi Verschelde
8fa9d1ae46
Merge pull request #65098 from bruvzg/msdf_modulate
Fix MSDF fonts color modulation.
2022-08-30 23:57:19 +02:00
Fabio Alessandrelli
f958f00283 [Web] Require threads, rtti, allow optimize=speed.
Update export names (web[_dlink]_[release|debug].zip).

The Build with dynamic linking is broken due to high number of imports
in output wasm (likely emscripten regression issue 15487).
2022-08-30 20:01:19 +02:00
bruvzg
fbcb98855d
Fix MSDF fonts color modulation. 2022-08-30 20:28:53 +03:00
Fabio Alessandrelli
d20b32186f [Web] Rename JavaScript platform to Web.
Also rename export name from "HTML5" to "Web".
2022-08-29 11:52:00 +02:00
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0 2022-08-26 11:59:07 +02:00
Rémi Verschelde
62c3e72b6f
Merge pull request #63959 from KoBeWi/typo_arrray
Replace Array return types with TypedArray (part 1)
2022-08-23 08:52:13 +02:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
kobewi
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
bruvzg
1c5a50fac6
Fix color modulation of the grayscale glyphs in font with mixed color / grayscale data. 2022-08-22 21:01:22 +03:00
bruvzg
bf1cc6326a
Allow MSDF rendering for system fonts, fix crash on loading damaged / unsupported font files. 2022-08-09 14:21:09 +03:00
Rémi Verschelde
e3876899d3
Merge pull request #63919 from Faless/scons/4.x_easy_deps 2022-08-07 16:09:02 +02:00
Rémi Verschelde
ae335196b5
Merge pull request #63762 from bruvzg/ft_warn
[TextServer] Add a build warning when building with external FreeType without Brotli support.
2022-08-06 00:31:15 +02:00
Rémi Verschelde
bd833f8e06
Merge pull request #63871 from bruvzg/ts_build_options
Add Text Server related options to the build profiles editor.
2022-08-06 00:23:41 +02:00
bruvzg
4b155b939b
[Text Server] Prevent composite glyphs which incorporate kashida from being used for justification. Update TextServer tests to clean up on fail. 2022-08-05 19:35:38 +03:00
bruvzg
80c9a44492
Fix overrun flag check and HarfBuzz safe to break flag check. 2022-08-04 22:58:28 +03:00
Fabio Alessandrelli
951a1016d3 [Scons] Implement module dependency sorting.
Modules can now call:

env.module_add_dependencies(name: str, deps: list, optional: bool)

To add required or optional dependencies during the "can_build" step.

Required dependencies will be checked and the module will be not be
enabled when they are missing, printing a warning to notify the user.
2022-08-04 20:00:19 +02:00
bruvzg
2980c0d60c
HarfBuzz: Update to version 5.1.0, use new FLAG_SAFE_TO_INSERT_TATWEEL flag to improve justification. 2022-08-04 09:10:16 +03:00
bruvzg
066ca97690
Add Text Server related options to the build profiles editor.
Adds SCons options to disable Brotli and Graphite.
Adds option categories to the build profiles editor.
Adds options default state to the build profiles editor.
Adds Text Server related options to the build profiles editor.
Fix misplaced OpenGL/Vulkan SCons options.
2022-08-03 15:06:43 +03:00
bruvzg
4373a0bb86
[TextServer] Add ICU Unicode security and spoofing detection. 2022-08-02 15:37:49 +03:00
bruvzg
5aa48b6ae5
[TextServer] Implement ICU/UAX 31 based is_valid_identifier function. 2022-08-02 08:30:20 +03:00
bruvzg
366e2d893e
[TextServer] Add a build warning when building with external FreeType without Brotli support. 2022-08-01 13:22:29 +03:00
bruvzg
b54c5c2683
[TextServer] Ensure that built-in library headers are always included before system header, add HarfBuzz version checks for optional features. 2022-07-31 22:52:59 +03:00
Juan Linietsky
c7255388e1 Remove ThreadWorkPool, replace by WorkerThreadPool
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient.
It can also be better debugged.
2022-07-25 15:39:50 +02:00
Rémi Verschelde
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
bruvzg
8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
bruvzg
cbe3a2dcb7
Use BitField hint for the TextServer enums. Add missing parts for BitField support to the GDextension API. 2022-07-15 08:49:50 +03:00
kobewi
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
bruvzg
6c27d9d624
HarfBuzz: Update to version 4.4.1 2022-07-04 09:12:19 +03:00
bruvzg
b5c96df277
Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
Rémi Verschelde
632b933a03
Merge pull request #61934 from Geometror/hashfuncs
Hash function improvements
2022-06-15 07:34:43 +02:00
Hendrik Brucker
8c61470fa9 Hash function improvements 2022-06-15 00:32:10 +02:00