-
-
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
[Complex Text Layouts] Add variable fonts support. #43030
Conversation
I'm sorry, I'm not the very knowledgeable about the code base, but am I the only one who thinks it's kinda crazy how this adds almost 400 000 lines of code? Like, I simply don't get it... How even is this possible, I'm not trying to be rude or whatever, but I'm honestly just confused. |
It is done on top of #41100 which adds ICU, HarfBuzz and SIL Graphite third party libraries (+361015, -4), TextServer implementation to use these libraries, fully rewritten Fonts and tons of changes to the controls to support new text rendering and BiDI UI. Actual variable font support is only the last commit, 342 insertions(+), 8 deletions(-). |
Oh I guess that makes sense, this seems like a good PR. |
7f7016f
to
75cab51
Compare
95b16fc
to
523c209
Compare
c522da8
to
21210fd
Compare
9f3d7c3
to
bfb8d64
Compare
a0b694a
to
f4ae201
Compare
c5f5ef7
to
f73ea5d
Compare
516d3fc
to
5dc0f9e
Compare
doc/classes/FontData.xml
Outdated
<return type="Dictionary"> | ||
</return> | ||
<description> | ||
Returns [code]";"[/code] separated list of supported variation coordinates, each coordinate is returned in the following format: [code]"tag,min_value,max_value,default_value"[/code]. |
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.
Might be good to add some details on what variation coordinates are / which kind of fonts support them and for what purpose (e.g. with a link to an appropriate reference).
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.
Added description and link to OpenType registry.
doc/classes/TextServer.xml
Outdated
<method name="font_get_variation_list" qualifiers="const"> | ||
<return type="Dictionary"> | ||
</return> | ||
<argument index="0" name="fonte" type="RID"> |
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.
Is "fonte" a typo?
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.
Typo
doc/classes/TextServer.xml
Outdated
<argument index="0" name="fonte" type="RID"> | ||
</argument> | ||
<description> | ||
Returns list of supported variation coordinates, each coordinate is returned as [code]Vector3i(min_value,max_value,default_value)[/code]. |
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.
Could also have more details as commented in FontData
. Is the different return format intended?
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.
Format is the same tag: Vector3i(min, max, def)
.
Thanks! |
Implements godotengine/godot-proposals#1704
All features (variable font and OpenType) are available for the Godot code editor font:
Demo project: VarFonts.zip