Commit graph

54 commits

Author SHA1 Message Date
bruvzg
b5c96df277
Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
bruvzg
6e4cdad3ac
[TextServer] Adds support for TrueType / OpenType collection files (*.TTC, *.OTC). 2022-06-07 11:35:59 +03:00
Nathan Franke
77c8f271e7
use ERR_FAIL_INDEX when preferred 2022-05-25 13:36:45 -05:00
bruvzg
6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
bruvzg
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
Rémi Verschelde
9528aa42be
Merge pull request #60102 from KoBeWi/graphememe 2022-04-11 17:49:46 +02:00
bruvzg
75eec38772
[TextServer] Fix long selection performance. 2022-04-11 11:37:38 +03:00
kobewi
2c85599218 Improve shaped_text_get_word_breaks() 2022-04-10 17:43:52 +02:00
Marc Garcia Puig
f22d257025 Fixed ctrl + backspace on empty lines
Fix <word><space><caret> scenario

Fix move left & right for lines without words
2022-04-04 01:21:16 +02:00
bruvzg
f19cd44346
Unify TextServer built-in module and GDExtension code. 2022-03-17 08:15:29 +02:00
bruvzg
aada395354
Fix text clipping on the right side. 2022-03-13 17:26:00 +02:00
bruvzg
b32e8d63d8
Add options to embolden and transform font outlines to simulate bold and italic typefaces. 2022-03-11 14:02:30 +02:00
bruvzg
e88522f5b5
[TextServer] Improve word breaking when there are multiple spaces between words. 2022-03-05 22:31:58 +02:00
bruvzg
29199579f7
Add sub-pixel glyph positioning support. 2022-02-12 19:55:52 +02:00
bruvzg
215bede6ff
[TextServer] Add function to change font, font size, and OpenType features without invalidating line break points, justification points, or recreating shaped text buffer. 2022-02-02 11:20:44 +02:00
bruvzg
e02a097280
[TextServer] Implement locale and context sensitive case conversion functions. 2022-01-17 14:23:36 +02:00
bruvzg
baec983d8a
[TextServer] Improvements for line breaking, "Fill" alignment, overrun, and interaction between these modes.
Fix "Fill" alignment processing wrong side of the text if overrun trim was applied.
Improve "Fill" alignment to avoid adding excessive subsequent spaces or elongations.
Add font detection to the overrun, to correctly add ellipsis (was using last glyph font, which doesn't necessary have dot character).
Improve line breaking to avoid adding excessive subsequent soft break points for languages without word separator.
Port missing overrun/justification code to the Fallback text server.
Fix inferred text direction detection by controls.
Add tests for "Fill" alignment and line breaking glyph flags.
2022-01-13 08:53:28 +02:00
bruvzg
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
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Aaron Franke
e9808e3d9a
Add a double-precision editor build to CI 2021-12-09 09:52:48 -06:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
Lightning_A
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
Yuri Sizov
e85e6ec7fc Add methods to get position from column and line in TextEdit 2021-11-22 15:13:13 +03:00
Rémi Verschelde
5968653662
Merge pull request #46721 from bruvzg/custom_word_break_punct 2021-11-09 00:13:59 +01:00
bruvzg
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
bruvzg
63f3051154 Implement TextServer strip_diacritics function. 2021-10-28 10:12:57 +03:00
bruvzg
7c4fbc31a6 [TextServer] Use round instead of floor for hex code box size calculation to better match font size. 2021-10-18 11:02:49 +03:00
bruvzg
27e9d07f11 Remove Scene dependency from the TextServer, use scalable hex box font instead of built-in bitmap one. 2021-10-03 00:22:10 +03:00
bruvzg
daa613333e [Text Server] Add support for user defined punctuation list, used for word breaking. 2021-10-01 16:45:16 +03:00
bruvzg
0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
bruvzg
c931906af7 Add flag to connected grapheme. Apply RTL displacement FX only to the whole connected grapheme. Pass more glyph info to the custom RTL FX. 2021-09-21 13:51:38 +03:00
Bastiaan Olij
b9c64df69b Fix double named size parameter 2021-08-28 13:30:43 +10:00
bruvzg
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
Hendrik Brucker
72e49eadec Fix ItemList layout (+EditorFileDialog) 2021-08-21 00:22:09 +02:00
Rémi Verschelde
2c88e1c15d
Merge pull request #51178 from Geometror/layout-options-textline-textparagraph
Various text layout improvements (TextLine, TextParagraph, Label, TextServer)
2021-08-11 07:51:57 +02:00
Hendrik Brucker
403f4902d0 Various text layout improvements (TextLine, TextParagraph, Label, TextServer) 2021-08-11 00:09:48 +02:00
bruvzg
7c3c5603d0 [Text Server] Improve object (image/table) inline alignment. 2021-08-08 22:35:47 +03:00
Leonardo Christino
8b91828e4f Separate underscore from grapheme punctuation to enable doubleclick and caret jump over snakecase variables in editor 2021-07-13 10:03:26 -03:00
Hendrik Brucker
56a8d3f30c Improvements to Label's layout options
- Added options to trim the text in case it overruns
- Added more autowrap modes
- Improved line breaking, which ignores trailing spaces
2021-07-04 16:43:55 +02:00
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Aaron Franke
b5b6d3a8ec
Make is_equal_approx have explicit float and double versions 2021-05-20 06:18:11 -04:00
bruvzg
0d3fa2a125
[Complex Text Layouts] Provide access to glyph contour points. 2021-03-31 09:32:14 +03:00
Rémi Verschelde
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
Rémi Verschelde
0d1d719178 doc: Sync classref with current source
And fix various bogus bindings following previous PRs.
2021-02-19 14:39:14 +01:00
bruvzg
bee718f1af
[Text Server] Restores bitmap font dynamic construction functions. 2021-02-15 10:46:49 +02:00
bruvzg
f4d095cdd3
[TextServer] Restore character and space extra spacing support. 2021-02-15 10:46:23 +02:00
Rémi Verschelde
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
Marcel Admiraal
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
bruvzg
cc4d6eb7f6
Improve fill aligned text hit testing. 2020-12-21 11:57:35 +02:00
bruvzg
7d5a8ea0e9
Always include space characters (including tabs and other space-like chars) into selection rectangles. 2020-12-21 07:49:26 +02:00