aboutsummaryrefslogtreecommitdiff
path: root/scene/resources/dynamic_font.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Ceil char width within Label instead of FontRuslan Mustakov2018-05-141-2/+0
| | | | | | | | | | Some classes use Font::get_char_size directly and not only for autowrapping. RichTextLabel is one such example. So this commit reverts aa8561d (PR #17504) and instead ceils character width within Label. This makes sure Label autowraps correctly while not affecting other Font clients. Fixes #18835.
* Update oversampling of outlines after window size changeRuslan Mustakov2018-05-111-0/+5
| | | | Fixes #18774.
* Always emit dynamic font change in update_oversamplingRuslan Mustakov2018-05-081-9/+6
| | | | | | | | | | Fixes #15787. The issue occurred when two (or more) separate DynamicFont instances used the same DynamicFontAtSize instance due to having equal properties. The first instance updated its data_at_size and emitted "changed" signal, but the second did not because it considered the data_at_size to be up to date, even though it has just been updated.
* Perfect FreeType-based outlines for DynamicFontsRuslan Mustakov2018-05-081-239/+278
| | | | | | | | | | | | | | | | | | | | | | | - Implement outlines based on FreeType Stroker API. This allows artifact-free results, similar to what you will see in Web or any text editing tools. Outline is a part of DynamicFont rather than Label, because outlines have to be baked into the font's atlas. Font has a default outline_color and a Label can specify font_outline_modulator that will be multiplied with the Font's color to get the final result. - draw_char now has to be called twice to fully render a text - first with p_outline == true for each character and then with p_outline == false for each character. - Number of draw-calls is reduced from 5 to 2 per outlined character. - Overall cleanup of DynamicFont code, extracted duplicated code pieces into separate methods. - The change is backward-compatible - Labels still have outline properties that work exactly as they worked before. Closes #16279.
* Ceil dynamic font glyph sizeRuslan Mustakov2018-03-141-0/+3
| | | | | | | | | Fixes #15459. When oversampling is enabled, glyphs may have fractional size, but they are still rendered into integral pixels, which results in them taking more space than was anticiped by autowrapping algorithm. The solution here is to return ceiled width, which makes autowrapper consider characters a bit larger than they are, but it doesn't hurt the actual rendering and ensures there is enough space for the characters.
* Add an hinting mode setting to DynamicFontsHugo Locurcio2018-02-281-10/+37
| | | | | | | - Editor font hinting can now be tweaked in the Editor Settings. - DynamicFonts used in projects now have tweakable hinting settings in their DynamicFontData child. Changes will be visible upon reloading the scene in the editor.
* Merge pull request #15780 from volzhs/emojiRémi Verschelde2018-02-191-21/+57
|\ | | | | Support colored font
| * Support colored fontvolzhs2018-01-161-21/+57
| |
* | I have no idea why this commit fixes #15392Juan Linietsky2018-01-211-8/+3
|/
* Two potential glitches in font oversamplingBernhard Liebl2018-01-081-1/+14
|
* Fix stale dynamic font reference fetch from cacheBernhard Liebl2018-01-071-1/+1
| | | | Seems to fix issue 15392
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make dynamic font oversampling fully dynamic.Juan Linietsky2017-12-191-1/+53
|
* Added font oversampling supportJuan Linietsky2017-12-191-13/+19
|
* Made Vector::ptrw explicit for writing, compiler was sometimes using the ↵Juan Linietsky2017-11-251-1/+1
| | | | | | wrong function, leading to unnecesary copy on writes and reduced performance.
* Remove get_default_video_mode definition on OSX/iOSRémi Verschelde2017-11-091-1/+1
| | | | | | | | It had been missed in d09160a8b67fdc60e8108962c4e9bd4c0bc7f13e and broke compilation for those platforms. Took the opportunity to run clang-format on the code base to fix some corner cases that went through our static tests/were overlooked recently.
* Merge pull request #11365 from leezh/freetype_monoRémi Verschelde2017-09-211-2/+17
|\ | | | | Added support for FT_PIXEL_MODE_MONO in FreeType
| * Added support for FT_PIXEL_MODE_MONO in FreeTypeZher Huei Lee2017-09-191-2/+17
| |
* | Rename pos to position in user facing methods and variablesletheed2017-09-201-1/+1
|/ | | | | | | | | | | Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-4/+4
|
* Add closest_power_of_2 func and implement mix_rate/latency on OS XMarcelo Fernandez2017-08-171-1/+1
|
* Synchronize parameter names in definition and declarationTwistedTwigleg2017-08-161-5/+5
| | | | Fixes #10244.
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-5/+5
|
* Several changes to better run in mobile.Juan Linietsky2017-07-221-2/+2
|
* Removal of Image from Variant, converted to a Resource.Juan Linietsky2017-05-171-1/+1
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Cache DynamicFont resource for Androidvolzhs2017-03-241-1/+25
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-370/+322
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-17/+17
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Remove use of _SCS from ADD_METHODHein-Pieter van Braam2017-02-131-9/+9
| | | | This saves typing and is a step towards fixing #56
* Style: Fix statements ending with ';;'Rémi Verschelde2017-01-161-1/+1
|
* Style: Fix whole-line commented codeRémi Verschelde2017-01-141-1/+1
| | | | | They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
* rename String.extension() -> String.get_extension() / String.basename() -> ↵Juan Linietsky2017-01-141-1/+1
| | | | String.get_basename()
* Memory pool vectors (DVector) have been enormously simplified in code, and ↵Juan Linietsky2017-01-071-2/+2
| | | | renamed to PoolVector
* -Conversion of most properties to a simpler syntax, easier to use by scriptJuan Linietsky2017-01-041-8/+11
| | | | | | -Modified help to display properties GDScript can still not make use of them, though.
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-17/+17
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* Merge remote-tracking branch 'origin/gles3' into gles3-on-masterRémi Verschelde2017-01-021-1/+1
|\ | | | | | | | | Various merge conflicts have been fixed manually and some mistakes might have been made - time will tell :)
| * Begining of GLES3 renderer:Juan Linietsky2016-10-031-1/+1
| | | | | | | | | | | | | | | | -Most 2D drawing is implemented -Missing shaders -Missing all 3D -Editor needs to be set on update always to be used, otherwise it does not refresh -Large parts of editor not working
* | Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
|/ | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* DynamicFont caches now accounts for texture flagsZher Huei Lee2016-08-021-56/+50
| | | | CacheID added for future-proofing
* Added extra spacing support for DynamicFontZher Huei Lee2016-08-021-5/+57
| | | | | Side effect is that label min-size will now take into account kerning.
* Added texture mipmaps and filtering to DynamicFontZher Huei Lee2016-08-021-7/+73
|
* Remove unused variables (fourth pass) + dead codeRémi Verschelde2016-07-081-1/+1
| | | | Also fix a potential regression from 3fcb9b1ec179b99d979d4cfea9b5e3c80e4a3e33.
* Improved binding system (ObjectTypeDB::bind_method) to be friendlier to ↵Juan Linietsky2016-06-221-2/+2
| | | | | | statically typed languages, should help in the Mono integration. Disabled by default.
* Merge pull request #5259 from neikeq/pr-textedit-zoomRémi Verschelde2016-06-191-1/+1
|\ | | | | TextEdit: Change font size with Ctrl+Mouse Wheel Up/Down
| * TextEdit: Change font size with Ctrl+Mouse Wheel Up/DownIgnacio Etcheverry2016-06-181-1/+1
| |
* | DynamicFontData can be built-in (will still link to a ttf though), closes #4600Juan Linietsky2016-06-181-0/+11
| |
* | Add missing license headers in our source files (#5255)Rémi Verschelde2016-06-181-0/+28
|/ | | Also removes a couple wrong Godot headers from third-party source files.