-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add Preprocessors to GDScript #80619
base: master
Are you sure you want to change the base?
Conversation
|
* Removed regex, and created a parser * OS features are not hardcoded anymore Still lot testing to do
…add-preprocessors
* Removed regex, and created a parser * OS features are not hardcoded anymore Still lot testing to do
…add-preprocessors
…add-preprocessors
…add-preprocessors
…add-preprocessors
…add-preprocessors
6765184
to
d153ca1
Compare
a9d06d2
to
0a229f9
Compare
ad5fce8
to
6caa410
Compare
@@ -390,7 +390,7 @@ class TextServer : public RefCounted { | |||
virtual void font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) = 0; | |||
virtual Dictionary font_get_opentype_feature_overrides(const RID &p_font_rid) const = 0; | |||
|
|||
virtual Dictionary font_supported_feature_list(const RID &p_font_rid) const = 0; | |||
virtual Dictionary font_supported_feature_list_compiled(const RID &p_font_rid) const = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's a search/replace result, there's nothing to preprocess at compile tine here, it's a features list of the specific font that can be determined only after the font is loaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didnt changed this file, what your change has to do with the PR, sorry didnt got it!
// Feature system - char is used so we can have 64 features at max. | ||
enum Feature { | ||
ANDROID, | ||
MOBILE_SYSTEM_FONTS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MOBILE_SYSTEM_FONTS
and SYSTEM_FONTS?
. Why there are two features for the same thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in some platforms system_fonts can be calculated at compile time, others not, but still in gdscript you just do:
~if system_fonts
~endif
its called mobile, because in mobile its at compile time, but just discovered that in Macos is at compile time too, which is weird!
platform/macos/os_macos.h
Outdated
virtual void _register_compiled_feature() override; | ||
virtual bool OS_MacOS::_check_internal_feature_support(const String &p_feature) override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation in the os_macos.mm
seems to be missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And OS_Web from the abstract errors, possibly all OS save Linux perhaps as windows also fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needed for OS_Web
afa7dc7
to
2718e21
Compare
2718e21
to
e5b7989
Compare
implements godotengine/godot-proposals#7496
Important:
The system doesnt affect any of gdscript internal code, basically its done by removing non used features before parsing source_code in
GDScriptParser::parse
Ps: Its barebones, but should be done in time for next gdscript meeting