Commit Graph

193 Commits

Author SHA1 Message Date
985e6178b4 Remove extraneous includes from texture.h. 2025-10-10 18:39:16 +02:00
22e99a4901 Restore per font oversampling override. 2025-06-19 18:10:54 +03:00
8ba4656ea3 Compile out editor-only logic within validate_property in games 2025-06-12 12:54:19 +08:00
0a800df58e Clamp FontFile Face Index to a valid range in the inspector
Previously, you could set it to an invalid value in the inspector,
which caused an error to be printed by TextServerAdvanced.
2025-05-29 03:23:37 +02:00
4afeca3bcf Replace global oversampling with overrideable per-viewport oversampling. 2025-04-14 13:43:09 +03:00
0d267e7b1e Core: Add dedicated BitField template 2025-04-11 11:53:26 -05:00
19f360d65a Add font import flag to toggle modulation of colored glyphs. 2025-04-01 13:36:10 +03:00
10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
f52c9e342c Optimize Font calculations by avoiding unnecessary copy-on-write. 2025-01-28 18:15:59 +01:00
f134769506 Fix various typos
* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
fa264115ce Merge pull request #98664 from bruvzg/ts_reset_subpixel_shift
[TextServer] Reset subpixel shift on blank glyphs.
2024-12-02 17:20:07 +01:00
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
68f638cf02 Use (r)find_char instead of (r)find for single characters 2024-11-17 10:02:18 +01:00
bb5f390fb9 Style: Apply clang-tidy fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06:00
e81a2afbc4 [TextServer] Reset subpixel shift on blank glyphs and import option to enable/disable it. 2024-11-01 10:18:57 +02:00
091212b4f1 Merge pull request #93602 from aaronp64/inspector_latency
Improve Editor Inspector/Theme item lookup performance
2024-08-22 00:10:26 +02:00
7593e55527 Improve Editor Inspector/Theme item lookup performance
Changes to reduce the latency between changing node selection in the editor and seeing the new node reflected in the Inspector tab

- Use Vector instead of List for ThemeOwner::get_theme_type_dependencies and related functions
- Use Vector instead of List for ThemeContext::themes, set_themes(), and get_themes()
- Add ClassDB:get_inheritance_chain_nocheck to get all parent/ancestor classes at once, to avoid repeated ClassDB locking overhead
- Update BIND_THEME_ITEM macros and ThemeDB::update_class_instance_items to use provided StringNames for call to ThemeItemSetter, instead of creating a new StringName in each call

These changes reduce the time taken by EditorInspector::update_tree by around 30-35%
2024-08-20 13:39:40 -04:00
e7f215c2c4 [BMFont] Fix importing fonts with Match char height enabled. 2024-08-14 23:52:19 +03:00
5c8a8c57be [Font] Add check for cyclic base font dependencies. 2024-08-03 00:00:11 +03:00
847aadee02 [Editor] Update font preview directly instead of invalidating property list. 2024-07-05 12:48:39 +03:00
fee14eb5e8 [Import] Add "skip file" import option to skip (and exclude from export) importable formats, auto set it for the images used by bitmap font. 2024-03-12 21:34:40 +02:00
911fa38d3a [Font] Add option to disable embedded bitmaps loading. 2024-03-11 16:31:10 +02:00
ba867042a2 Fix Label3D, TextMesh & Font not following project default theme in editor 2024-03-09 17:35:48 +01:00
7e14974d07 Merge pull request #88185 from bruvzg/font_draw_no_ellipsis
[Font] Do not use trim with ellipsis in the basic Font string drawing functions.
2024-02-15 17:35:44 +01:00
1a5bae9adc [Font] Do not use trim with ellipsis in the basic Font string drawing functions. 2024-02-11 00:23:35 +02:00
19f1d5afa9 [TextServer / Font] Do not duplicate images to prevent unnecessary embedding. 2024-02-05 10:38:32 +02:00
85df221610 [TextServer / Font] Add support for customizable baseline offset. 2024-01-28 13:26:49 +02:00
a3cb1b096f Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
15b8185c68 Don't use TTR/RTR for ERR/WARN prints
We don't translate those, only editor strings are translated.
2023-11-12 12:00:55 +01:00
9a1e0e4aef [Bitmap fonts] Add support for scaling. 2023-10-13 12:57:45 +03:00
0f5669be51 Merge pull request #82712 from bruvzg/font_collection_name_select
[SystemFont] Check name when selecting the best matching face from a collection.
2023-10-03 17:27:06 +02:00
a5a0e48dbc [SystemFont] Check name when selecting the best matching face from a collection. 2023-10-03 09:40:48 +03:00
4a167fc740 [TextServer] Store font extra spacing variations without making a full copy of font. 2023-09-28 10:45:09 +03:00
31a7fd1951 Merge pull request #81406 from bruvzg/ts_dict_chk2
[TextServer] Pass Dictionary properties by value and check property values instead of references.
2023-09-08 09:11:23 +02:00
1ced1f9c99 [TextServer] Pass Dictionary properties by value and check property values instead of references.. 2023-09-07 11:59:51 +03:00
58126e479c Introduce the concept of global theme contexts
This commit adds the default theme context, which replaces
the need to manually check the project and the default theme
all the time; simplifies related code.

It also adds framework for custom theme contexts, to be used
by the editor. Custom contexts can be attached to any node,
and not necessarily a GUI/Window node. Contexts do no break
theme inheritance and only define which global themes a node
uses as a fallback.

Contexts propagate NOTIFICATION_THEME_CHANGED when one of their
global themes changes. This ensures that global themes act just
like themes assigned to individual nodes and can be previewed
live in the editor.
2023-09-06 19:40:43 +02:00
31a8a9b2e1 [TextServer] Remove excessive Dictionary checks. 2023-09-04 09:47:55 +03:00
5453503697 [Text Server] Store extra spacing of individual font variations. 2023-08-24 11:58:12 +03:00
b3b791350b Move registration of fallbacks property in the base Font class 2023-08-07 13:46:44 +02:00
de4a3fa151 Unify and streamline connecting to Resource changes 2023-07-17 19:35:57 +02:00
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
7ee916a259 Fix: Incorrect property names in FontFile::_get_property_list(). 2023-07-01 07:57:47 -05:00
aaddec7cb8 [TextServer] Add support for retrieving OpenType name strings. 2023-05-22 18:08:34 +03:00
9163d8c336 Expose TextServer justification flags to Label, Label3D, TextMesh and RTL. Add flags to control last/single line justification. 2023-05-15 19:23:54 +03:00
98d95f3a0e Merge pull request #74149 from bruvzg/get_char
[Font] Implement `get_char_from_glyph_index` function.
2023-03-16 13:07:11 +01:00
67762ec4a6 [Bitmap font] Assume outline size is 1 if it's not set, but channel for outline is defined. 2023-03-02 08:36:17 +02:00
8459aeaab0 [Font] Implement get_char_from_glyph_index function. 2023-03-01 09:29:11 +02:00
80ae3feca7 Avoid returning self from _get_base_font_or_default() 2023-02-05 04:37:59 +01:00