Yuri Sizov
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
Yuri Sizov
b5845f87fc
Merge pull request #74556 from AThousandShips/text_adv_svg_freetype
...
[TextServer] Make sure Freetype is enabled for ot-svg
2023-03-15 15:04:01 +01:00
bruvzg
8d501a2dc3
[TextServer] Add invalid font scaling check, restrict Linux/BSD system fonts lookup to TrueType/CFF only.
2023-03-10 09:36:17 +02:00
Ninni Pipping
3a5d7a4b54
[TextServer] Make sure Freetype is enabled for ot-svg
2023-03-07 16:27:24 +01:00
bruvzg
016b2f3555
[TextServer] Fix justification on punctuation characters.
2023-03-06 12:39:08 +02:00
Rémi Verschelde
a8d2e7f342
Merge pull request #73987 from bruvzg/ft_lock
...
[TextServer] Add mutex for FreeType face creation/deletion operations.
2023-03-03 11:04:07 +01:00
bruvzg
8459aeaab0
[Font] Implement `get_char_from_glyph_index` function.
2023-03-01 09:29:11 +02:00
bruvzg
bbc77b6d29
Fix text server GDExtension build.
2023-02-26 18:38:22 +02:00
bruvzg
c950a1ab94
[TextServer] Add mutex for FreeType face creation/deletion operations.
2023-02-26 17:55:04 +02:00
Rémi Verschelde
65883cc73b
Merge pull request #71598 from bruvzg/gdscript_bidi_override
...
Implement BiDi override mode for GDScript source.
2023-01-19 19:33:18 +01:00
bruvzg
e144e5dda5
Remove duplicate ucaps code from TextServerFallback.
2023-01-19 14:56:17 +02:00
bruvzg
db7d8c2d87
[GDExtension] Expose some low level functions and String operators.
2023-01-19 12:50:49 +02:00
bruvzg
5361ec9f43
Implement BiDi override mode for GDScript source.
2023-01-18 19:22:20 +02:00
Juan Linietsky
6f0e210093
Refactor ProjectSetting overrides
...
* Overrides no longer happen for set/get.
* They must be checked with a new function: `ProjectSettings::get_setting_with_override()`.
* GLOBAL_DEF/GLOBAL_GET updated to use this
This change solves many problems:
* General confusion about getting the actual or overriden setting.
* Feature tags available after settings are loaded were being ignored, they are now considered.
* Hacks required for the Project Settings editor to work.
Fixes #64100 . Fixes #64014 . Fixes #61908 .
2023-01-13 15:13:56 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
...
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
bruvzg
a28e8f0c8d
[TextServer] Make `free` calls thread safe.
2023-01-02 21:59:05 +02:00
bruvzg
20d9457f9d
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior.
2022-12-17 22:47:54 +02:00
Haoyu Qiu
207e52c161
Fix String::word_wrap() for long words
...
- Changes `TextServer.string_get_word_breaks()`
- Returns pairs of boundary start and end offsets
- Accepts `chars_per_line` to return line breaks
- Removes `String::word_wrap()`
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-12-16 13:18:57 +08:00
bruvzg
53c76fa5d1
[RTL/TextServer] Add baseline inline alignment mode for objects and RTL tables.
2022-12-15 23:16:02 +02:00
bruvzg
3395539ed4
[TextServer] Do not clean up font texture cache when setting `allow_system_fallback` property.
2022-12-10 17:07:42 +02:00
bruvzg
ecec415988
Use system fonts as fallback and improve system font handling.
...
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00
bruvzg
d77902f33a
Implement SVG in OT support.
2022-11-04 14:10:54 +02:00
Rémi Verschelde
cd25e48456
Merge pull request #67562 from bruvzg/improve_font_packing
...
Improve font glyph cache packing shelf best height fit heuristic.
2022-10-31 14:26:13 +01:00
Rémi Verschelde
ae81a569b9
Merge pull request #67409 from bruvzg/fix_oversampling_rounding
...
[TextServer] Do not round glyph advances / coordinates if font oversampling or bitmap glyph scaling is used.
2022-10-31 14:21:56 +01:00
kobewi
e48c5daddf
Unify usage of GLOBAL/EDITOR_GET
2022-10-18 19:01:48 +02:00
bruvzg
c1af9d57a3
Improve font glyph cache packing shelf best height fit heuristic.
2022-10-18 18:42:04 +03:00
Rémi Verschelde
3c4b110ae0
Merge pull request #67521 from nikitalita/speed_up_texture_pos
...
Speed up `find_texture_pos_for_glyph()`
2022-10-17 17:31:54 +02:00
bruvzg
68ec84cded
[TextServer] Do not round glyph advances / coordinates if font oversampling or bitmap glyph scaling is used.
2022-10-17 10:57:49 +03:00
nikitalita
21341ddaed
Speed up `find_texture_pos_for_glyph()`
2022-10-16 22:29:26 -07:00
Haoyu Qiu
6db8e79eed
Fix memory leak when `_ensure_cache_for_size()` fails
2022-10-17 12:47:38 +08:00
kobewi
072f6feaba
Make some Image methods static
2022-10-14 14:34:15 +02:00
Rémi Verschelde
24b36354ff
Merge pull request #66532 from bruvzg/mipmap_change
...
[Text Server] Clear textures after "generate mipmaps" property change.
2022-09-28 17:13:57 +02:00
bruvzg
51978dde5a
[Text Server] Clear textures after "generate mipmaps" property change.
2022-09-28 12:43:34 +03:00
bruvzg
8f5d56e04a
[GDExtension] Use function names with underscore for TextServer extension, add macros to generate wrappers for module functions.
2022-09-28 10:04:11 +03:00
bruvzg
8cdb482738
[TextServer] Always prefer main font over fallbacks, regardless of script/language support.
2022-09-25 23:07:30 +03:00
Rémi Verschelde
a0c85c11c6
Merge pull request #65914 from bruvzg/fix_trim_wo_space
...
Fix line trim/ellipsis when line do not have space or newline at the end.
2022-09-21 18:55:44 +02:00
Haoyu Qiu
2d0d6e4f63
Fix crash when executing `FontFile.get_face_count`
2022-09-18 14:38:57 +08:00
bruvzg
19443a7fef
Fix line trim/ellipsis when line do not have space or newline at the end.
2022-09-16 19:46:26 +03:00
Rémi Verschelde
3a62c294c7
Merge pull request #65170 from KoBeWi/your_argument_is_TypedArray
2022-09-02 13:57:02 +02:00
kobewi
7adc8376ed
Change Array arguments to TypedArray
2022-09-01 13:13:19 +02:00
bruvzg
d83b6b1e1c
[TextServer] Fix LCD AA fonts reading wrong glyphs.
2022-09-01 08:10:33 +03:00
bruvzg
fbcb98855d
Fix MSDF fonts color modulation.
2022-08-30 20:28:53 +03:00
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0
2022-08-26 11:59:07 +02:00
Rémi Verschelde
62c3e72b6f
Merge pull request #63959 from KoBeWi/typo_arrray
...
Replace Array return types with TypedArray (part 1)
2022-08-23 08:52:13 +02:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support.
2022-08-23 08:47:21 +03:00
kobewi
8be27dc59e
Replace Array return types with TypedArray
2022-08-22 22:42:36 +02:00
bruvzg
1c5a50fac6
Fix color modulation of the grayscale glyphs in font with mixed color / grayscale data.
2022-08-22 21:01:22 +03:00
bruvzg
bf1cc6326a
Allow MSDF rendering for system fonts, fix crash on loading damaged / unsupported font files.
2022-08-09 14:21:09 +03:00
bruvzg
80c9a44492
Fix overrun flag check and HarfBuzz safe to break flag check.
2022-08-04 22:58:28 +03:00
Juan Linietsky
c7255388e1
Remove ThreadWorkPool, replace by WorkerThreadPool
...
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient.
It can also be better debugged.
2022-07-25 15:39:50 +02:00