Commit Graph

52 Commits

Author SHA1 Message Date
Rémi Verschelde b9301a89b7
Merge pull request #74157 from themancalledjakob/DocumentationFontVariation
Documentation font variation
2023-03-03 11:05:45 +01:00
themancalledjakob fb5c2d9f75 improve documentation for Font and FontVariation
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-03-02 14:34:19 +01:00
Rémi Verschelde 1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
Hugo Locurcio 11f6dc295d
Clarify `Font.get_string_size()` taking kerning into account
This makes a difference when using a single call per character/word
as opposed to using a single call for an entire string.
2023-02-11 16:24:52 +01: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
Paul Joannon 2316c3a3a9
Add new C# code blocks to class ref pages
- AStarGrid2D
- Engine
- Font
- Node
- OS
- Tweens
2022-09-19 19:38:29 +02:00
Andy Maloney ea2192b99e [doc] Use "param" instead of "code" to refer to parameters (6) 2022-08-12 12:07:53 -04:00
Yuri Sizov c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
RedMser 7b834c8bfd Fix unnamed arguments in XML docs 2022-07-26 20:42:38 +02:00
Hugo Locurcio f0b896e9a3
Add example usage for `Font.get_string_size()`
The font size is now separated from the font itself, so it makes
sense to have an example for people coming from Godot 3.x.
2022-07-22 22:39:00 +02:00
bruvzg 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
bruvzg 344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
Rémi Verschelde a647fb3e62 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-03-31 14:07:29 +02:00
bruvzg f19cd44346
Unify TextServer built-in module and GDExtension code. 2022-03-17 08:15:29 +02:00
Hugo Locurcio b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
kobewi 2cad775461 Fix usage of "Return" in the docs 2022-01-02 21:09:18 +01:00
Nathan Franke 41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
bruvzg 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
bruvzg 0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
Aaron Franke d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05: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
Rémi Verschelde 7adf4cc9b5
doc: Use self-closing tags for `return` and `argument`
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
Michael Alexsander Silva Dias 0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
Paul Joannon 8455e901f3
class reference proofreading 2021-03-19 13:21:20 +01:00
Luke Hubmayer-Werner 886c942b40 Documentation: Correct CanvasItem.draw_string position description.
Also add height warnings to Font.get_char_size and Font.get_string_size
2021-03-18 18:09:23 +10:30
bruvzg f4d095cdd3
[TextServer] Restore character and space extra spacing support. 2021-02-15 10:46:23 +02:00
bruvzg 7e2c0ffd1a
[Complex Text Layouts] Add TextServer documentation. Update Font, CanvasItem, Theme and modified controls documentation. 2020-11-26 14:25:52 +02:00
bruvzg 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
Rémi Verschelde d70a17d5d3
Merge pull request #40408 from Calinou/doc-font-missing-character
Document missing character behavior when drawing text with fonts
2020-09-01 23:48:45 +02:00
Hugo Locurcio 7735d8d0ce
Document missing character behavior when drawing text with fonts
See #40405.
2020-09-01 14:36:16 +02:00
Hugo Locurcio 0c7735be5b Add an example to the `CanvasItem.draw_string()` documentation
This closes https://github.com/godotengine/godot-docs/issues/3374.
2020-07-29 10:43:10 +02:00
Maganty Rushyendra a4413710f9 Expose `get_char_size()` from Font instead of BitmapFont
`get_char_size()` is a public virtual function defined in the `Font`
class. Implementations exist for both `BitmapFont` and `Dynamic Font`.
However, it was only exposed to the GDScript API through the Bitmap
Font, and not for Dynamic Font.

This commit exposes the function through `Font` instead.

Fixes #23967
2020-05-27 17:28:23 +08:00
Tomasz Chabora e103f21a40 Add LOTS of missing docs 2020-03-13 16:35:03 +01:00
clayjohn 57e27683ba Update docs to version 4.0 2020-01-31 17:15:41 -08:00
Rémi Verschelde 2d20fc39aa doc: Drop unused 'category' property from header
We already removed it from the online docs with #35132.

Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.

We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
2020-01-26 16:02:39 +01:00
Chris Bradfield 378c4895ae [DOCS] Corrections and clarifications to classref 2020-01-10 10:46:41 -08:00
Rémi Verschelde d0e45e78a4 doc: Sync classref with current source
And various fixes to bindings, hyperlinks and an uninitialized variable.
2019-09-27 22:16:42 +02:00
Hugo Locurcio f7f6115f76
Proofread and improve the whole class reference
- Document a few more properties and methods
- Add more information to many classes
- Fix lots of typos and gramar mistakes
- Use [code] tags for parameters consistently
- Use [b] and [i] tags consistently
- Put "Warning:" and "Note:" on their own line to be more visible,
  and make them always bold
- Tweak formatting in code examples to be more readable
- Use double quotes consistently
- Add more links to third-party technologies
2019-06-27 22:30:19 +02:00
Sean Heffernan 426bcc9941 Change "Return" to "Returns" where necessary in XML documentation
In many of the XML files it had been noted that when the documentation
refers to a return value, both "Return" and "Returns" are used. This
has now been fixed to only say "Returns".

Fixes #28867
2019-05-23 21:11:24 -07:00
Rémi Verschelde 30da18c01a doc: Sync classref with current source 2019-05-15 12:51:58 +02:00
Rémi Verschelde 6af69f851a doc: Drop unused <demos> tag 2019-04-19 11:03:46 +02:00
Rémi Verschelde 39c868171e doc: Bump version to 3.2 2019-04-01 12:33:56 +02:00
Michael Alexsander Silva Dias 1b4228cb48 Remove "TODO" instances in the docs 2019-03-05 11:02:44 -03:00
Rémi Verschelde 3d9deda8b3 Sync classref with current source 2018-05-12 09:38:00 +02:00
Rémi Verschelde 3fa77b3172 doc: Remove status from hardcoded version string
It has no practical use case and just generates noise for each alpha, beta, etc.
2018-02-27 13:40:49 +01:00
Rémi Verschelde 3c7a39b40c doc: Update version string in header 2018-02-19 10:46:33 +01:00
Rémi Verschelde d516aab8fa doc: Sync with current source
Also enhance RigidBody docs as per https://github.com/godotengine/godot-docs/pull/1018
and fix the version tag in all files (not really stable yet, but it makes no sense
to hardcode rc3 at this stage).
2018-01-25 08:50:56 +01:00
Rémi Verschelde e28cdc4654 doc: Update version string in XML 2018-01-13 11:43:42 +01:00
Rémi Verschelde bc75fae579 doc: Update header version for 3.0-beta 2017-11-24 09:16:52 +01:00
Rémi Verschelde 967bfb0c4a doc: Remove revision.module_config from version string
It is now "3.0-alpha" instead of "3.0.alpha.custom_build{,.mono}",
limits unnecessary diffs.
2017-11-15 20:41:16 +01:00