Commit Graph

115 Commits

Author SHA1 Message Date
cc5135959b Merge pull request #62973 from bruvzg/sysfont_support 2022-07-27 13:38:30 +02:00
7b834c8bfd Fix unnamed arguments in XML docs 2022-07-26 20:42:38 +02:00
36ef8f29dc Implement support for loading system fonts on Linux, macOS / iOS and Windows. 2022-07-26 08:38:05 +03:00
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
344ba0ffaf Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
136f84fc35 Merge pull request #61772 from bruvzg/ft_ot_collect 2022-06-13 11:13:05 +02:00
4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
6e4cdad3ac [TextServer] Adds support for TrueType / OpenType collection files (*.TTC, *.OTC). 2022-06-07 11:35:59 +03:00
6783d55ce4 Use new HashMap implementation in the TextServer, and Font. 2022-05-12 13:42:25 +03:00
be611c1c05 Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
f19cd44346 Unify TextServer built-in module and GDExtension code. 2022-03-17 08:15:29 +02:00
b32e8d63d8 Add options to embolden and transform font outlines to simulate bold and italic typefaces. 2022-03-11 14:02:30 +02:00
29199579f7 Add sub-pixel glyph positioning support. 2022-02-12 19:55:52 +02:00
8a0a3accee simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
a2d323c67e Merge pull request #54794 from bruvzg/runtime_bmfont_parser 2022-01-17 13:25:08 +01:00
c89c515ccf [TextServer] Improve ligature cursor handling.
Fix mid-grapheme hit test.
Fix OpenType features property handling, add default features override option.
Enable mid-grapheme cursor by default.
2022-01-09 19:03:48 +02:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
e9808e3d9a Add a double-precision editor build to CI 2021-12-09 09:52:48 -06:00
41a20171eb align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
753d677343 Expose FontData::{set,get}_fixed_size methods 2021-11-20 20:47:01 +03:00
294e48ae58 Move BMFont parser code from importer to the FontData to allow loading bitmap fonts in the runtime (without importing). 2021-11-09 10:41:45 +02:00
3f33e1d7d6 Add functions for getting name and font style from dynamic and bitmap fonts.
Add font selection toolbar editor plugin.
2021-10-31 12:40:58 +02:00
ebbc25e89c Ignore empty Font resources as theme override.
Add range hint to font_size properties.
Remove excessive `base_size` Font property.
2021-10-25 14:05:37 +03:00
5ae569560d Fix missing argument names in bindings
While at it, tweak some boolean setters to use `p_enabled` for the bool.

Also renames `draw_minimap()` to `set_draw_minimap()`.
2021-10-09 00:20:10 +02:00
0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
2e035272a8 [FontData] Fixes saving copy of the font source data, if it was created from built-in font. 2021-10-01 09:25:26 +03:00
9a36d8f26f Fill variation coordinates dictionary with default values when FontData is set/added. 2021-09-22 11:10:40 +03:00
1383b37f1a Add FontData cache index check, remove excessive loop. 2021-09-20 11:03:59 +03:00
4c3f7d1290 Makes FontData importable resource.
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03:00
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
a527c6856b Merge pull request #46045 from bruvzg/text_server_bmp_create
[TextServer] Restores bitmap font dynamic construction functions.
2021-02-24 12:55:36 +01:00
0fcbc1c6e3 Fix font draw_*string crash with empty data. 2021-02-15 22:41:16 +02:00
bee718f1af [Text Server] Restores bitmap font dynamic construction functions. 2021-02-15 10:46:49 +02:00
f4d095cdd3 [TextServer] Restore character and space extra spacing support. 2021-02-15 10:46:23 +02:00
f8d03b98e7 Improve resource load cache
-Added a new method in Resource: reset_state , used for reloading the same resource from disk
-Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type)
-Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-11 15:44:28 -03:00
1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
b5334d14f7 Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
a5c47dab5b Font: Fix typo in DynamicFontData compat code
Fixes #44494.
2020-12-18 12:59:52 +01:00
c1d261fdb0 [Complex Text Layouts] Add variable fonts support. 2020-12-13 18:43:39 +02:00
92c001ef09 Merge pull request #43931 from bruvzg/ctl_comp_font
[Complex Text Layouts] Add compatibility for legacy Font resources.
2020-12-09 11:28:11 +01:00
a458e90179 [Complex Text Layouts] Adds missing Font::SPACING_* to the Label, LineEdit, TextEdit, TextLine and TextParagraph.
Fixes oversized editor control height (default editor spacing is negative) and control size changing when text is set.
2020-12-06 20:30:59 +02:00
3c3590522f [Complex Text Layouts] Add compatibility for legacy Font resources. 2020-12-03 10:34:03 +02:00
99666de00f [Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
84d734da0e Refactored 2D shader and lighting system
-Removed normal/specular properties from nodes
-Create CanvasTexture, which can contain normal/specular channels
-Refactored, optimized and simplified 2D shaders
-Use atlas for light textures.
-Use a shadow atlas for shadow textures.
-Use both items aboves to make light rendering stateless (faster).
-Reorganized uniform sets for more efficiency.
2020-10-24 15:57:25 -03:00
ee06a70ea6 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00