summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-format1
-rw-r--r--COPYRIGHT.txt2
-rw-r--r--DONORS.md83
-rw-r--r--core/array.cpp72
-rw-r--r--core/array.h3
-rw-r--r--core/color.h12
-rw-r--r--core/debugger/remote_debugger.cpp35
-rw-r--r--core/debugger/remote_debugger.h11
-rw-r--r--core/input/godotcontrollerdb.txt3
-rw-r--r--core/input/input_event.cpp2
-rw-r--r--core/io/marshalls.cpp4
-rw-r--r--core/io/resource_format_binary.cpp4
-rw-r--r--core/math/camera_matrix.cpp12
-rw-r--r--core/math/geometry.cpp4
-rw-r--r--core/math/math_fieldwise.cpp2
-rw-r--r--core/math/octree.h4
-rw-r--r--core/math/plane.cpp18
-rw-r--r--core/math/plane.h30
-rw-r--r--core/math/transform.h4
-rw-r--r--core/os/os.h2
-rw-r--r--core/project_settings.cpp35
-rw-r--r--core/self_list.h3
-rw-r--r--core/variant.cpp9
-rw-r--r--core/variant_call.cpp9
-rw-r--r--core/variant_op.cpp10
-rw-r--r--core/variant_parser.cpp2
-rw-r--r--doc/classes/@GlobalScope.xml3
-rw-r--r--doc/classes/BaseMaterial3D.xml2
-rw-r--r--doc/classes/CPUParticles2D.xml1
-rw-r--r--doc/classes/Camera3D.xml7
-rw-r--r--doc/classes/Color.xml14
-rw-r--r--doc/classes/Engine.xml4
-rw-r--r--doc/classes/GPUParticles2D.xml1
-rw-r--r--doc/classes/KinematicBody3D.xml2
-rw-r--r--doc/classes/LineShape2D.xml2
-rw-r--r--doc/classes/MeshInstance2D.xml1
-rw-r--r--doc/classes/MultiMeshInstance2D.xml1
-rw-r--r--doc/classes/Node.xml2
-rw-r--r--doc/classes/Node2D.xml4
-rw-r--r--doc/classes/Node3D.xml2
-rw-r--r--doc/classes/Plane.xml6
-rw-r--r--doc/classes/Polygon2D.xml2
-rw-r--r--doc/classes/ProjectSettings.xml10
-rw-r--r--doc/classes/RenderingServer.xml2
-rw-r--r--doc/classes/SpinBox.xml2
-rw-r--r--doc/classes/Sprite2D.xml1
-rw-r--r--doc/classes/StyleBoxTexture.xml1
-rw-r--r--doc/classes/TextEdit.xml11
-rw-r--r--doc/classes/TileSet.xml1
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--doc/classes/Viewport.xml22
-rw-r--r--doc/classes/VisualShaderNodeUniform.xml8
-rw-r--r--editor/debugger/script_editor_debugger.cpp30
-rw-r--r--editor/editor_help.cpp2
-rw-r--r--editor/editor_inspector.cpp26
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_properties.cpp4
-rw-r--r--editor/editor_spin_slider.cpp17
-rw-r--r--editor/import/editor_import_collada.cpp6
-rw-r--r--editor/node_3d_editor_gizmos.cpp14
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp12
-rw-r--r--editor/plugins/material_editor_plugin.cpp6
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp6
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp45
-rw-r--r--editor/plugins/node_3d_editor_plugin.h1
-rw-r--r--editor/plugins/script_text_editor.cpp37
-rw-r--r--editor/plugins/script_text_editor.h2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp17
-rw-r--r--editor/property_editor.cpp4
-rw-r--r--editor/translations/ar.po597
-rw-r--r--editor/translations/bn.po9
-rw-r--r--editor/translations/de.po15
-rw-r--r--editor/translations/eo.po27
-rw-r--r--editor/translations/es.po92
-rw-r--r--editor/translations/es_AR.po28
-rw-r--r--editor/translations/fi.po19
-rw-r--r--editor/translations/fr.po54
-rw-r--r--editor/translations/he.po50
-rw-r--r--editor/translations/hu.po1
-rw-r--r--editor/translations/it.po17
-rw-r--r--editor/translations/ja.po111
-rw-r--r--editor/translations/ko.po16
-rw-r--r--editor/translations/mr.po20
-rw-r--r--editor/translations/nl.po55
-rw-r--r--editor/translations/pl.po11
-rw-r--r--editor/translations/pt_BR.po33
-rw-r--r--editor/translations/pt_PT.po41
-rw-r--r--editor/translations/ru.po17
-rw-r--r--editor/translations/sk.po26
-rw-r--r--editor/translations/uk.po10
-rw-r--r--editor/translations/zh_CN.po17
-rw-r--r--editor/translations/zh_HK.po587
-rw-r--r--main/main.cpp12
-rw-r--r--main/tests/test_math.cpp2
-rw-r--r--misc/dist/linux/org.godotengine.Godot.desktop1
-rw-r--r--modules/bullet/shape_bullet.cpp2
-rw-r--r--modules/csg/csg_shape.cpp4
-rw-r--r--modules/gdnative/gdnative/plane.cpp12
-rw-r--r--modules/gdnative/gdnative_api.json4
-rw-r--r--modules/gdnative/include/gdnative/plane.h4
-rw-r--r--modules/gdnavigation/nav_map.cpp2
-rw-r--r--modules/gdscript/gdscript.cpp20
-rw-r--r--modules/gdscript/gdscript.h6
-rw-r--r--modules/gdscript/gdscript_editor.cpp12
-rw-r--r--modules/gdscript/gdscript_function.cpp83
-rw-r--r--modules/gdscript/gdscript_function.h11
-rw-r--r--modules/gdscript/gdscript_functions.cpp5
-rw-r--r--modules/gdscript/gdscript_parser.cpp20
-rw-r--r--modules/gdscript/gdscript_tokenizer.cpp24
-rw-r--r--modules/gridmap/grid_map.cpp14
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp16
-rw-r--r--modules/mono/build_scripts/godot_tools_build.py8
-rw-r--r--modules/mono/build_scripts/solution_builder.py114
-rw-r--r--modules/mono/config.py1
-rw-r--r--modules/mono/csharp_script.cpp2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/GodotTools.csproj34
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs10
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs46
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs18
-rw-r--r--modules/mono/mono_gd/gd_mono_class.cpp18
-rw-r--r--modules/mono/mono_gd/gd_mono_class.h7
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h8
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/Godot.java15
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java16
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotIO.java6
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotLib.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java8
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java9
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java5
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.java5
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java8
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java7
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java3
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java15
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrConfigChooser.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrContextFactory.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrWindowSurfaceFactory.java1
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java6
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularFallbackConfigChooser.java4
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ConsumeTask.java2
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java11
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/HandlePurchaseTask.java1
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PaymentsManager.java3
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PurchaseTask.java1
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ReleaseAllConsumablesTask.java3
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ValidateTask.java7
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/CustomSSLSocketFactory.java2
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/HttpRequester.java5
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/RequestParams.java1
-rw-r--r--platform/linuxbsd/display_server_x11.cpp11
-rw-r--r--platform/linuxbsd/display_server_x11.h1
-rw-r--r--platform/windows/display_server_windows.cpp194
-rw-r--r--platform/windows/display_server_windows.h120
-rw-r--r--platform/windows/key_mapping_windows.cpp2
-rw-r--r--scene/2d/navigation_region_2d.cpp2
-rw-r--r--scene/2d/navigation_region_2d.h2
-rw-r--r--scene/2d/touch_screen_button.cpp5
-rw-r--r--scene/3d/audio_stream_player_3d.cpp13
-rw-r--r--scene/3d/camera_3d.cpp14
-rw-r--r--scene/3d/collision_object_3d.cpp2
-rw-r--r--scene/3d/node_3d.cpp6
-rw-r--r--scene/3d/node_3d.h2
-rw-r--r--scene/3d/ray_cast_3d.cpp2
-rw-r--r--scene/3d/soft_body_3d.cpp2
-rw-r--r--scene/3d/spring_arm_3d.cpp4
-rw-r--r--scene/3d/visibility_notifier_3d.cpp8
-rw-r--r--scene/3d/visual_instance_3d.cpp4
-rw-r--r--scene/3d/world_environment.cpp50
-rw-r--r--scene/3d/xr_nodes.cpp2
-rw-r--r--scene/animation/animation_player.cpp4
-rw-r--r--scene/animation/tween.cpp10
-rw-r--r--scene/gui/control.cpp2
-rw-r--r--scene/gui/link_button.cpp4
-rw-r--r--scene/gui/popup_menu.cpp6
-rw-r--r--scene/gui/popup_menu.h1
-rw-r--r--scene/gui/rich_text_label.cpp6
-rw-r--r--scene/gui/text_edit.cpp7
-rw-r--r--scene/gui/tree.cpp3
-rw-r--r--scene/main/scene_tree.cpp14
-rw-r--r--scene/main/viewport.cpp110
-rw-r--r--scene/main/viewport.h16
-rw-r--r--scene/resources/capsule_shape_2d.cpp3
-rw-r--r--scene/resources/curve.cpp4
-rw-r--r--scene/resources/dynamic_font.cpp28
-rw-r--r--scene/resources/dynamic_font.h6
-rw-r--r--scene/resources/font.cpp10
-rw-r--r--scene/resources/font.h4
-rw-r--r--scene/resources/line_shape_2d.cpp26
-rw-r--r--scene/resources/line_shape_2d.h6
-rw-r--r--scene/resources/mesh.cpp2
-rw-r--r--scene/resources/mesh_data_tool.cpp2
-rw-r--r--scene/resources/surface_tool.cpp6
-rw-r--r--scene/resources/visual_shader.cpp45
-rw-r--r--scene/resources/visual_shader.h17
-rw-r--r--scene/resources/visual_shader_nodes.cpp66
-rw-r--r--scene/resources/visual_shader_nodes.h14
-rw-r--r--scene/resources/world_margin_shape_3d.cpp12
-rw-r--r--servers/physics_3d/collision_solver_3d_sat.cpp2
-rw-r--r--servers/register_server_types.cpp1
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp2
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp8
-rw-r--r--servers/rendering/rendering_server_scene.h2
-rw-r--r--servers/rendering_server.cpp3
-rw-r--r--thirdparty/README.md2
-rw-r--r--thirdparty/freetype/include/freetype/config/ftconfig.h2
-rw-r--r--thirdparty/freetype/include/freetype/config/ftheader.h2
-rw-r--r--thirdparty/freetype/include/freetype/config/ftoption.h22
-rw-r--r--thirdparty/freetype/include/freetype/config/ftstdlib.h2
-rw-r--r--thirdparty/freetype/include/freetype/freetype.h35
-rw-r--r--thirdparty/freetype/include/freetype/ftadvanc.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftbbox.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftbdf.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftbitmap.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftbzip2.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftcache.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftcid.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftcolor.h17
-rw-r--r--thirdparty/freetype/include/freetype/ftdriver.h2
-rw-r--r--thirdparty/freetype/include/freetype/fterrdef.h2
-rw-r--r--thirdparty/freetype/include/freetype/fterrors.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftfntfmt.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftgasp.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftglyph.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftgxval.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftgzip.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftimage.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftincrem.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftlcdfil.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftlist.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftlzw.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftmac.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftmm.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftmodapi.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftmoderr.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftotval.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftoutln.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftparams.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftpfr.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftrender.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftsizes.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftsnames.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftstroke.h36
-rw-r--r--thirdparty/freetype/include/freetype/ftsynth.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftsystem.h2
-rw-r--r--thirdparty/freetype/include/freetype/fttrigon.h2
-rw-r--r--thirdparty/freetype/include/freetype/fttypes.h2
-rw-r--r--thirdparty/freetype/include/freetype/ftwinfnt.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/autohint.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/cffotypes.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/cfftypes.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftcalc.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftdebug.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftdrv.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftgloadr.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftmemory.h18
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftobjs.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftpsprop.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftrfork.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftserv.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftstream.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/fttrace.h3
-rw-r--r--thirdparty/freetype/include/freetype/internal/ftvalid.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/internal.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/psaux.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/pshints.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svbdf.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svcfftl.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svcid.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svfntfmt.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svgldict.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svgxval.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svkern.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svmetric.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svmm.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svotval.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svpfr.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svpostnm.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svprop.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svpscmap.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svpsinfo.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svsfnt.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svttcmap.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svtteng.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svttglyf.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/services/svwinfnt.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/sfnt.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/t1types.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/tttypes.h2
-rw-r--r--thirdparty/freetype/include/freetype/internal/wofftypes.h203
-rw-r--r--thirdparty/freetype/include/freetype/t1tables.h2
-rw-r--r--thirdparty/freetype/include/freetype/ttnameid.h2
-rw-r--r--thirdparty/freetype/include/freetype/tttables.h2
-rw-r--r--thirdparty/freetype/include/freetype/tttags.h3
-rw-r--r--thirdparty/freetype/include/ft2build.h2
-rw-r--r--thirdparty/freetype/src/autofit/afangles.c2
-rw-r--r--thirdparty/freetype/src/autofit/afblue.c12
-rw-r--r--thirdparty/freetype/src/autofit/afblue.cin2
-rw-r--r--thirdparty/freetype/src/autofit/afblue.dat15
-rw-r--r--thirdparty/freetype/src/autofit/afblue.h88
-rw-r--r--thirdparty/freetype/src/autofit/afblue.hin2
-rw-r--r--thirdparty/freetype/src/autofit/afcjk.c4
-rw-r--r--thirdparty/freetype/src/autofit/afcjk.h2
-rw-r--r--thirdparty/freetype/src/autofit/afcover.h2
-rw-r--r--thirdparty/freetype/src/autofit/afdummy.c2
-rw-r--r--thirdparty/freetype/src/autofit/afdummy.h2
-rw-r--r--thirdparty/freetype/src/autofit/aferrors.h2
-rw-r--r--thirdparty/freetype/src/autofit/afglobal.c2
-rw-r--r--thirdparty/freetype/src/autofit/afglobal.h2
-rw-r--r--thirdparty/freetype/src/autofit/afhints.c2
-rw-r--r--thirdparty/freetype/src/autofit/afhints.h2
-rw-r--r--thirdparty/freetype/src/autofit/afindic.c2
-rw-r--r--thirdparty/freetype/src/autofit/afindic.h2
-rw-r--r--thirdparty/freetype/src/autofit/aflatin.c6
-rw-r--r--thirdparty/freetype/src/autofit/aflatin.h2
-rw-r--r--thirdparty/freetype/src/autofit/aflatin2.c3
-rw-r--r--thirdparty/freetype/src/autofit/aflatin2.h2
-rw-r--r--thirdparty/freetype/src/autofit/afloader.c2
-rw-r--r--thirdparty/freetype/src/autofit/afloader.h2
-rw-r--r--thirdparty/freetype/src/autofit/afmodule.c2
-rw-r--r--thirdparty/freetype/src/autofit/afmodule.h2
-rw-r--r--thirdparty/freetype/src/autofit/afranges.c14
-rw-r--r--thirdparty/freetype/src/autofit/afranges.h2
-rw-r--r--thirdparty/freetype/src/autofit/afscript.h8
-rw-r--r--thirdparty/freetype/src/autofit/afshaper.c2
-rw-r--r--thirdparty/freetype/src/autofit/afshaper.h2
-rw-r--r--thirdparty/freetype/src/autofit/afstyles.h9
-rw-r--r--thirdparty/freetype/src/autofit/aftypes.h2
-rw-r--r--thirdparty/freetype/src/autofit/afwarp.c2
-rw-r--r--thirdparty/freetype/src/autofit/afwarp.h2
-rw-r--r--thirdparty/freetype/src/autofit/afwrtsys.h2
-rw-r--r--thirdparty/freetype/src/autofit/autofit.c2
-rw-r--r--thirdparty/freetype/src/autofit/module.mk2
-rw-r--r--thirdparty/freetype/src/autofit/rules.mk2
-rw-r--r--thirdparty/freetype/src/base/ftadvanc.c2
-rw-r--r--thirdparty/freetype/src/base/ftbase.c2
-rw-r--r--thirdparty/freetype/src/base/ftbase.h2
-rw-r--r--thirdparty/freetype/src/base/ftbbox.c10
-rw-r--r--thirdparty/freetype/src/base/ftbdf.c2
-rw-r--r--thirdparty/freetype/src/base/ftbitmap.c2
-rw-r--r--thirdparty/freetype/src/base/ftcalc.c2
-rw-r--r--thirdparty/freetype/src/base/ftcid.c2
-rw-r--r--thirdparty/freetype/src/base/ftcolor.c2
-rw-r--r--thirdparty/freetype/src/base/ftdbgmem.c8
-rw-r--r--thirdparty/freetype/src/base/ftdebug.c2
-rw-r--r--thirdparty/freetype/src/base/fterrors.c2
-rw-r--r--thirdparty/freetype/src/base/ftfntfmt.c2
-rw-r--r--thirdparty/freetype/src/base/ftfstype.c2
-rw-r--r--thirdparty/freetype/src/base/ftgasp.c2
-rw-r--r--thirdparty/freetype/src/base/ftgloadr.c22
-rw-r--r--thirdparty/freetype/src/base/ftglyph.c2
-rw-r--r--thirdparty/freetype/src/base/ftgxval.c2
-rw-r--r--thirdparty/freetype/src/base/ftinit.c2
-rw-r--r--thirdparty/freetype/src/base/ftlcdfil.c2
-rw-r--r--thirdparty/freetype/src/base/ftmac.c2
-rw-r--r--thirdparty/freetype/src/base/ftmm.c2
-rw-r--r--thirdparty/freetype/src/base/ftobjs.c2
-rw-r--r--thirdparty/freetype/src/base/ftotval.c2
-rw-r--r--thirdparty/freetype/src/base/ftoutln.c4
-rw-r--r--thirdparty/freetype/src/base/ftpatent.c2
-rw-r--r--thirdparty/freetype/src/base/ftpfr.c2
-rw-r--r--thirdparty/freetype/src/base/ftpsprop.c6
-rw-r--r--thirdparty/freetype/src/base/ftrfork.c2
-rw-r--r--thirdparty/freetype/src/base/ftsnames.c2
-rw-r--r--thirdparty/freetype/src/base/ftstream.c4
-rw-r--r--thirdparty/freetype/src/base/ftstroke.c215
-rw-r--r--thirdparty/freetype/src/base/ftsynth.c2
-rw-r--r--thirdparty/freetype/src/base/ftsystem.c2
-rw-r--r--thirdparty/freetype/src/base/fttrigon.c2
-rw-r--r--thirdparty/freetype/src/base/fttype1.c2
-rw-r--r--thirdparty/freetype/src/base/ftutil.c2
-rw-r--r--thirdparty/freetype/src/base/ftver.rc8
-rw-r--r--thirdparty/freetype/src/base/ftwinfnt.c2
-rw-r--r--thirdparty/freetype/src/base/rules.mk2
-rw-r--r--thirdparty/freetype/src/bzip2/ftbzip2.c2
-rw-r--r--thirdparty/freetype/src/bzip2/rules.mk2
-rw-r--r--thirdparty/freetype/src/cache/ftcache.c2
-rw-r--r--thirdparty/freetype/src/cache/ftcbasic.c2
-rw-r--r--thirdparty/freetype/src/cache/ftccache.c2
-rw-r--r--thirdparty/freetype/src/cache/ftccache.h2
-rw-r--r--thirdparty/freetype/src/cache/ftccback.h2
-rw-r--r--thirdparty/freetype/src/cache/ftccmap.c2
-rw-r--r--thirdparty/freetype/src/cache/ftcerror.h2
-rw-r--r--thirdparty/freetype/src/cache/ftcglyph.c2
-rw-r--r--thirdparty/freetype/src/cache/ftcglyph.h2
-rw-r--r--thirdparty/freetype/src/cache/ftcimage.c2
-rw-r--r--thirdparty/freetype/src/cache/ftcimage.h2
-rw-r--r--thirdparty/freetype/src/cache/ftcmanag.c2
-rw-r--r--thirdparty/freetype/src/cache/ftcmanag.h2
-rw-r--r--thirdparty/freetype/src/cache/ftcmru.c2
-rw-r--r--thirdparty/freetype/src/cache/ftcmru.h2
-rw-r--r--thirdparty/freetype/src/cache/ftcsbits.c2
-rw-r--r--thirdparty/freetype/src/cache/ftcsbits.h2
-rw-r--r--thirdparty/freetype/src/cache/rules.mk2
-rw-r--r--thirdparty/freetype/src/cff/cff.c2
-rw-r--r--thirdparty/freetype/src/cff/cffcmap.c2
-rw-r--r--thirdparty/freetype/src/cff/cffcmap.h2
-rw-r--r--thirdparty/freetype/src/cff/cffdrivr.c2
-rw-r--r--thirdparty/freetype/src/cff/cffdrivr.h2
-rw-r--r--thirdparty/freetype/src/cff/cfferrs.h2
-rw-r--r--thirdparty/freetype/src/cff/cffgload.c2
-rw-r--r--thirdparty/freetype/src/cff/cffgload.h2
-rw-r--r--thirdparty/freetype/src/cff/cffload.c4
-rw-r--r--thirdparty/freetype/src/cff/cffload.h2
-rw-r--r--thirdparty/freetype/src/cff/cffobjs.c8
-rw-r--r--thirdparty/freetype/src/cff/cffobjs.h2
-rw-r--r--thirdparty/freetype/src/cff/cffparse.c2
-rw-r--r--thirdparty/freetype/src/cff/cffparse.h2
-rw-r--r--thirdparty/freetype/src/cff/cfftoken.h2
-rw-r--r--thirdparty/freetype/src/cff/module.mk2
-rw-r--r--thirdparty/freetype/src/cff/rules.mk2
-rw-r--r--thirdparty/freetype/src/cid/ciderrs.h2
-rw-r--r--thirdparty/freetype/src/cid/cidgload.c2
-rw-r--r--thirdparty/freetype/src/cid/cidgload.h2
-rw-r--r--thirdparty/freetype/src/cid/cidload.c4
-rw-r--r--thirdparty/freetype/src/cid/cidload.h2
-rw-r--r--thirdparty/freetype/src/cid/cidobjs.c2
-rw-r--r--thirdparty/freetype/src/cid/cidobjs.h2
-rw-r--r--thirdparty/freetype/src/cid/cidparse.c2
-rw-r--r--thirdparty/freetype/src/cid/cidparse.h2
-rw-r--r--thirdparty/freetype/src/cid/cidriver.c2
-rw-r--r--thirdparty/freetype/src/cid/cidriver.h2
-rw-r--r--thirdparty/freetype/src/cid/cidtoken.h2
-rw-r--r--thirdparty/freetype/src/cid/module.mk2
-rw-r--r--thirdparty/freetype/src/cid/rules.mk2
-rw-r--r--thirdparty/freetype/src/cid/type1cid.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/README2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvalid.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvalid.h2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvbsln.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvcommn.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvcommn.h2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxverror.h2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvfeat.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvfeat.h2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvfgen.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvjust.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvkern.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvlcar.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmod.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmod.h2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmort.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmort.h2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmort0.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmort1.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmort2.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmort4.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmort5.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmorx.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmorx.h2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmorx0.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmorx1.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmorx2.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmorx4.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvmorx5.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvopbd.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvprop.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/gxvtrak.c2
-rw-r--r--thirdparty/freetype/src/gxvalid/module.mk2
-rw-r--r--thirdparty/freetype/src/gxvalid/rules.mk2
-rw-r--r--thirdparty/freetype/src/gzip/ftgzip.c12
-rw-r--r--thirdparty/freetype/src/gzip/infutil.h2
-rw-r--r--thirdparty/freetype/src/gzip/rules.mk2
-rw-r--r--thirdparty/freetype/src/lzw/ftlzw.c2
-rw-r--r--thirdparty/freetype/src/lzw/ftzopen.c2
-rw-r--r--thirdparty/freetype/src/lzw/ftzopen.h2
-rw-r--r--thirdparty/freetype/src/lzw/rules.mk2
-rw-r--r--thirdparty/freetype/src/otvalid/module.mk2
-rw-r--r--thirdparty/freetype/src/otvalid/otvalid.c2
-rw-r--r--thirdparty/freetype/src/otvalid/otvalid.h2
-rw-r--r--thirdparty/freetype/src/otvalid/otvbase.c2
-rw-r--r--thirdparty/freetype/src/otvalid/otvcommn.c5
-rw-r--r--thirdparty/freetype/src/otvalid/otvcommn.h2
-rw-r--r--thirdparty/freetype/src/otvalid/otverror.h2
-rw-r--r--thirdparty/freetype/src/otvalid/otvgdef.c2
-rw-r--r--thirdparty/freetype/src/otvalid/otvgpos.c2
-rw-r--r--thirdparty/freetype/src/otvalid/otvgpos.h2
-rw-r--r--thirdparty/freetype/src/otvalid/otvgsub.c2
-rw-r--r--thirdparty/freetype/src/otvalid/otvjstf.c2
-rw-r--r--thirdparty/freetype/src/otvalid/otvmath.c2
-rw-r--r--thirdparty/freetype/src/otvalid/otvmod.c2
-rw-r--r--thirdparty/freetype/src/otvalid/otvmod.h2
-rw-r--r--thirdparty/freetype/src/otvalid/rules.mk2
-rw-r--r--thirdparty/freetype/src/pfr/module.mk2
-rw-r--r--thirdparty/freetype/src/pfr/pfr.c2
-rw-r--r--thirdparty/freetype/src/pfr/pfrcmap.c2
-rw-r--r--thirdparty/freetype/src/pfr/pfrcmap.h2
-rw-r--r--thirdparty/freetype/src/pfr/pfrdrivr.c2
-rw-r--r--thirdparty/freetype/src/pfr/pfrdrivr.h2
-rw-r--r--thirdparty/freetype/src/pfr/pfrerror.h2
-rw-r--r--thirdparty/freetype/src/pfr/pfrgload.c2
-rw-r--r--thirdparty/freetype/src/pfr/pfrgload.h2
-rw-r--r--thirdparty/freetype/src/pfr/pfrload.c2
-rw-r--r--thirdparty/freetype/src/pfr/pfrload.h2
-rw-r--r--thirdparty/freetype/src/pfr/pfrobjs.c2
-rw-r--r--thirdparty/freetype/src/pfr/pfrobjs.h2
-rw-r--r--thirdparty/freetype/src/pfr/pfrsbit.c2
-rw-r--r--thirdparty/freetype/src/pfr/pfrsbit.h2
-rw-r--r--thirdparty/freetype/src/pfr/pfrtypes.h2
-rw-r--r--thirdparty/freetype/src/pfr/rules.mk2
-rw-r--r--thirdparty/freetype/src/psaux/afmparse.c2
-rw-r--r--thirdparty/freetype/src/psaux/afmparse.h2
-rw-r--r--thirdparty/freetype/src/psaux/cffdecode.c7
-rw-r--r--thirdparty/freetype/src/psaux/cffdecode.h2
-rw-r--r--thirdparty/freetype/src/psaux/module.mk2
-rw-r--r--thirdparty/freetype/src/psaux/psaux.c2
-rw-r--r--thirdparty/freetype/src/psaux/psauxerr.h2
-rw-r--r--thirdparty/freetype/src/psaux/psauxmod.c2
-rw-r--r--thirdparty/freetype/src/psaux/psauxmod.h2
-rw-r--r--thirdparty/freetype/src/psaux/psconv.c2
-rw-r--r--thirdparty/freetype/src/psaux/psconv.h2
-rw-r--r--thirdparty/freetype/src/psaux/psft.c8
-rw-r--r--thirdparty/freetype/src/psaux/psintrp.c22
-rw-r--r--thirdparty/freetype/src/psaux/psobjs.c6
-rw-r--r--thirdparty/freetype/src/psaux/psobjs.h2
-rw-r--r--thirdparty/freetype/src/psaux/rules.mk2
-rw-r--r--thirdparty/freetype/src/psaux/t1cmap.c2
-rw-r--r--thirdparty/freetype/src/psaux/t1cmap.h2
-rw-r--r--thirdparty/freetype/src/psaux/t1decode.c85
-rw-r--r--thirdparty/freetype/src/psaux/t1decode.h2
-rw-r--r--thirdparty/freetype/src/pshinter/module.mk2
-rw-r--r--thirdparty/freetype/src/pshinter/pshalgo.c2
-rw-r--r--thirdparty/freetype/src/pshinter/pshalgo.h2
-rw-r--r--thirdparty/freetype/src/pshinter/pshglob.c2
-rw-r--r--thirdparty/freetype/src/pshinter/pshglob.h2
-rw-r--r--thirdparty/freetype/src/pshinter/pshinter.c2
-rw-r--r--thirdparty/freetype/src/pshinter/pshmod.c2
-rw-r--r--thirdparty/freetype/src/pshinter/pshmod.h2
-rw-r--r--thirdparty/freetype/src/pshinter/pshnterr.h2
-rw-r--r--thirdparty/freetype/src/pshinter/pshrec.c2
-rw-r--r--thirdparty/freetype/src/pshinter/pshrec.h2
-rw-r--r--thirdparty/freetype/src/pshinter/rules.mk2
-rw-r--r--thirdparty/freetype/src/psnames/module.mk2
-rw-r--r--thirdparty/freetype/src/psnames/psmodule.c2
-rw-r--r--thirdparty/freetype/src/psnames/psmodule.h2
-rw-r--r--thirdparty/freetype/src/psnames/psnamerr.h2
-rw-r--r--thirdparty/freetype/src/psnames/psnames.c2
-rw-r--r--thirdparty/freetype/src/psnames/pstables.h2
-rw-r--r--thirdparty/freetype/src/psnames/rules.mk2
-rw-r--r--thirdparty/freetype/src/raster/ftmisc.h2
-rw-r--r--thirdparty/freetype/src/raster/ftraster.c2
-rw-r--r--thirdparty/freetype/src/raster/ftraster.h2
-rw-r--r--thirdparty/freetype/src/raster/ftrend1.c2
-rw-r--r--thirdparty/freetype/src/raster/ftrend1.h2
-rw-r--r--thirdparty/freetype/src/raster/module.mk2
-rw-r--r--thirdparty/freetype/src/raster/raster.c2
-rw-r--r--thirdparty/freetype/src/raster/rasterrs.h2
-rw-r--r--thirdparty/freetype/src/raster/rules.mk2
-rw-r--r--thirdparty/freetype/src/sfnt/module.mk2
-rw-r--r--thirdparty/freetype/src/sfnt/pngshim.c3
-rw-r--r--thirdparty/freetype/src/sfnt/pngshim.h2
-rw-r--r--thirdparty/freetype/src/sfnt/rules.mk30
-rw-r--r--thirdparty/freetype/src/sfnt/sfdriver.c2
-rw-r--r--thirdparty/freetype/src/sfnt/sfdriver.h2
-rw-r--r--thirdparty/freetype/src/sfnt/sferrors.h2
-rw-r--r--thirdparty/freetype/src/sfnt/sfnt.c4
-rw-r--r--thirdparty/freetype/src/sfnt/sfobjs.c38
-rw-r--r--thirdparty/freetype/src/sfnt/sfobjs.h2
-rw-r--r--thirdparty/freetype/src/sfnt/sfwoff.c12
-rw-r--r--thirdparty/freetype/src/sfnt/sfwoff.h2
-rw-r--r--thirdparty/freetype/src/sfnt/sfwoff2.c2328
-rw-r--r--thirdparty/freetype/src/sfnt/sfwoff2.h76
-rw-r--r--thirdparty/freetype/src/sfnt/ttbdf.c2
-rw-r--r--thirdparty/freetype/src/sfnt/ttbdf.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttcmap.c29
-rw-r--r--thirdparty/freetype/src/sfnt/ttcmap.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttcmapc.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttcolr.c2
-rw-r--r--thirdparty/freetype/src/sfnt/ttcolr.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttcpal.c2
-rw-r--r--thirdparty/freetype/src/sfnt/ttcpal.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttkern.c2
-rw-r--r--thirdparty/freetype/src/sfnt/ttkern.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttload.c12
-rw-r--r--thirdparty/freetype/src/sfnt/ttload.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttmtx.c2
-rw-r--r--thirdparty/freetype/src/sfnt/ttmtx.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttpost.c2
-rw-r--r--thirdparty/freetype/src/sfnt/ttpost.h2
-rw-r--r--thirdparty/freetype/src/sfnt/ttsbit.c2
-rw-r--r--thirdparty/freetype/src/sfnt/ttsbit.h2
-rw-r--r--thirdparty/freetype/src/sfnt/woff2tags.c110
-rw-r--r--thirdparty/freetype/src/sfnt/woff2tags.h39
-rw-r--r--thirdparty/freetype/src/smooth/ftgrays.c2
-rw-r--r--thirdparty/freetype/src/smooth/ftgrays.h2
-rw-r--r--thirdparty/freetype/src/smooth/ftsmerrs.h2
-rw-r--r--thirdparty/freetype/src/smooth/ftsmooth.c9
-rw-r--r--thirdparty/freetype/src/smooth/ftsmooth.h2
-rw-r--r--thirdparty/freetype/src/smooth/module.mk2
-rw-r--r--thirdparty/freetype/src/smooth/rules.mk2
-rw-r--r--thirdparty/freetype/src/smooth/smooth.c2
-rw-r--r--thirdparty/freetype/src/truetype/module.mk2
-rw-r--r--thirdparty/freetype/src/truetype/rules.mk2
-rw-r--r--thirdparty/freetype/src/truetype/truetype.c2
-rw-r--r--thirdparty/freetype/src/truetype/ttdriver.c2
-rw-r--r--thirdparty/freetype/src/truetype/ttdriver.h2
-rw-r--r--thirdparty/freetype/src/truetype/tterrors.h2
-rw-r--r--thirdparty/freetype/src/truetype/ttgload.c34
-rw-r--r--thirdparty/freetype/src/truetype/ttgload.h2
-rw-r--r--thirdparty/freetype/src/truetype/ttgxvar.c133
-rw-r--r--thirdparty/freetype/src/truetype/ttgxvar.h2
-rw-r--r--thirdparty/freetype/src/truetype/ttinterp.c33
-rw-r--r--thirdparty/freetype/src/truetype/ttinterp.h2
-rw-r--r--thirdparty/freetype/src/truetype/ttobjs.c2
-rw-r--r--thirdparty/freetype/src/truetype/ttobjs.h2
-rw-r--r--thirdparty/freetype/src/truetype/ttpload.c4
-rw-r--r--thirdparty/freetype/src/truetype/ttpload.h2
-rw-r--r--thirdparty/freetype/src/truetype/ttsubpix.c2
-rw-r--r--thirdparty/freetype/src/truetype/ttsubpix.h2
-rw-r--r--thirdparty/freetype/src/type1/module.mk2
-rw-r--r--thirdparty/freetype/src/type1/rules.mk2
-rw-r--r--thirdparty/freetype/src/type1/t1afm.c2
-rw-r--r--thirdparty/freetype/src/type1/t1afm.h2
-rw-r--r--thirdparty/freetype/src/type1/t1driver.c2
-rw-r--r--thirdparty/freetype/src/type1/t1driver.h2
-rw-r--r--thirdparty/freetype/src/type1/t1errors.h2
-rw-r--r--thirdparty/freetype/src/type1/t1gload.c2
-rw-r--r--thirdparty/freetype/src/type1/t1gload.h2
-rw-r--r--thirdparty/freetype/src/type1/t1load.c44
-rw-r--r--thirdparty/freetype/src/type1/t1load.h2
-rw-r--r--thirdparty/freetype/src/type1/t1objs.c2
-rw-r--r--thirdparty/freetype/src/type1/t1objs.h2
-rw-r--r--thirdparty/freetype/src/type1/t1parse.c2
-rw-r--r--thirdparty/freetype/src/type1/t1parse.h2
-rw-r--r--thirdparty/freetype/src/type1/t1tokens.h2
-rw-r--r--thirdparty/freetype/src/type1/type1.c2
-rw-r--r--thirdparty/freetype/src/type42/module.mk2
-rw-r--r--thirdparty/freetype/src/type42/rules.mk2
-rw-r--r--thirdparty/freetype/src/type42/t42drivr.c2
-rw-r--r--thirdparty/freetype/src/type42/t42drivr.h2
-rw-r--r--thirdparty/freetype/src/type42/t42error.h2
-rw-r--r--thirdparty/freetype/src/type42/t42objs.c2
-rw-r--r--thirdparty/freetype/src/type42/t42objs.h2
-rw-r--r--thirdparty/freetype/src/type42/t42parse.c2
-rw-r--r--thirdparty/freetype/src/type42/t42parse.h2
-rw-r--r--thirdparty/freetype/src/type42/t42types.h2
-rw-r--r--thirdparty/freetype/src/type42/type42.c2
-rw-r--r--thirdparty/freetype/src/winfonts/fnterrs.h2
-rw-r--r--thirdparty/freetype/src/winfonts/module.mk2
-rw-r--r--thirdparty/freetype/src/winfonts/rules.mk2
-rw-r--r--thirdparty/freetype/src/winfonts/winfnt.c8
-rw-r--r--thirdparty/freetype/src/winfonts/winfnt.h2
-rw-r--r--thirdparty/jpeg-compressor/jpgd.cpp16
-rw-r--r--thirdparty/jpeg-compressor/patches/fix-msvc-sse2-detection.patch44
-rw-r--r--thirdparty/vhacd/0005-fix-scale-calculation.patch20
-rw-r--r--thirdparty/vhacd/inc/vhacdVolume.h4
654 files changed, 6329 insertions, 2562 deletions
diff --git a/.clang-format b/.clang-format
index eba6d586f0..b3f1954545 100644
--- a/.clang-format
+++ b/.clang-format
@@ -124,4 +124,5 @@ ObjCBlockIndentWidth: 4
### Java specific config ###
Language: Java
# BreakAfterJavaFieldAnnotations: false
+JavaImportGroups: ['org.godotengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
...
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index db85071fa5..81da02ab39 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -154,7 +154,7 @@ License: Expat and Bitstream Vera Fonts Copyright
Files: ./thirdparty/freetype/
Comment: The FreeType Project
-Copyright: 1996-2019, David Turner, Robert Wilhelm, and Werner Lemberg.
+Copyright: 1996-2020, David Turner, Robert Wilhelm, and Werner Lemberg.
License: FTL
Files: ./thirdparty/glad/
diff --git a/DONORS.md b/DONORS.md
index f11cb85822..134dc0484b 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -25,7 +25,6 @@ generous deed immortalized in the next stable release of Godot Engine.
AD Ford
Alan Beauchamp
Anand Mallik
- Andres Hernandez
Andrew Dunai
Brandon Lamb
Christian Baune
@@ -36,7 +35,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Edward Flick
Gamechuck
GameDev.net
- GameDev.tv
Grady
Hein-Pieter van Braam
Jacob McKenney
@@ -60,13 +58,10 @@ generous deed immortalized in the next stable release of Godot Engine.
## Gold donors
- Andrei
- Dave
David Gehrig
David Graham
David Snopek
Ed Morley
- Florian Krick
Florian Rämisch
Jakub Grzesik
Manuele Finocchiaro
@@ -85,11 +80,9 @@ generous deed immortalized in the next stable release of Godot Engine.
David Giardi
Default Name
eggs
- Felix Bohmann
Florian Breisch
Gamejunkey
Javier Roman
- Jay Horton
Jon Woodward
Karl Werf
Keinan Powers
@@ -100,6 +93,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Matthew Hillier
Mohamed Ikbel Boulabiar
Mored4u
+ Rene
Retro Village
Rob Messick
Ryan Badour
@@ -122,15 +116,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Darrian Little
Horváth Péter
Ivan Trombley
- Jakub Dering
Joan Fons
Joshua Flores
- Krzysztof Jankowski
- Lord Bloodhound
- Pascal Grüter
Petr Malac
Rami
- Reneator
Rob
Robert Willes
Ronnie Ashlock
@@ -144,9 +133,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Adam Nakonieczny
Adam Neumann
+ Adrian Demetrescu
Alexander J Maynard
Alexey Dyadchenko
- Alex Z
Andreas Funke
André Frélicot
aoshiwik
@@ -158,50 +147,42 @@ generous deed immortalized in the next stable release of Godot Engine.
Christian Alexander Bjørklund Bøhler
Christian Leth Jeppesen
Christoph Schröder
+ Codee Leaf
Cody Parker
Coldragon
Craig Ostrin
D
- Daniel Eichler
- David White
- Denis Janßen
Easypete
Eric Monson
- ethan ball
Eugenio Hugo Salgüero Jáñez
Fain
flesk
Gary Hulst
gavlig
GGGames.org
- Green Fox
Guilherme Felipe de C. G. da Silva
Halom Vered
Heath Hayes
- Idzard Kwadijk
Isaac Clausman
Jared White
Jeff Nyte
- Jeremy Sims
- Jerry Ling
Joe Flood
John G Gentzel
- Jon Hermansen
Jose Malheiro
Joshua Lesperance
Juan Velandia
Juraj Móza
Kelteseth
+ kickmaniac
kinfox
+ Lain Ballard
Marcelo Dornbusch Lopes
Markus Fehr
Markus Wiesner
Martin Eigel
Matt Eunson
- Max Bulai
m kaersten
MuffinManKen
- Nick Nikitin
Oliver Dick
Oscar Campos
Patrick Ting
@@ -210,9 +191,8 @@ generous deed immortalized in the next stable release of Godot Engine.
Pete Goodwin
pl
Ranoller
- Robert Larnach
+ Rob McInroy
Rocknight Studios
- Romildo Franco
Ryan
Samuel Judd
Scott Pilet
@@ -221,10 +201,8 @@ generous deed immortalized in the next stable release of Godot Engine.
Sindre Sømme
SleepCircle
spilldata
- Steve Hyatt
Stoned Xander
TheLevelOfDetail .
- Thomas Krampl
Thomas Kurz
Tobias Bocanegra
Urho
@@ -237,6 +215,7 @@ generous deed immortalized in the next stable release of Godot Engine.
1D_Inc
Abraham Haskins
+ Acheron
Adam
Adam Brunnmeier
Adam Carr
@@ -247,7 +226,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Adam Smeltzer
Adam Szymański
Adisibio
- Adrian Demetrescu
Agustinus Arya
Aidan O'Flannagain
Aki Mimoto
@@ -279,14 +257,13 @@ generous deed immortalized in the next stable release of Godot Engine.
B A
Balázs Batári
Benedikt
- Ben G
- Ben Phelan
Ben Vercammen
Bernd Jänichen
Bjarne
Black Block
Blair Allen
Bobby CC Wong
+ Bram
brian
bugcaptor
Burney Waring
@@ -294,6 +271,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Carlo Sitaro
Carl van der Geest
Carwyn Edwards
+ Cas Brugman
Cassidy James
Chris Brown
Chris Chapin
@@ -304,17 +282,17 @@ generous deed immortalized in the next stable release of Godot Engine.
Christopher Schmitt
Christoph Woinke
Clay Heaton
+ Cole Johnson
Curt King
Daniel Johnson
Daniel Kimblad
- Daniel Pontillo
+ Daniel Tebbutt
David May
David Woodard
DiCola Jamn
Dominic Cooney
Dominik Wetzel
Donn Eddy
- Donovan Hutcheon
Dragontrapper
Dr Ewan Murray
Duobix
@@ -322,9 +300,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Dylan Todd
Eduardo Teixeira
Edward Herbert
- Edward Moulsdale
Edward Swartz
Egon Elbre
+ Elgenzay
Elias Nykrem
Elmeri '- Duy Kevin Nguyen
Ephemeral
@@ -335,20 +313,21 @@ generous deed immortalized in the next stable release of Godot Engine.
Evan Rose
Fancy Ants Studios
Fekinox
+ Felix Bohmann
Felix Kollmann
Flaredown
Forty Doubleu
+ fox
FuDiggity
Gadzhi Kharkharov
gamedev by Celio
Gary Thomas
George Marques
- GiulianoB
Greg Olson
GREGORY C FEIN
- Greg P
Greyson Richey
Grid
+ Guillaume Audirac
Guldoman
Hal A
Heribert Hirth
@@ -358,6 +337,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Iiari
iKlem
IndustrialRobot
+ Ivan Nikolaev
Jacob
Jaiden Gerig
Jaime Ruiz-Borau Vizárraga
@@ -368,26 +348,26 @@ generous deed immortalized in the next stable release of Godot Engine.
JARKKO PARVIAINEN
Jeff Hungerford
Jennifer Graves
- Jeremy Kahn
Jesse Dubay
Joel Fivat
Joel Höglund
Joel Setterberg
- Johannes Wuensch
John Gabriel
+ John Walker
Jomei Jackson
+ Jonas
Jonas Bernemann
Jonas Rudlang
Jonas Yamazaki
Jonatan R
Jonathan G
- Jonathon
Jon Bonazza
Jon Sully
Jorge Caballero
Jose Aleman
Jose C. Rubio
Joseph Catrambone
+ Josh Mitchell
Juanfran
Judd
Julian Murgia
@@ -395,16 +375,16 @@ generous deed immortalized in the next stable release of Godot Engine.
Justin Hamilton
Justin Spedding
KaDokta
+ Karel Němec
Kauzig
Keedong Park
Keith Bradner
+ Kent Jofur
Kevin McPhillips
- kickmaniac
Kiri Jolly
Kiyohiro Kawamura (kyorohiro)
Kjetil Haugland
Klagsam
- KR McGinley
KsyTek Games
Kuan Cheang
kycho
@@ -415,6 +395,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Lin Chear
Linus Lind Lundgren
Lionel Gaillard
+ Lukáš Rendvanský
Luigi Renna
LunaticInAHat
Lurkars
@@ -429,10 +410,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Mathieu Rimelen
Matt Edwards
Matthew Little
- Matti Pohjanvirta
+ Mauro Pellegrini
+ Max Fiedler
Maxime Blade
Maxwell
- medecau
Megasploot
Melissa Mears
mewin
@@ -447,6 +428,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Mike Cunningham
Mitchell J. Wagner
MoM
+ Mored4u
Nathan Fish
Natrim
nee
@@ -456,9 +438,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Nicholas
Nicholas Girga
Nick Macholl
+ Niclas Eriksen
Nicolás Montaña
Nicolas SAN AGUSTIN
- Nima Farid
NZ
Oleg Reva
Olivier
@@ -471,13 +453,11 @@ generous deed immortalized in the next stable release of Godot Engine.
Paweł Kowal
Pedro Assuncao
Penguin
- Petrus Prinsloo
Philip Cohoe
Point08
Rad Cat
Rafa Laguna
rainerLinux
- Raphael Leroux
Remi Rampin
Rémi Verschelde
Ricardo Alcantara
@@ -485,7 +465,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Richard Ivánek
Robert Farr (Larington)
Robert Hernandez
- Roberto Sánchez
Roger Smith
Roland RzÄ…sa
Roman Tinkov
@@ -493,26 +472,28 @@ generous deed immortalized in the next stable release of Godot Engine.
Ronan
Ryan Groom
Ryan Hentz
- Sam.C
Sam Edson
Samuele Zolfanelli
- Sasori Olkof
Scott D. Yelich
Scott Longley
+ ScottMakesGames
Sebastian Michailidis
Sebastian Vetter
Sergio Mello-Grand
- sgnsajgon
Shane
Shane Sicienski
Shane Spoor
Siim Raidma
+ Simon Jonas Larsen
Simon Wenner
+ Sintinium
SK
smbe19
smo1704
Stefano Caronia
+ Steve Cloete
Svenne Krap
+ Taylor Fahlman
Terry
tezuvholovdr
thomas
@@ -521,10 +502,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Thomas Kelly
Tim Drumheller
Timothy B. MacDonald
- tinyBigGames LLC
Title Plinsut
Tobbun
Tom Glenn
+ Toni Duran
Torgeir Lilleskog
Torsten Crass
Travis O'Brien
diff --git a/core/array.cpp b/core/array.cpp
index cd4e0fb4c8..7c0129ffde 100644
--- a/core/array.cpp
+++ b/core/array.cpp
@@ -285,59 +285,49 @@ Array Array::duplicate(bool p_deep) const {
return new_arr;
}
-int Array::_fix_slice_index(int p_index, int p_arr_len, int p_top_mod) {
- p_index = CLAMP(p_index, -p_arr_len, p_arr_len + p_top_mod);
- if (p_index < 0) {
- p_index = (p_index % p_arr_len + p_arr_len) % p_arr_len; // positive modulo
- }
- return p_index;
-}
+int Array::_clamp_slice_index(int p_index) const {
-int Array::_clamp_index(int p_index) const {
- return CLAMP(p_index, -size() + 1, size() - 1);
+ int arr_size = size();
+ int fixed_index = CLAMP(p_index, -arr_size, arr_size - 1);
+ if (fixed_index < 0) {
+ fixed_index = arr_size + fixed_index;
+ }
+ return fixed_index;
}
-#define ARRAY_GET_DEEP(idx, is_deep) is_deep ? get(idx).duplicate(is_deep) : get(idx)
-
Array Array::slice(int p_begin, int p_end, int p_step, bool p_deep) const { // like python, but inclusive on upper bound
- Array new_arr;
-
- if (empty()) // Don't try to slice empty arrays.
- return new_arr;
- p_begin = Array::_fix_slice_index(p_begin, size(), -1); // can't start out of range
- p_end = Array::_fix_slice_index(p_end, size(), 0);
+ Array new_arr;
- int x = p_begin;
- int new_arr_i = 0;
+ ERR_FAIL_COND_V_MSG(p_step == 0, new_arr, "Array slice step size cannot be zero.");
- ERR_FAIL_COND_V(p_step == 0, new_arr);
- if (Array::_clamp_index(p_begin) == Array::_clamp_index(p_end)) { // don't include element twice
- new_arr.resize(1);
- // new_arr[0] = 1;
- new_arr[0] = ARRAY_GET_DEEP(Array::_clamp_index(p_begin), p_deep);
+ if (empty()) // Don't try to slice empty arrays.
return new_arr;
- } else {
- int element_count = ceil((int)MAX(0, (p_end - p_begin) / p_step)) + 1;
- if (element_count == 1) { // delta going in wrong direction to reach end
- new_arr.resize(0);
+ if (p_step > 0) {
+ if (p_begin >= size() || p_end < -size())
+ return new_arr;
+ } else { // p_step < 0
+ if (p_begin < -size() || p_end >= size())
return new_arr;
- }
- new_arr.resize(element_count);
}
- // if going backwards, have to have a different terminating condition
- if (p_step < 0) {
- while (x >= p_end) {
- new_arr[new_arr_i] = ARRAY_GET_DEEP(Array::_clamp_index(x), p_deep);
- x += p_step;
- new_arr_i += 1;
+ int begin = _clamp_slice_index(p_begin);
+ int end = _clamp_slice_index(p_end);
+
+ int new_arr_size = MAX(((end - begin + p_step) / p_step), 0);
+ new_arr.resize(new_arr_size);
+
+ if (p_step > 0) {
+ int dest_idx = 0;
+ for (int idx = begin; idx <= end; idx += p_step) {
+ ERR_FAIL_COND_V_MSG(dest_idx < 0 || dest_idx >= new_arr_size, Array(), "Bug in Array slice()");
+ new_arr[dest_idx++] = p_deep ? get(idx).duplicate(p_deep) : get(idx);
}
- } else if (p_step > 0) {
- while (x <= p_end) {
- new_arr[new_arr_i] = ARRAY_GET_DEEP(Array::_clamp_index(x), p_deep);
- x += p_step;
- new_arr_i += 1;
+ } else { // p_step < 0
+ int dest_idx = 0;
+ for (int idx = begin; idx >= end; idx += p_step) {
+ ERR_FAIL_COND_V_MSG(dest_idx < 0 || dest_idx >= new_arr_size, Array(), "Bug in Array slice()");
+ new_arr[dest_idx++] = p_deep ? get(idx).duplicate(p_deep) : get(idx);
}
}
diff --git a/core/array.h b/core/array.h
index 2840ce199c..14db57f15f 100644
--- a/core/array.h
+++ b/core/array.h
@@ -44,8 +44,7 @@ class Array {
void _ref(const Array &p_from) const;
void _unref() const;
- int _clamp_index(int p_index) const;
- static int _fix_slice_index(int p_index, int p_arr_len, int p_top_mod);
+ inline int _clamp_slice_index(int p_index) const;
protected:
Array(const Array &p_base, uint32_t p_type, const StringName &p_class_name, const Variant &p_script);
diff --git a/core/color.h b/core/color.h
index d95e80f5da..8b689fdde1 100644
--- a/core/color.h
+++ b/core/color.h
@@ -205,7 +205,7 @@ struct Color {
operator String() const;
/**
- * No construct parameters, r=0, g=0, b=0. a=255
+ * No construct parameters, r=0, g=0, b=0. a=1
*/
_FORCE_INLINE_ Color() {
r = 0;
@@ -223,6 +223,16 @@ struct Color {
b = p_b;
a = p_a;
}
+
+ /**
+ * Construct a Color from another Color, but with the specified alpha value.
+ */
+ _FORCE_INLINE_ Color(const Color &p_c, float p_a) {
+ r = p_c.r;
+ g = p_c.g;
+ b = p_c.b;
+ a = p_a;
+ }
};
bool Color::operator<(const Color &p_color) const {
diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp
index fd109c62b6..97d5c71b6f 100644
--- a/core/debugger/remote_debugger.cpp
+++ b/core/debugger/remote_debugger.cpp
@@ -466,7 +466,7 @@ void RemoteDebugger::_print_handler(void *p_this, const String &p_string, bool p
String s = p_string;
int allowed_chars = MIN(MAX(rd->max_chars_per_second - rd->char_count, 0), s.length());
- if (allowed_chars == 0)
+ if (allowed_chars == 0 && s.length() > 0)
return;
if (allowed_chars < s.length()) {
@@ -480,10 +480,16 @@ void RemoteDebugger::_print_handler(void *p_this, const String &p_string, bool p
if (rd->is_peer_connected()) {
if (overflowed)
s += "[...]";
- rd->output_strings.push_back(s);
+
+ OutputString output_string;
+ output_string.message = s;
+ output_string.type = p_error ? MESSAGE_TYPE_ERROR : MESSAGE_TYPE_LOG;
+ rd->output_strings.push_back(output_string);
if (overflowed) {
- rd->output_strings.push_back("[output overflow, print less text!]");
+ output_string.message = "[output overflow, print less text!]";
+ output_string.type = MESSAGE_TYPE_ERROR;
+ rd->output_strings.push_back(output_string);
}
}
}
@@ -517,15 +523,32 @@ void RemoteDebugger::flush_output() {
if (output_strings.size()) {
// Join output strings so we generate less messages.
+ Vector<String> joined_log_strings;
Vector<String> strings;
- strings.resize(output_strings.size());
- String *w = strings.ptrw();
+ Vector<int> types;
for (int i = 0; i < output_strings.size(); i++) {
- w[i] = output_strings[i];
+ const OutputString &output_string = output_strings[i];
+ if (output_string.type == MESSAGE_TYPE_ERROR) {
+ if (!joined_log_strings.empty()) {
+ strings.push_back(String("\n").join(joined_log_strings));
+ types.push_back(MESSAGE_TYPE_LOG);
+ joined_log_strings.clear();
+ }
+ strings.push_back(output_string.message);
+ types.push_back(MESSAGE_TYPE_ERROR);
+ } else {
+ joined_log_strings.push_back(output_string.message);
+ }
+ }
+
+ if (!joined_log_strings.empty()) {
+ strings.push_back(String("\n").join(joined_log_strings));
+ types.push_back(MESSAGE_TYPE_LOG);
}
Array arr;
arr.push_back(strings);
+ arr.push_back(types);
_put_msg("output", arr);
output_strings.clear();
}
diff --git a/core/debugger/remote_debugger.h b/core/debugger/remote_debugger.h
index f805eec631..cac0bc3730 100644
--- a/core/debugger/remote_debugger.h
+++ b/core/debugger/remote_debugger.h
@@ -40,6 +40,11 @@
#include "core/ustring.h"
class RemoteDebugger : public EngineDebugger {
+public:
+ enum MessageType {
+ MESSAGE_TYPE_LOG,
+ MESSAGE_TYPE_ERROR,
+ };
private:
typedef DebuggerMarshalls::OutputError ErrorMessage;
@@ -57,7 +62,11 @@ private:
Ref<RemoteDebuggerPeer> peer;
- List<String> output_strings;
+ struct OutputString {
+ String message;
+ MessageType type;
+ };
+ List<OutputString> output_strings;
List<ErrorMessage> errors;
int n_messages_dropped = 0;
diff --git a/core/input/godotcontrollerdb.txt b/core/input/godotcontrollerdb.txt
index f6411e2429..adc3649d64 100644
--- a/core/input/godotcontrollerdb.txt
+++ b/core/input/godotcontrollerdb.txt
@@ -1,6 +1,9 @@
# Game Controller DB for Godot in SDL 2.0.10 format
# Source: https://github.com/godotengine/godot
+# Windows
+__XINPUT_DEVICE__,XInput Gamepad,a:b12,b:b13,x:b14,y:b15,start:b4,back:b5,leftstick:b6,rightstick:b7,leftshoulder:b8,rightshoulder:b9,dpup:b0,dpdown:b1,dpleft:b2,dpright:b3,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Windows,
+
# Javascript
Default HTML5 Gamepad, Default Mapping,leftx:a0,lefty:a1,dpdown:b13,rightstick:b11,rightshoulder:b5,rightx:a2,start:b9,righty:a3,dpleft:b14,lefttrigger:a6,x:b2,dpup:b12,back:b8,leftstick:b10,leftshoulder:b4,y:b3,a:b0,dpright:b15,righttrigger:a7,b:b1,platform:Javascript,
c2a94d6963726f736f66742058626f78,Wireless X360 Controller,leftx:a0,lefty:a1,dpdown:b14,rightstick:b10,rightshoulder:b5,rightx:a3,start:b7,righty:a4,dpleft:b11,lefttrigger:a2,x:b2,dpup:b13,back:b6,leftstick:b9,leftshoulder:b4,y:b3,a:b0,dpright:b12,righttrigger:a5,b:b1,platform:Javascript,
diff --git a/core/input/input_event.cpp b/core/input/input_event.cpp
index d18adb1983..4b8c104f39 100644
--- a/core/input/input_event.cpp
+++ b/core/input/input_event.cpp
@@ -708,7 +708,7 @@ String InputEventMouseMotion::as_text() const {
button_mask_string = itos(get_button_mask());
break;
}
- return "InputEventMouseMotion : button_mask=" + button_mask_string + ", position=(" + String(get_position()) + "), relative=(" + String(get_relative()) + "), speed=(" + String(get_speed()) + ")";
+ return "InputEventMouseMotion : button_mask=" + button_mask_string + ", position=(" + String(get_position()) + "), relative=(" + String(get_relative()) + "), speed=(" + String(get_speed()) + "), pressure=(" + rtos(get_pressure()) + "), tilt=(" + String(get_tilt()) + ")";
}
bool InputEventMouseMotion::accumulate(const Ref<InputEvent> &p_event) {
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 81bc45b2f7..1396683d25 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -277,7 +277,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
val.normal.x = decode_float(&buf[0]);
val.normal.y = decode_float(&buf[4]);
val.normal.z = decode_float(&buf[8]);
- val.d = decode_float(&buf[12]);
+ val.distance = decode_float(&buf[12]);
r_variant = val;
if (r_len)
@@ -1140,7 +1140,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
encode_float(p.normal.x, &buf[0]);
encode_float(p.normal.y, &buf[4]);
encode_float(p.normal.z, &buf[8]);
- encode_float(p.d, &buf[12]);
+ encode_float(p.distance, &buf[12]);
}
r_len += 4 * 4;
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 8c7559479b..5907143810 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -214,7 +214,7 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) {
v.normal.x = f->get_real();
v.normal.y = f->get_real();
v.normal.z = f->get_real();
- v.d = f->get_real();
+ v.distance = f->get_real();
r_v = v;
} break;
case VARIANT_QUAT: {
@@ -1458,7 +1458,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
f->store_real(val.normal.x);
f->store_real(val.normal.y);
f->store_real(val.normal.z);
- f->store_real(val.d);
+ f->store_real(val.distance);
} break;
case Variant::QUAT: {
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp
index c36070e47f..d2b20ac514 100644
--- a/core/math/camera_matrix.cpp
+++ b/core/math/camera_matrix.cpp
@@ -59,10 +59,10 @@ Plane CameraMatrix::xform4(const Plane &p_vec4) const {
Plane ret;
- ret.normal.x = matrix[0][0] * p_vec4.normal.x + matrix[1][0] * p_vec4.normal.y + matrix[2][0] * p_vec4.normal.z + matrix[3][0] * p_vec4.d;
- ret.normal.y = matrix[0][1] * p_vec4.normal.x + matrix[1][1] * p_vec4.normal.y + matrix[2][1] * p_vec4.normal.z + matrix[3][1] * p_vec4.d;
- ret.normal.z = matrix[0][2] * p_vec4.normal.x + matrix[1][2] * p_vec4.normal.y + matrix[2][2] * p_vec4.normal.z + matrix[3][2] * p_vec4.d;
- ret.d = matrix[0][3] * p_vec4.normal.x + matrix[1][3] * p_vec4.normal.y + matrix[2][3] * p_vec4.normal.z + matrix[3][3] * p_vec4.d;
+ ret.normal.x = matrix[0][0] * p_vec4.normal.x + matrix[1][0] * p_vec4.normal.y + matrix[2][0] * p_vec4.normal.z + matrix[3][0] * p_vec4.distance;
+ ret.normal.y = matrix[0][1] * p_vec4.normal.x + matrix[1][1] * p_vec4.normal.y + matrix[2][1] * p_vec4.normal.z + matrix[3][1] * p_vec4.distance;
+ ret.normal.z = matrix[0][2] * p_vec4.normal.x + matrix[1][2] * p_vec4.normal.y + matrix[2][2] * p_vec4.normal.z + matrix[3][2] * p_vec4.distance;
+ ret.distance = matrix[0][3] * p_vec4.normal.x + matrix[1][3] * p_vec4.normal.y + matrix[2][3] * p_vec4.normal.z + matrix[3][3] * p_vec4.distance;
return ret;
}
@@ -233,7 +233,7 @@ real_t CameraMatrix::get_z_far() const {
new_plane.normal = -new_plane.normal;
new_plane.normalize();
- return new_plane.d;
+ return new_plane.distance;
}
real_t CameraMatrix::get_z_near() const {
@@ -244,7 +244,7 @@ real_t CameraMatrix::get_z_near() const {
-matrix[15] - matrix[14]);
new_plane.normalize();
- return new_plane.d;
+ return new_plane.distance;
}
Vector2 CameraMatrix::get_viewport_half_extents() const {
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp
index fa96fc4535..d55ede9fe0 100644
--- a/core/math/geometry.cpp
+++ b/core/math/geometry.cpp
@@ -780,7 +780,7 @@ Geometry::MeshData Geometry::build_convex_mesh(const Vector<Plane> &p_planes) {
if (Math::is_zero_approx(den))
continue; // Point too short.
- real_t dist = -(clip.normal.dot(edge0_A) - clip.d) / den;
+ real_t dist = -(clip.normal.dot(edge0_A) - clip.distance) / den;
Vector3 inters = edge0_A + rel * dist;
new_vertices.push_back(inters);
}
@@ -1199,7 +1199,7 @@ Vector<Vector3> Geometry::compute_convex_mesh_points(const Plane *p_planes, int
for (int n = 0; n < p_plane_count; n++) {
if (n != i && n != j && n != k) {
real_t dp = p_planes[n].normal.dot(convex_shape_point);
- if (dp - p_planes[n].d > CMP_EPSILON) {
+ if (dp - p_planes[n].distance > CMP_EPSILON) {
excluded = true;
break;
}
diff --git a/core/math/math_fieldwise.cpp b/core/math/math_fieldwise.cpp
index a47d4ef7ad..e42c399ba4 100644
--- a/core/math/math_fieldwise.cpp
+++ b/core/math/math_fieldwise.cpp
@@ -89,7 +89,7 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const
/**/ TRY_TRANSFER_FIELD("x", normal.x)
else TRY_TRANSFER_FIELD("y", normal.y)
else TRY_TRANSFER_FIELD("z", normal.z)
- else TRY_TRANSFER_FIELD("d", d)
+ else TRY_TRANSFER_FIELD("d", distance)
return target;
}
diff --git a/core/math/octree.h b/core/math/octree.h
index 2060a61b4b..ffb405bd0f 100644
--- a/core/math/octree.h
+++ b/core/math/octree.h
@@ -1290,10 +1290,12 @@ void Octree<T, use_pairs, AL>::_cull_point(Octant *p_octant, const Vector3 &p_po
template <class T, bool use_pairs, class AL>
int Octree<T, use_pairs, AL>::cull_convex(const Vector<Plane> &p_convex, T **p_result_array, int p_result_max, uint32_t p_mask) {
- if (!root)
+ if (!root || p_convex.size() == 0)
return 0;
Vector<Vector3> convex_points = Geometry::compute_convex_mesh_points(&p_convex[0], p_convex.size());
+ if (convex_points.size() == 0)
+ return 0;
int result_count = 0;
pass++;
diff --git a/core/math/plane.cpp b/core/math/plane.cpp
index a3818698bc..c375913756 100644
--- a/core/math/plane.cpp
+++ b/core/math/plane.cpp
@@ -45,7 +45,7 @@ void Plane::normalize() {
return;
}
normal /= l;
- d /= l;
+ distance /= l;
}
Plane Plane::normalized() const {
@@ -57,7 +57,7 @@ Plane Plane::normalized() const {
Vector3 Plane::get_any_point() const {
- return get_normal() * d;
+ return get_normal() * distance;
}
Vector3 Plane::get_any_perpendicular_normal() const {
@@ -92,9 +92,9 @@ bool Plane::intersect_3(const Plane &p_plane1, const Plane &p_plane2, Vector3 *r
return false;
if (r_result) {
- *r_result = ((vec3_cross(normal1, normal2) * p_plane0.d) +
- (vec3_cross(normal2, normal0) * p_plane1.d) +
- (vec3_cross(normal0, normal1) * p_plane2.d)) /
+ *r_result = ((vec3_cross(normal1, normal2) * p_plane0.distance) +
+ (vec3_cross(normal2, normal0) * p_plane1.distance) +
+ (vec3_cross(normal0, normal1) * p_plane2.distance)) /
denom;
}
@@ -112,7 +112,7 @@ bool Plane::intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, Vector3
return false;
}
- real_t dist = (normal.dot(p_from) - d) / den;
+ real_t dist = (normal.dot(p_from) - distance) / den;
//printf("dist is %i\n",dist);
if (dist > CMP_EPSILON) { //this is a ray, before the emitting pos (p_from) doesn't exist
@@ -137,7 +137,7 @@ bool Plane::intersects_segment(const Vector3 &p_begin, const Vector3 &p_end, Vec
return false;
}
- real_t dist = (normal.dot(p_begin) - d) / den;
+ real_t dist = (normal.dot(p_begin) - distance) / den;
//printf("dist is %i\n",dist);
if (dist < -CMP_EPSILON || dist > (1.0 + CMP_EPSILON)) {
@@ -155,10 +155,10 @@ bool Plane::intersects_segment(const Vector3 &p_begin, const Vector3 &p_end, Vec
bool Plane::is_equal_approx(const Plane &p_plane) const {
- return normal.is_equal_approx(p_plane.normal) && Math::is_equal_approx(d, p_plane.d);
+ return normal.is_equal_approx(p_plane.normal) && Math::is_equal_approx(distance, p_plane.distance);
}
Plane::operator String() const {
- return normal.operator String() + ", " + rtos(d);
+ return normal.operator String() + ", " + rtos(distance);
}
diff --git a/core/math/plane.h b/core/math/plane.h
index 771c8fc705..1409a4140f 100644
--- a/core/math/plane.h
+++ b/core/math/plane.h
@@ -36,7 +36,7 @@
class Plane {
public:
Vector3 normal;
- real_t d;
+ real_t distance;
void set_normal(const Vector3 &p_normal);
_FORCE_INLINE_ Vector3 get_normal() const { return normal; }; ///Point is coplanar, CMP_EPSILON for precision
@@ -46,7 +46,7 @@ public:
/* Plane-Point operations */
- _FORCE_INLINE_ Vector3 center() const { return normal * d; }
+ _FORCE_INLINE_ Vector3 center() const { return normal * distance; }
Vector3 get_any_point() const;
Vector3 get_any_perpendicular_normal() const;
@@ -67,7 +67,7 @@ public:
/* misc */
- Plane operator-() const { return Plane(-normal, -d); }
+ Plane operator-() const { return Plane(-normal, -distance); }
bool is_equal_approx(const Plane &p_plane) const;
_FORCE_INLINE_ bool operator==(const Plane &p_plane) const;
@@ -75,41 +75,41 @@ public:
operator String() const;
_FORCE_INLINE_ Plane() :
- d(0) {}
+ distance(0) {}
_FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d) :
normal(p_a, p_b, p_c),
- d(p_d) {}
+ distance(p_d) {}
- _FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_d);
+ _FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_distance);
_FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3 &p_normal);
_FORCE_INLINE_ Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_point3, ClockDirection p_dir = CLOCKWISE);
};
bool Plane::is_point_over(const Vector3 &p_point) const {
- return (normal.dot(p_point) > d);
+ return (normal.dot(p_point) > distance);
}
real_t Plane::distance_to(const Vector3 &p_point) const {
- return (normal.dot(p_point) - d);
+ return (normal.dot(p_point) - distance);
}
bool Plane::has_point(const Vector3 &p_point, real_t _epsilon) const {
- real_t dist = normal.dot(p_point) - d;
+ real_t dist = normal.dot(p_point) - distance;
dist = ABS(dist);
return (dist <= _epsilon);
}
-Plane::Plane(const Vector3 &p_normal, real_t p_d) :
+Plane::Plane(const Vector3 &p_normal, real_t p_distance) :
normal(p_normal),
- d(p_d) {
+ distance(p_distance) {
}
Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal) :
normal(p_normal),
- d(p_normal.dot(p_point)) {
+ distance(p_normal.dot(p_point)) {
}
Plane::Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_point3, ClockDirection p_dir) {
@@ -120,17 +120,17 @@ Plane::Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_
normal = (p_point1 - p_point2).cross(p_point1 - p_point3);
normal.normalize();
- d = normal.dot(p_point1);
+ distance = normal.dot(p_point1);
}
bool Plane::operator==(const Plane &p_plane) const {
- return normal == p_plane.normal && d == p_plane.d;
+ return normal == p_plane.normal && distance == p_plane.distance;
}
bool Plane::operator!=(const Plane &p_plane) const {
- return normal != p_plane.normal || d != p_plane.d;
+ return normal != p_plane.normal || distance != p_plane.distance;
}
#endif // PLANE_H
diff --git a/core/math/transform.h b/core/math/transform.h
index c6e3be4c70..edbabc9c8b 100644
--- a/core/math/transform.h
+++ b/core/math/transform.h
@@ -132,7 +132,7 @@ _FORCE_INLINE_ Vector3 Transform::xform_inv(const Vector3 &p_vector) const {
_FORCE_INLINE_ Plane Transform::xform(const Plane &p_plane) const {
- Vector3 point = p_plane.normal * p_plane.d;
+ Vector3 point = p_plane.normal * p_plane.distance;
Vector3 point_dir = point + p_plane.normal;
point = xform(point);
point_dir = xform(point_dir);
@@ -145,7 +145,7 @@ _FORCE_INLINE_ Plane Transform::xform(const Plane &p_plane) const {
}
_FORCE_INLINE_ Plane Transform::xform_inv(const Plane &p_plane) const {
- Vector3 point = p_plane.normal * p_plane.d;
+ Vector3 point = p_plane.normal * p_plane.distance;
Vector3 point_dir = point + p_plane.normal;
xform_inv(point);
xform_inv(point_dir);
diff --git a/core/os/os.h b/core/os/os.h
index 714a10bf76..38114e6814 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -59,6 +59,7 @@ class OS {
bool _allow_layered;
bool _use_vsync;
bool _vsync_via_compositor;
+ bool _disable_wintab;
char *last_error;
@@ -148,6 +149,7 @@ public:
bool is_layered_allowed() const { return _allow_layered; }
bool is_hidpi_allowed() const { return _allow_hidpi; }
+ bool is_wintab_disabled() const { return _disable_wintab; }
void ensure_user_data_dir();
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 63b52661b4..8829181489 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -362,40 +362,29 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
// We need to test both possibilities as extensions for Linux binaries are optional
// (so both 'mygame.bin' and 'mygame' should be able to find 'mygame.pck').
- bool found = false;
-
String exec_dir = exec_path.get_base_dir();
String exec_filename = exec_path.get_file();
String exec_basename = exec_filename.get_basename();
- // Try to load data pack at the location of the executable
- // As mentioned above, we have two potential names to attempt
-
- if (_load_resource_pack(exec_dir.plus_file(exec_basename + ".pck")) ||
- _load_resource_pack(exec_dir.plus_file(exec_filename + ".pck"))) {
- found = true;
- } else {
- // If we couldn't find them next to the executable, we attempt
- // the current working directory. Same story, two tests.
- if (_load_resource_pack(exec_basename + ".pck") ||
- _load_resource_pack(exec_filename + ".pck")) {
- found = true;
- }
- }
+ // Attempt with PCK bundled into executable
+ bool found = _load_resource_pack(exec_path);
#ifdef OSX_ENABLED
- // Attempt to load PCK from macOS .app bundle resources
if (!found) {
- if (_load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_basename + ".pck"))) {
- found = true;
- }
+ // Attempt to load PCK from macOS .app bundle resources
+ found = _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_basename + ".pck"));
}
#endif
- // Attempt with PCK bundled into executable
if (!found) {
- if (_load_resource_pack(exec_path)) {
- found = true;
+ // Try to load data pack at the location of the executable
+ // As mentioned above, we have two potential names to attempt
+ found = _load_resource_pack(exec_dir.plus_file(exec_basename + ".pck")) || _load_resource_pack(exec_dir.plus_file(exec_filename + ".pck"));
+
+ if (!found) {
+ // If we couldn't find them next to the executable, we attempt
+ // the current working directory. Same story, two tests.
+ found = _load_resource_pack(exec_basename + ".pck") || _load_resource_pack(exec_filename + ".pck");
}
}
diff --git a/core/self_list.h b/core/self_list.h
index 19d2783208..43aeb44fea 100644
--- a/core/self_list.h
+++ b/core/self_list.h
@@ -120,6 +120,9 @@ private:
public:
_FORCE_INLINE_ bool in_list() const { return _root; }
+ _FORCE_INLINE_ void remove_from_list() {
+ if (_root) _root->remove(this);
+ }
_FORCE_INLINE_ SelfList<T> *next() { return _next; }
_FORCE_INLINE_ SelfList<T> *prev() { return _prev; }
_FORCE_INLINE_ const SelfList<T> *next() const { return _next; }
diff --git a/core/variant.cpp b/core/variant.cpp
index b3611536b8..35c306f24b 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -102,11 +102,6 @@ String Variant::get_type_name(Variant::Type p_type) {
return "Plane";
} break;
- /*
- case QUAT: {
-
-
- } break;*/
case AABB: {
return "AABB";
@@ -3178,7 +3173,7 @@ uint32_t Variant::hash() const {
uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.x);
hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.y, hash);
hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.z, hash);
- return hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->d, hash);
+ return hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->distance, hash);
} break;
/*
@@ -3526,7 +3521,7 @@ bool Variant::hash_compare(const Variant &p_variant) const {
const Plane *r = reinterpret_cast<const Plane *>(p_variant._data._mem);
return (hash_compare_vector3(l->normal, r->normal)) &&
- (hash_compare_scalar(l->d, r->d));
+ (hash_compare_scalar(l->distance, r->distance));
} break;
case AABB: {
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 39bfd04a0b..9fffb42ff6 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -1075,6 +1075,11 @@ struct _VariantCall {
r_ret = Color::hex(*p_args[0]);
}
+ static void Color_init5(Variant &r_ret, const Variant **p_args) {
+
+ r_ret = Color(((Color)(*p_args[0])), *p_args[1]);
+ }
+
static void AABB_init1(Variant &r_ret, const Variant **p_args) {
r_ret = ::AABB(*p_args[0], *p_args[1]);
@@ -1353,6 +1358,8 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
case RECT2I: return (Rect2i(*p_args[0]));
case VECTOR3: return (Vector3(*p_args[0]));
case VECTOR3I: return (Vector3i(*p_args[0]));
+ case TRANSFORM2D:
+ return (Transform2D(p_args[0]->operator Transform2D()));
case PLANE: return (Plane(*p_args[0]));
case QUAT: return (p_args[0]->operator Quat());
case AABB:
@@ -2209,6 +2216,8 @@ void register_variant_methods() {
_VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::FLOAT, "g", Variant::FLOAT, "b", Variant::FLOAT, "a", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::FLOAT, "g", Variant::FLOAT, "b", Variant::FLOAT);
+ // init3 and init4 are the constructors for HTML hex strings and integers respectively which don't need binding here, so we skip to init5.
+ _VariantCall::add_constructor(_VariantCall::Color_init5, Variant::COLOR, "c", Variant::COLOR, "a", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::AABB_init1, Variant::AABB, "position", Variant::VECTOR3, "size", Variant::VECTOR3);
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 27624b81ee..8cc07539a9 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -1550,7 +1550,7 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->normal.z = p_value._data._int;
valid = true;
} else if (p_index == CoreStringNames::singleton->d) {
- v->d = p_value._data._int;
+ v->distance = p_value._data._int;
valid = true;
}
} else if (p_value.type == Variant::FLOAT) {
@@ -1565,7 +1565,7 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->normal.z = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->d) {
- v->d = p_value._data._float;
+ v->distance = p_value._data._float;
valid = true;
}
@@ -1851,7 +1851,7 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const {
} else if (p_index == CoreStringNames::singleton->z) {
return v->normal.z;
} else if (p_index == CoreStringNames::singleton->d) {
- return v->d;
+ return v->distance;
} else if (p_index == CoreStringNames::singleton->normal) {
return v->normal;
}
@@ -2334,7 +2334,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
return;
} else if (*str == "d") {
valid = true;
- v->d = p_value;
+ v->distance = p_value;
return;
}
}
@@ -2841,7 +2841,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
return v->normal;
} else if (*str == "d") {
valid = true;
- return v->d;
+ return v->distance;
}
}
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 0a578faf78..7c3bdd2088 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -1551,7 +1551,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
case Variant::PLANE: {
Plane p = p_variant;
- p_store_string_func(p_store_string_ud, "Plane( " + rtosfix(p.normal.x) + ", " + rtosfix(p.normal.y) + ", " + rtosfix(p.normal.z) + ", " + rtosfix(p.d) + " )");
+ p_store_string_func(p_store_string_ud, "Plane( " + rtosfix(p.normal.x) + ", " + rtosfix(p.normal.y) + ", " + rtosfix(p.normal.z) + ", " + rtosfix(p.distance) + " )");
} break;
case Variant::AABB: {
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 602ad43103..222b70c9c7 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -77,6 +77,9 @@
<member name="ProjectSettings" type="ProjectSettings" setter="" getter="">
The [ProjectSettings] singleton.
</member>
+ <member name="RenderingDevice" type="RenderingDevice" setter="" getter="">
+ The [RenderingDevice] singleton.
+ </member>
<member name="RenderingServer" type="RenderingServer" setter="" getter="">
The [RenderingServer] singleton.
</member>
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 76abc31451..1da4e23437 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -159,6 +159,7 @@
</member>
<member name="detail_normal" type="Texture2D" setter="set_texture" getter="get_texture">
Texture that specifies the per-pixel normal of the detail overlay.
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV">
Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options.
@@ -250,6 +251,7 @@
</member>
<member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh].
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture">
</member>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index c2b821699d..df3ef71a2a 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -240,6 +240,7 @@
</member>
<member name="normalmap" type="Texture2D" setter="set_normalmap" getter="get_normalmap">
Normal map to be used for the [member texture] property.
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index bfba23c7ee..6ff4875364 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -183,8 +183,13 @@
<member name="far" type="float" setter="set_zfar" getter="get_zfar" default="100.0">
The distance to the far culling boundary for this camera relative to its local Z axis.
</member>
- <member name="fov" type="float" setter="set_fov" getter="get_fov" default="70.0">
+ <member name="fov" type="float" setter="set_fov" getter="get_fov" default="75.0">
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
+ For reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to an horizontal FOV of:
+ - ~91.31 degrees in a 4:3 viewport
+ - ~101.67 degrees in a 16:10 viewport
+ - ~107.51 degrees in a 16:9 viewport
+ - ~121.63 degrees in a 21:9 viewport
</member>
<member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )">
The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url].
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 1af5c87532..b35d4fb36a 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -42,6 +42,20 @@
<method name="Color">
<return type="Color">
</return>
+ <argument index="0" name="c" type="Color">
+ </argument>
+ <argument index="1" name="a" type="float">
+ </argument>
+ <description>
+ Constructs a color from an existing color, but with a custom alpha value.
+ [codeblock]
+ var red = Color(Color.red, 0.5) # 50% transparent red.
+ [/codeblock]
+ </description>
+ </method>
+ <method name="Color">
+ <return type="Color">
+ </return>
<argument index="0" name="r" type="float">
</argument>
<argument index="1" name="g" type="float">
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 45c153b6dc..12701d8688 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Engine" inherits="Object" version="4.0">
<brief_description>
- Access to basic engine properties.
+ Access to engine properties.
</brief_description>
<description>
- The [Engine] class allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others.
+ The [Engine] singleton allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index 64a2522f2f..ee67b5052c 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -53,6 +53,7 @@
</member>
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
Normal map to be used for the [member texture] property.
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml
index 5f9b36f97d..830d63ed11 100644
--- a/doc/classes/KinematicBody3D.xml
+++ b/doc/classes/KinematicBody3D.xml
@@ -108,7 +108,7 @@
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
[code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall.
- If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code].
+ If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody3D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D].
diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml
index d3cfc94a8c..58caf1b1de 100644
--- a/doc/classes/LineShape2D.xml
+++ b/doc/classes/LineShape2D.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="d" type="float" setter="set_d" getter="get_d" default="0.0">
+ <member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0">
The line's distance from the origin.
</member>
<member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, 1 )">
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index 0cfc8deb0a..689f8d83e1 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -17,6 +17,7 @@
</member>
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map that will be used if using the default [CanvasItemMaterial].
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml
index 07f21514ef..a461c8e056 100644
--- a/doc/classes/MultiMeshInstance2D.xml
+++ b/doc/classes/MultiMeshInstance2D.xml
@@ -17,6 +17,7 @@
</member>
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map that will be used if using the default [CanvasItemMaterial].
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 5ba3c6c56a..0c0d16753a 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -305,7 +305,7 @@
<return type="Node">
</return>
<description>
- Returns the parent node of the current node, or an empty [Node] if the node lacks a parent.
+ Returns the parent node of the current node, or a [code]null instance[/code] if the node lacks a parent.
</description>
</method>
<method name="get_path" qualifiers="const">
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index d4517f0588..d29c556216 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -142,6 +142,10 @@
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
The node's scale. Unscaled value: [code](1, 1)[/code].
</member>
+ <member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0">
+ </member>
+ <member name="skew_degrees" type="float" setter="set_skew_degrees" getter="get_skew_degrees" default="0.0">
+ </member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D].
</member>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 3e7d4d4c05..05d00b9f31 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -26,7 +26,7 @@
Returns the parent [Node3D], or an empty [Object] if no parent exists or parent is not of type [Node3D].
</description>
</method>
- <method name="get_world" qualifiers="const">
+ <method name="get_world_3d" qualifiers="const">
<return type="World3D">
</return>
<description>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 292acd8b5d..d8a204a2b9 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -19,10 +19,10 @@
</argument>
<argument index="2" name="c" type="float">
</argument>
- <argument index="3" name="d" type="float">
+ <argument index="3" name="distance" type="float">
</argument>
<description>
- Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin.
+ Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]distance[/code] from the origin.
</description>
</method>
<method name="Plane">
@@ -43,7 +43,7 @@
</return>
<argument index="0" name="normal" type="Vector3">
</argument>
- <argument index="1" name="d" type="float">
+ <argument index="1" name="distance" type="float">
</argument>
<description>
Creates a plane from the normal and the plane's distance to the origin.
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 13332ca4f0..335df1ac3f 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -102,6 +102,8 @@
If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code].
</member>
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
+ The normal map gives depth to the Polygon2D.
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The offset applied to each vertex.
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index a9ac307df4..dc07dd8837 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -414,6 +414,9 @@
<member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2( 10, 10 )">
Position offset for tooltips, relative to the mouse cursor's hotspot.
</member>
+ <member name="display/window/disable_wintab_api" type="bool" setter="" getter="" default="false">
+ Disables WinTab API and always use Windows Ink API for the pen input (Windows only).
+ </member>
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false">
If [code]true[/code], allows HiDPI display on Windows and macOS. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
</member>
@@ -1067,7 +1070,7 @@
Lower-end override for [member rendering/quality/reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/quality/screen_filters/msaa" type="int" setter="" getter="" default="0">
- Sets the number of MSAA samples to use. MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware.
+ Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware.
[b]Note:[/b] MSAA is not available on HTML5 export using the GLES2 backend.
</member>
<member name="rendering/quality/screen_filters/screen_space_aa" type="int" setter="" getter="" default="0">
@@ -1140,9 +1143,8 @@
<member name="rendering/quality/subsurface_scattering/subsurface_scattering_scale" type="float" setter="" getter="" default="0.05">
Scales the distance over which samples are taken for subsurface scattering effect. Changing this does not impact performance, but higher values will result in significant artifacts as the samples will become obviously spread out. A lower value results in a smaller spread of scattered light.
</member>
- <member name="rendering/quality/texture_filters/max_anisotropy" type="int" setter="" getter="" default="4">
- Sets the maximum number of samples to take when using anisotropic filtering on textures. A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute.
- Only power of two values are valid ([code]1[/code], [code]2[/code], [code]4[/code], [code]8[/code], [code]16[/code]). A value of [code]1[/code] forcibly disables anisotropic filtering, even on materials where it is enabled.
+ <member name="rendering/quality/texture_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2">
+ Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled.
</member>
<member name="rendering/quality/texture_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 4e0762a68b..648f4d0107 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -9,7 +9,7 @@
The rendering server can be used to bypass the scene system entirely.
Resources are created using the [code]*_create[/code] functions.
All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas].
- In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any [Node3D] node with [method Node3D.get_world]. Otherwise, a scenario can be created with [method scenario_create].
+ In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any [Node3D] node with [method Node3D.get_world_3d]. Otherwise, a scenario can be created with [method scenario_create].
Similarly in 2D, a canvas is needed to draw all canvas items.
In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible.
In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas.
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index c8ba8ab697..e674ceb57e 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -45,7 +45,7 @@
Adds the specified [code]prefix[/code] string before the numerical value of the [SpinBox].
</member>
<member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="&quot;&quot;">
- Adds the specified [code]prefix[/code] string after the numerical value of the [SpinBox].
+ Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox].
</member>
</members>
<constants>
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index 950fda4e20..92f561d7b5 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -54,6 +54,7 @@
</member>
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map gives depth to the Sprite2D.
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The texture's drawing offset.
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 8ed94c8c26..f8aa14cb2b 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -121,6 +121,7 @@
</member>
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map to use when drawing this style box.
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
Species a sub-region of the texture to use.
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index b7cf93d672..bb2d355bf6 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -354,6 +354,17 @@
If [code]true[/code], hides the line of the specified index.
</description>
</method>
+ <method name="set_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="new_text" type="String">
+ </argument>
+ <description>
+ Sets the text for a specific line.
+ </description>
+ </method>
<method name="toggle_fold_line">
<return type="void">
</return>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 65988ae2b7..c647f83598 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -590,6 +590,7 @@
</argument>
<description>
Sets the tile's normal map texture.
+ [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</description>
</method>
<method name="tile_set_occluder_offset">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 8c18ca8cc9..29222bb4d1 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -309,7 +309,7 @@
<argument index="0" name="by" type="Vector3">
</argument>
<description>
- Returns a copy of the vector snapped to the lowest neared multiple.
+ Returns the vector snapped to a grid with the given size.
</description>
</method>
<method name="to_diagonal_matrix">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index a2d53f8e0c..3b52c80c9a 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -16,18 +16,18 @@
<link>https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link>
</tutorials>
<methods>
- <method name="find_world" qualifiers="const">
- <return type="World3D">
+ <method name="find_world_2d" qualifiers="const">
+ <return type="World2D">
</return>
<description>
- Returns the 3D world of the viewport, or if none the world of the parent viewport.
+ Returns the 2D world of the viewport.
</description>
</method>
- <method name="find_world_2d" qualifiers="const">
- <return type="World2D">
+ <method name="find_world_3d" qualifiers="const">
+ <return type="World3D">
</return>
<description>
- Returns the 2D world of the viewport.
+ Returns the 3D world of the viewport, or if none the world of the parent viewport.
</description>
</method>
<method name="get_camera" qualifiers="const">
@@ -219,8 +219,8 @@
<member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems.
</member>
- <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" default="false">
- If [code]true[/code], the viewport will use [World3D] defined in [code]world[/code] property.
+ <member name="own_world_3d" type="bool" setter="set_use_own_world_3d" getter="is_using_own_world_3d" default="false">
+ If [code]true[/code], the viewport will use the [World3D] defined in [member world_3d].
</member>
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
@@ -247,12 +247,12 @@
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false">
If [code]true[/code], the viewport should render its background as transparent.
</member>
- <member name="world" type="World3D" setter="set_world" getter="get_world">
- The custom [World3D] which can be used as 3D environment source.
- </member>
<member name="world_2d" type="World2D" setter="set_world_2d" getter="get_world_2d">
The custom [World2D] which can be used as 2D environment source.
</member>
+ <member name="world_3d" type="World3D" setter="set_world_3d" getter="get_world_3d">
+ The custom [World3D] which can be used as 3D environment source.
+ </member>
</members>
<signals>
<signal name="gui_focus_changed">
diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml
index 41d9f55912..83261344bd 100644
--- a/doc/classes/VisualShaderNodeUniform.xml
+++ b/doc/classes/VisualShaderNodeUniform.xml
@@ -11,10 +11,18 @@
<methods>
</methods>
<members>
+ <member name="qualifier" type="int" setter="set_qualifier" getter="get_qualifier" enum="VisualShaderNodeUniform.Qualifier" default="0">
+ </member>
<member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default="&quot;&quot;">
Name of the uniform, by which it can be accessed through the [ShaderMaterial] properties.
</member>
</members>
<constants>
+ <constant name="QUAL_NONE" value="0" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_GLOBAL" value="1" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_INSTANCE" value="2" enum="Qualifier">
+ </constant>
</constants>
</class>
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 81a7d85b18..152989f90b 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -31,6 +31,7 @@
#include "script_editor_debugger.h"
#include "core/debugger/debugger_marshalls.h"
+#include "core/debugger/remote_debugger.h"
#include "core/io/marshalls.h"
#include "core/project_settings.h"
#include "core/ustring.h"
@@ -396,10 +397,33 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
inspector->add_stack_variable(p_data);
} else if (p_msg == "output") {
- ERR_FAIL_COND(p_data.size() < 1);
+ ERR_FAIL_COND(p_data.size() != 2);
+
ERR_FAIL_COND(p_data[0].get_type() != Variant::PACKED_STRING_ARRAY);
- Vector<String> strings = p_data[0];
- EditorNode::get_log()->add_message(String("\n").join(strings));
+ Vector<String> output_strings = p_data[0];
+
+ ERR_FAIL_COND(p_data[1].get_type() != Variant::PACKED_INT32_ARRAY);
+ Vector<int> output_types = p_data[1];
+
+ ERR_FAIL_COND(output_strings.size() != output_types.size());
+
+ for (int i = 0; i < output_strings.size(); i++) {
+ RemoteDebugger::MessageType type = (RemoteDebugger::MessageType)(int)(output_types[i]);
+ EditorLog::MessageType msg_type;
+ switch (type) {
+ case RemoteDebugger::MESSAGE_TYPE_LOG: {
+ msg_type = EditorLog::MSG_TYPE_STD;
+ } break;
+ case RemoteDebugger::MESSAGE_TYPE_ERROR: {
+ msg_type = EditorLog::MSG_TYPE_ERROR;
+ } break;
+ default: {
+ WARN_PRINT("Unhandled script debugger message type: " + itos(type));
+ msg_type = EditorLog::MSG_TYPE_STD;
+ } break;
+ }
+ EditorNode::get_log()->add_message(output_strings[i], msg_type);
+ }
} else if (p_msg == "performance:profile_frame") {
Vector<float> p;
p.resize(p_data.size());
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 8089d463bd..b566ad0fa4 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1052,6 +1052,7 @@ void EditorHelp::_update_doc() {
class_desc->pop(); // color
class_desc->pop(); // font
class_desc->pop(); // cell
+ method_line[cd.properties[i].setter] = property_line[cd.properties[i].name];
}
if (cd.properties[i].getter != "") {
@@ -1069,6 +1070,7 @@ void EditorHelp::_update_doc() {
class_desc->pop(); //color
class_desc->pop(); //font
class_desc->pop(); //cell
+ method_line[cd.properties[i].getter] = property_line[cd.properties[i].name];
}
class_desc->pop(); // table
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 8fcd5bacb6..6adc640651 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -501,18 +501,20 @@ bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringNam
}
}
- if (p_object->call("property_can_revert", p_property).operator bool()) {
-
- has_revert = true;
- }
-
- if (!has_revert && !p_object->get_script().is_null()) {
- Ref<Script> scr = p_object->get_script();
- if (scr.is_valid()) {
- Variant orig_value;
- if (scr->get_property_default_value(p_property, orig_value)) {
- if (orig_value != p_object->get(p_property)) {
- has_revert = true;
+ // If the object implements property_can_revert, rely on that completely
+ // (i.e. don't then try to revert to default value - the property_get_revert implementation
+ // can do that if so desired)
+ if (p_object->has_method("property_can_revert")) {
+ has_revert = p_object->call("property_can_revert", p_property).operator bool();
+ } else {
+ if (!has_revert && !p_object->get_script().is_null()) {
+ Ref<Script> scr = p_object->get_script();
+ if (scr.is_valid()) {
+ Variant orig_value;
+ if (scr->get_property_default_value(p_property, orig_value)) {
+ if (orig_value != p_object->get(p_property)) {
+ has_revert = true;
+ }
}
}
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index ea2009ab58..90cea06439 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1747,7 +1747,7 @@ void EditorNode::push_item(Object *p_object, const String &p_property, bool p_in
void EditorNode::_save_default_environment() {
- Ref<Environment> fallback = get_tree()->get_root()->get_world()->get_fallback_environment();
+ Ref<Environment> fallback = get_tree()->get_root()->get_world_3d()->get_fallback_environment();
if (fallback.is_valid() && fallback->get_path().is_resource_file()) {
Map<RES, bool> processed;
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 5213d7ec15..5d16a8cf77 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1611,7 +1611,7 @@ void EditorPropertyPlane::_value_changed(double val, const String &p_name) {
p.normal.x = spin[0]->get_value();
p.normal.y = spin[1]->get_value();
p.normal.z = spin[2]->get_value();
- p.d = spin[3]->get_value();
+ p.distance = spin[3]->get_value();
emit_changed(get_edited_property(), p, p_name);
}
@@ -1621,7 +1621,7 @@ void EditorPropertyPlane::update_property() {
spin[0]->set_value(val.normal.x);
spin[1]->set_value(val.normal.y);
spin[2]->set_value(val.normal.z);
- spin[3]->set_value(val.d);
+ spin[3]->set_value(val.distance);
setting = false;
}
void EditorPropertyPlane::_notification(int p_what) {
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 1506c574dd..2c70e16610 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -36,6 +36,9 @@
#include "editor_scale.h"
String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
+ if (grabber->is_visible()) {
+ return rtos(get_value()) + "\n\n" + TTR("Hold Ctrl to round to integers. Hold Shift for more precise changes.");
+ }
return rtos(get_value());
}
@@ -111,7 +114,21 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
}
if (grabbing_spinner) {
+ // Don't make the user scroll all the way back to 'in range' if they went off the end.
+ if (pre_grab_value < get_min() && !is_lesser_allowed()) {
+ pre_grab_value = get_min();
+ }
+ if (pre_grab_value > get_max() && !is_greater_allowed()) {
+ pre_grab_value = get_max();
+ }
+
if (mm->get_control()) {
+ // If control was just pressed, don't make the value do a huge jump in magnitude.
+ if (grabbing_spinner_dist_cache != 0) {
+ pre_grab_value += grabbing_spinner_dist_cache * get_step();
+ grabbing_spinner_dist_cache = 0;
+ }
+
set_value(Math::round(pre_grab_value + get_step() * grabbing_spinner_dist_cache * 10));
} else {
set_value(pre_grab_value + get_step() * grabbing_spinner_dist_cache);
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 697ddfba96..7e7a982501 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -766,7 +766,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
Vector3 tangent = Vector3(tangent_src->array[tangent_pos + 0], tangent_src->array[tangent_pos + 1], tangent_src->array[tangent_pos + 2]);
vertex.tangent.normal = tangent;
- vertex.tangent.d = vertex.normal.cross(tangent).dot(binormal) > 0 ? 1 : -1;
+ vertex.tangent.distance = vertex.normal.cross(tangent).dot(binormal) > 0 ? 1 : -1;
}
}
@@ -794,7 +794,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
#ifndef NO_UP_AXIS_SWAP
if (collada.state.up_axis == Vector3::AXIS_Z) {
- Vector3 bn = vertex.normal.cross(vertex.tangent.normal) * vertex.tangent.d;
+ Vector3 bn = vertex.normal.cross(vertex.tangent.normal) * vertex.tangent.distance;
SWAP(vertex.vertex.z, vertex.vertex.y);
vertex.vertex.z = -vertex.vertex.z;
@@ -805,7 +805,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
SWAP(bn.z, bn.y);
bn.z = -bn.z;
- vertex.tangent.d = vertex.normal.cross(vertex.tangent.normal).dot(bn) > 0 ? 1 : -1;
+ vertex.tangent.distance = vertex.normal.cross(vertex.tangent.normal).dot(bn) > 0 ? 1 : -1;
}
#endif
diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp
index 5fcc783644..f83204fcdd 100644
--- a/editor/node_3d_editor_gizmos.cpp
+++ b/editor/node_3d_editor_gizmos.cpp
@@ -169,7 +169,7 @@ void EditorNode3DGizmo::set_spatial_node(Node3D *p_node) {
void EditorNode3DGizmo::Instance::create_instance(Node3D *p_base, bool p_hidden) {
- instance = RS::get_singleton()->instance_create2(mesh->get_rid(), p_base->get_world()->get_scenario());
+ instance = RS::get_singleton()->instance_create2(mesh->get_rid(), p_base->get_world_3d()->get_scenario());
RS::get_singleton()->instance_attach_object_instance_id(instance, p_base->get_instance_id());
if (skin_reference.is_valid()) {
RS::get_singleton()->instance_attach_skeleton(instance, skin_reference->get_skeleton());
@@ -3724,10 +3724,10 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector3 n2 = p.normal.cross(n1).normalized();
Vector3 pface[4] = {
- p.normal * p.d + n1 * 10.0 + n2 * 10.0,
- p.normal * p.d + n1 * 10.0 + n2 * -10.0,
- p.normal * p.d + n1 * -10.0 + n2 * -10.0,
- p.normal * p.d + n1 * -10.0 + n2 * 10.0,
+ p.normal * p.distance + n1 * 10.0 + n2 * 10.0,
+ p.normal * p.distance + n1 * 10.0 + n2 * -10.0,
+ p.normal * p.distance + n1 * -10.0 + n2 * -10.0,
+ p.normal * p.distance + n1 * -10.0 + n2 * 10.0,
};
points.push_back(pface[0]);
@@ -3738,8 +3738,8 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
points.push_back(pface[3]);
points.push_back(pface[3]);
points.push_back(pface[0]);
- points.push_back(p.normal * p.d);
- points.push_back(p.normal * p.d + p.normal * 3);
+ points.push_back(p.normal * p.distance);
+ points.push_back(p.normal * p.distance + p.normal * 3);
p_gizmo->add_lines(points, material);
p_gizmo->add_collision_segments(points);
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 594dd0d0cb..8973dca963 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -81,7 +81,7 @@ Variant CollisionShape2DEditor::get_handle_value(int idx) const {
Ref<LineShape2D> line = node->get_shape();
if (idx == 0) {
- return line->get_d();
+ return line->get_distance();
} else {
return line->get_normal();
}
@@ -162,7 +162,7 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
Ref<LineShape2D> line = node->get_shape();
if (idx == 0) {
- line->set_d(p_point.length());
+ line->set_distance(p_point.length());
} else {
line->set_normal(p_point.normalized());
}
@@ -260,9 +260,9 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
Ref<LineShape2D> line = node->get_shape();
if (idx == 0) {
- undo_redo->add_do_method(line.ptr(), "set_d", line->get_d());
+ undo_redo->add_do_method(line.ptr(), "set_distance", line->get_distance());
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
- undo_redo->add_undo_method(line.ptr(), "set_d", p_org);
+ undo_redo->add_undo_method(line.ptr(), "set_distance", p_org);
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
} else {
undo_redo->add_do_method(line.ptr(), "set_normal", line->get_normal());
@@ -485,8 +485,8 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
Ref<LineShape2D> shape = node->get_shape();
handles.resize(2);
- handles.write[0] = shape->get_normal() * shape->get_d();
- handles.write[1] = shape->get_normal() * (shape->get_d() + 30.0);
+ handles.write[0] = shape->get_normal() * shape->get_distance();
+ handles.write[1] = shape->get_normal() * (shape->get_distance() + 30.0);
p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
p_overlay->draw_texture(h, gt.xform(handles[1]) - size);
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index eb14495b9c..f63bcb69b8 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -117,9 +117,9 @@ MaterialEditor::MaterialEditor() {
add_child(vc);
vc->set_anchors_and_margins_preset(PRESET_WIDE);
viewport = memnew(SubViewport);
- Ref<World3D> world;
- world.instance();
- viewport->set_world(world); //use own world
+ Ref<World3D> world_3d;
+ world_3d.instance();
+ viewport->set_world_3d(world_3d); //use own world
vc->add_child(viewport);
viewport->set_disable_input(true);
viewport->set_transparent_background(true);
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index 5e657c3b71..3e603fa499 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -116,9 +116,9 @@ void MeshEditor::_bind_methods() {
MeshEditor::MeshEditor() {
viewport = memnew(SubViewport);
- Ref<World3D> world;
- world.instance();
- viewport->set_world(world); //use own world
+ Ref<World3D> world_3d;
+ world_3d.instance();
+ viewport->set_world_3d(world_3d); //use own world
add_child(viewport);
viewport->set_disable_input(true);
viewport->set_msaa(Viewport::MSAA_2X);
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 60a49f72c0..7e65dd1c78 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -51,7 +51,6 @@
#include "scene/gui/subviewport_container.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/surface_tool.h"
-#include "servers/display_server.h"
#define DISTANCE_DEFAULT 4
@@ -196,12 +195,20 @@ void ViewportRotationControl::_gui_input(Ref<InputEvent> p_event) {
_update_focus();
}
orbiting = false;
+ if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_CAPTURED) {
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
+ Input::get_singleton()->warp_mouse_position(orbiting_mouse_start);
+ }
}
}
const Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
if (orbiting) {
+ if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_VISIBLE) {
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
+ orbiting_mouse_start = mm->get_global_position();
+ }
viewport->_nav_orbit(mm, viewport->_get_warped_mouse_motion(mm));
focused_axis = -1;
} else {
@@ -496,7 +503,7 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos, bool p_append, b
Vector3 pos = _get_ray_pos(p_pos);
Vector2 shrinked_pos = p_pos / subviewport_container->get_stretch_shrink();
- Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world()->get_scenario());
+ Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world_3d()->get_scenario());
Set<Ref<EditorNode3DGizmo>> found_gizmos;
Node *edited_scene = get_tree()->get_edited_scene_root();
@@ -563,7 +570,7 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, bool &r_inclu
Vector3 ray = _get_ray(p_pos);
Vector3 pos = _get_ray_pos(p_pos);
- Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world()->get_scenario());
+ Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world_3d()->get_scenario());
Set<Ref<EditorNode3DGizmo>> found_gizmos;
r_includes_current = false;
@@ -675,14 +682,14 @@ void Node3DEditorViewport::_select_region() {
}
Plane near(cam_pos, -_get_camera_normal());
- near.d -= get_znear();
+ near.distance -= get_znear();
frustum.push_back(near);
Plane far = -near;
- far.d += get_zfar();
+ far.distance += get_zfar();
frustum.push_back(far);
- Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_convex(frustum, get_tree()->get_root()->get_world()->get_scenario());
+ Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_convex(frustum, get_tree()->get_root()->get_world_3d()->get_scenario());
Vector<Node *> selected;
Node *edited_scene = get_tree()->get_edited_scene_root();
@@ -2210,14 +2217,14 @@ void Node3DEditorViewport::set_freelook_active(bool active_now) {
}
// Hide mouse like in an FPS (warping doesn't work)
- DisplayServer::get_singleton()->mouse_set_mode(DisplayServer::MOUSE_MODE_CAPTURED);
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
} else if (freelook_active && !active_now) {
// Sync camera cursor to cursor to "cut" interpolation jumps due to changing referential
cursor = camera_cursor;
// Restore mouse
- DisplayServer::get_singleton()->mouse_set_mode(DisplayServer::MOUSE_MODE_VISIBLE);
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
}
freelook_active = active_now;
@@ -3136,35 +3143,35 @@ void Node3DEditorViewport::_init_gizmo_instance(int p_idx) {
for (int i = 0; i < 3; i++) {
move_gizmo_instance[i] = RS::get_singleton()->instance_create();
RS::get_singleton()->instance_set_base(move_gizmo_instance[i], spatial_editor->get_move_gizmo(i)->get_rid());
- RS::get_singleton()->instance_set_scenario(move_gizmo_instance[i], get_tree()->get_root()->get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(move_gizmo_instance[i], get_tree()->get_root()->get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_visible(move_gizmo_instance[i], false);
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(move_gizmo_instance[i], RS::SHADOW_CASTING_SETTING_OFF);
RS::get_singleton()->instance_set_layer_mask(move_gizmo_instance[i], layer);
move_plane_gizmo_instance[i] = RS::get_singleton()->instance_create();
RS::get_singleton()->instance_set_base(move_plane_gizmo_instance[i], spatial_editor->get_move_plane_gizmo(i)->get_rid());
- RS::get_singleton()->instance_set_scenario(move_plane_gizmo_instance[i], get_tree()->get_root()->get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(move_plane_gizmo_instance[i], get_tree()->get_root()->get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_visible(move_plane_gizmo_instance[i], false);
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(move_plane_gizmo_instance[i], RS::SHADOW_CASTING_SETTING_OFF);
RS::get_singleton()->instance_set_layer_mask(move_plane_gizmo_instance[i], layer);
rotate_gizmo_instance[i] = RS::get_singleton()->instance_create();
RS::get_singleton()->instance_set_base(rotate_gizmo_instance[i], spatial_editor->get_rotate_gizmo(i)->get_rid());
- RS::get_singleton()->instance_set_scenario(rotate_gizmo_instance[i], get_tree()->get_root()->get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(rotate_gizmo_instance[i], get_tree()->get_root()->get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_visible(rotate_gizmo_instance[i], false);
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(rotate_gizmo_instance[i], RS::SHADOW_CASTING_SETTING_OFF);
RS::get_singleton()->instance_set_layer_mask(rotate_gizmo_instance[i], layer);
scale_gizmo_instance[i] = RS::get_singleton()->instance_create();
RS::get_singleton()->instance_set_base(scale_gizmo_instance[i], spatial_editor->get_scale_gizmo(i)->get_rid());
- RS::get_singleton()->instance_set_scenario(scale_gizmo_instance[i], get_tree()->get_root()->get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(scale_gizmo_instance[i], get_tree()->get_root()->get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_visible(scale_gizmo_instance[i], false);
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(scale_gizmo_instance[i], RS::SHADOW_CASTING_SETTING_OFF);
RS::get_singleton()->instance_set_layer_mask(scale_gizmo_instance[i], layer);
scale_plane_gizmo_instance[i] = RS::get_singleton()->instance_create();
RS::get_singleton()->instance_set_base(scale_plane_gizmo_instance[i], spatial_editor->get_scale_plane_gizmo(i)->get_rid());
- RS::get_singleton()->instance_set_scenario(scale_plane_gizmo_instance[i], get_tree()->get_root()->get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(scale_plane_gizmo_instance[i], get_tree()->get_root()->get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_visible(scale_plane_gizmo_instance[i], false);
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(scale_plane_gizmo_instance[i], RS::SHADOW_CASTING_SETTING_OFF);
RS::get_singleton()->instance_set_layer_mask(scale_plane_gizmo_instance[i], layer);
@@ -3186,6 +3193,8 @@ void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
ERR_FAIL_COND(p_activate && !preview);
ERR_FAIL_COND(!p_activate && !previewing);
+ rotation_control->set_visible(!p_activate);
+
if (!p_activate) {
previewing->disconnect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
@@ -3530,7 +3539,7 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const
Vector3 world_ray = _get_ray(p_pos);
Vector3 world_pos = _get_ray_pos(p_pos);
- Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(world_pos, world_ray, get_tree()->get_root()->get_world()->get_scenario());
+ Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(world_pos, world_ray, get_tree()->get_root()->get_world_3d()->get_scenario());
Set<Ref<EditorNode3DGizmo>> found_gizmos;
float closest_dist = MAX_DISTANCE;
@@ -4543,7 +4552,7 @@ Object *Node3DEditor::_get_editor_data(Object *p_what) {
Node3DEditorSelectedItem *si = memnew(Node3DEditorSelectedItem);
si->sp = sp;
- si->sbox_instance = RenderingServer::get_singleton()->instance_create2(selection_box->get_rid(), sp->get_world()->get_scenario());
+ si->sbox_instance = RenderingServer::get_singleton()->instance_create2(selection_box->get_rid(), sp->get_world_3d()->get_scenario());
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(si->sbox_instance, RS::SHADOW_CASTING_SETTING_OFF);
return si;
@@ -5197,7 +5206,7 @@ void Node3DEditor::_init_indicators() {
RenderingServer::get_singleton()->mesh_add_surface_from_arrays(origin, RenderingServer::PRIMITIVE_LINES, d);
RenderingServer::get_singleton()->mesh_surface_set_material(origin, 0, indicator_mat->get_rid());
- origin_instance = RenderingServer::get_singleton()->instance_create2(origin, get_tree()->get_root()->get_world()->get_scenario());
+ origin_instance = RenderingServer::get_singleton()->instance_create2(origin, get_tree()->get_root()->get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_layer_mask(origin_instance, 1 << Node3DEditorViewport::GIZMO_GRID_LAYER);
RenderingServer::get_singleton()->instance_geometry_set_cast_shadows_setting(origin_instance, RS::SHADOW_CASTING_SETTING_OFF);
@@ -5572,7 +5581,7 @@ void Node3DEditor::_init_grid() {
d[RenderingServer::ARRAY_COLOR] = grid_colors[i];
RenderingServer::get_singleton()->mesh_add_surface_from_arrays(grid[i], RenderingServer::PRIMITIVE_LINES, d);
RenderingServer::get_singleton()->mesh_surface_set_material(grid[i], 0, indicator_mat->get_rid());
- grid_instance[i] = RenderingServer::get_singleton()->instance_create2(grid[i], get_tree()->get_root()->get_world()->get_scenario());
+ grid_instance[i] = RenderingServer::get_singleton()->instance_create2(grid[i], get_tree()->get_root()->get_world_3d()->get_scenario());
RenderingServer::get_singleton()->instance_set_visible(grid_instance[i], grid_visible[i]);
RenderingServer::get_singleton()->instance_geometry_set_cast_shadows_setting(grid_instance[i], RS::SHADOW_CASTING_SETTING_OFF);
@@ -5717,7 +5726,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
}
}
- PhysicsDirectSpaceState3D *ss = get_tree()->get_root()->get_world()->get_direct_space_state();
+ PhysicsDirectSpaceState3D *ss = get_tree()->get_root()->get_world_3d()->get_direct_space_state();
PhysicsDirectSpaceState3D::RayResult result;
Array keys = snap_data.keys();
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 71da14ae1a..fdc0741651 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -158,6 +158,7 @@ class ViewportRotationControl : public Control {
Node3DEditorViewport *viewport = nullptr;
Vector<Color> axis_colors;
Vector<int> axis_menu_options;
+ Vector2i orbiting_mouse_start;
bool orbiting = false;
int focused_axis = -2;
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 1a77eeb9de..c79c97737a 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -978,6 +978,26 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
emit_signal("go_to_help", "class_global:" + result.class_name + ":" + result.class_member);
} break;
}
+ } else if (ProjectSettings::get_singleton()->has_setting("autoload/" + p_symbol)) {
+ //check for Autoload scenes
+ String path = ProjectSettings::get_singleton()->get("autoload/" + p_symbol);
+ if (path.begins_with("*")) {
+ path = path.substr(1, path.length());
+ EditorNode::get_singleton()->load_scene(path);
+ }
+ } else if (p_symbol.is_rel_path()) {
+ // Every symbol other than absolute path is relative path so keep this condition at last.
+ String path = _get_absolute_path(p_symbol);
+ if (FileAccess::exists(path)) {
+ List<String> scene_extensions;
+ ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions);
+
+ if (scene_extensions.find(path.get_extension())) {
+ EditorNode::get_singleton()->load_scene(path);
+ } else {
+ EditorNode::get_singleton()->load_resource(path);
+ }
+ }
}
}
@@ -991,13 +1011,28 @@ void ScriptTextEditor::_validate_symbol(const String &p_symbol) {
}
ScriptLanguage::LookupResult result;
- if (ScriptServer::is_global_class(p_symbol) || p_symbol.is_resource_file() || script->get_language()->lookup_code(code_editor->get_text_edit()->get_text_for_lookup_completion(), p_symbol, script->get_path(), base, result) == OK) {
+ if (ScriptServer::is_global_class(p_symbol) || p_symbol.is_resource_file() || script->get_language()->lookup_code(code_editor->get_text_edit()->get_text_for_lookup_completion(), p_symbol, script->get_path(), base, result) == OK || ProjectSettings::get_singleton()->has_setting("autoload/" + p_symbol)) {
text_edit->set_highlighted_word(p_symbol);
+ } else if (p_symbol.is_rel_path()) {
+
+ String path = _get_absolute_path(p_symbol);
+ if (FileAccess::exists(path)) {
+ text_edit->set_highlighted_word(p_symbol);
+ } else {
+ text_edit->set_highlighted_word(String());
+ }
+
} else {
text_edit->set_highlighted_word(String());
}
}
+String ScriptTextEditor::_get_absolute_path(const String &rel_path) {
+ String base_path = script->get_path().get_base_dir();
+ String path = base_path.plus_file(rel_path);
+ return path.replace("///", "//").simplify_path();
+}
+
void ScriptTextEditor::update_toggle_scripts_button() {
if (code_editor != nullptr) {
code_editor->update_toggle_scripts_button();
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 51ce30c831..a0dfba6cc8 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -188,6 +188,8 @@ protected:
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
+ String _get_absolute_path(const String &rel_path);
+
public:
void _update_connected_methods();
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index a7e737fdd2..35ed29f562 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -546,6 +546,10 @@ void VisualShaderEditor::_update_graph() {
Ref<VisualShaderNodeUniform> uniform = vsnode;
Ref<VisualShaderNodeFloatUniform> float_uniform = vsnode;
Ref<VisualShaderNodeIntUniform> int_uniform = vsnode;
+ Ref<VisualShaderNodeVec3Uniform> vec3_uniform = vsnode;
+ Ref<VisualShaderNodeColorUniform> color_uniform = vsnode;
+ Ref<VisualShaderNodeBooleanUniform> bool_uniform = vsnode;
+ Ref<VisualShaderNodeTransformUniform> transform_uniform = vsnode;
if (uniform.is_valid()) {
graph->add_child(node);
_update_created_node(node);
@@ -571,7 +575,7 @@ void VisualShaderEditor::_update_graph() {
//shortcut
VisualShaderNode::PortType port_right = vsnode->get_output_port_type(0);
node->set_slot(0, false, VisualShaderNode::PORT_TYPE_SCALAR, Color(), true, port_right, type_color[port_right]);
- if (!float_uniform.is_valid() && !int_uniform.is_valid()) {
+ if (!float_uniform.is_valid() && !int_uniform.is_valid() && !vec3_uniform.is_valid() && !color_uniform.is_valid() && !bool_uniform.is_valid() && !transform_uniform.is_valid()) {
continue;
}
}
@@ -585,13 +589,16 @@ void VisualShaderEditor::_update_graph() {
}
}
- if (custom_editor && !float_uniform.is_valid() && !int_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) {
+ if (custom_editor && !float_uniform.is_valid() && !int_uniform.is_valid() && !vec3_uniform.is_valid() && !bool_uniform.is_valid() && !transform_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) {
//will be embedded in first port
} else if (custom_editor) {
port_offset++;
node->add_child(custom_editor);
- if (float_uniform.is_valid() || int_uniform.is_valid()) {
+ if (color_uniform.is_valid()) {
+ custom_editor->call_deferred("_show_prop_names", true);
+ }
+ if (float_uniform.is_valid() || int_uniform.is_valid() || vec3_uniform.is_valid() || bool_uniform.is_valid() || transform_uniform.is_valid()) {
custom_editor->call_deferred("_show_prop_names", true);
continue;
}
@@ -2650,7 +2657,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Texture", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "texture"), "texture", VisualShaderNode::PORT_TYPE_SAMPLER, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("FragCoord", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "fragcoord"), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
- add_options.push_back(AddOption("LightAlpha", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_alpha"), "light_alpha", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
+ add_options.push_back(AddOption("LightAlpha", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_alpha"), "light_alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("LightColor", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_color"), "light_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("LightHeight", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_height"), "light_height", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("LightUV", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_uv"), "light_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
@@ -2658,7 +2665,9 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Normal", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "normal"), "normal", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("PointCoord", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "point_coord"), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("ScreenUV", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "screen_uv"), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
+ add_options.push_back(AddOption("ShadowAlpha", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "shadow_alpha"), "shadow_alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("ShadowColor", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "shadow_color"), "shadow_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
+ add_options.push_back(AddOption("ShadowVec", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "shadow_vec"), "shadow_vec", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("Texture", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "texture"), "texture", VisualShaderNode::PORT_TYPE_SAMPLER, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("Extra", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "extra"), "extra", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM));
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 60329fb7bc..15fbf19fdb 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -752,7 +752,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
value_editor[0]->set_text(String::num(plane.normal.x));
value_editor[1]->set_text(String::num(plane.normal.y));
value_editor[2]->set_text(String::num(plane.normal.z));
- value_editor[3]->set_text(String::num(plane.d));
+ value_editor[3]->set_text(String::num(plane.distance));
} break;
case Variant::QUAT: {
@@ -1598,7 +1598,7 @@ void CustomPropertyEditor::_modified(String p_string) {
pl.normal.x = _parse_real_expression(value_editor[0]->get_text());
pl.normal.y = _parse_real_expression(value_editor[1]->get_text());
pl.normal.z = _parse_real_expression(value_editor[2]->get_text());
- pl.d = _parse_real_expression(value_editor[3]->get_text());
+ pl.distance = _parse_real_expression(value_editor[3]->get_text());
v = pl;
_emit_changed_whole_or_field();
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index 6181580a68..22358973a0 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -7,7 +7,7 @@
# Basil Al-Khateeb <basil.y.alkhateeb@gmail.com>, 2017.
# Jamal Alyafei <jamal.qassim@gmail.com>, 2017.
# john lennon <khoanantonio@outlook.com>, 2017.
-# Mohammmad Khashashneh <mohammad.rasmi@gmail.com>, 2016.
+# Mohammmad Khashashneh <mohammad.rasmi@gmail.com>, 2016, 2020.
# Mr ChaosXD <mrchaosxd3@gmail.com>, 2018.
# Mrwan Ashraf <mrwan.ashraf94@gmail.com>, 2017.
# noureldin sharaf <sharaf.noureldin@yahoo.com>, 2017.
@@ -35,12 +35,14 @@
# hshw <shw@tutanota.com>, 2020.
# Youssef Harmal <the.coder.crab@gmail.com>, 2020.
# Nabeel20 <nabeelandnizam@gmail.com>, 2020.
+# merouche djallal <kbordora@gmail.com>, 2020.
+# Airbus5717 <Abdussamadf350@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-27 08:24+0000\n"
-"Last-Translator: Nabeel20 <nabeelandnizam@gmail.com>\n"
+"PO-Revision-Date: 2020-05-05 14:01+0000\n"
+"Last-Translator: Anonymous <noreply@weblate.org>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/"
"godot/ar/>\n"
"Language: ar\n"
@@ -49,12 +51,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr "نوع معامل خاطئ للدالة convert()، إستخدم ثوابت TYPE_*."
+msgstr "معامل type خاطئ لدالة Convert, استخدم احدى الثوابت من مجموعة TYPE_*."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
@@ -344,7 +346,7 @@ msgstr "Ø§Ù„ØªÙØ§Ù الحلقة المثبتة"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr "أدخل Ù…ÙØªØ§Ø­"
+msgstr "أدخل Ø§Ù„Ù…ÙØªØ§Ø­"
#: editor/animation_track_editor.cpp
msgid "Duplicate Key(s)"
@@ -594,11 +596,11 @@ msgstr "إحد٠المحدد (المجموعة المختارة)"
#: editor/animation_track_editor.cpp
msgid "Go to Next Step"
-msgstr "إذهب إلي الخطوة التالية"
+msgstr "إذهب إلى الخطوة التالية"
#: editor/animation_track_editor.cpp
msgid "Go to Previous Step"
-msgstr "إذهب إلي الخطوة السابقة"
+msgstr "إذهب إلى الخطوة السابقة"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -671,7 +673,7 @@ msgstr "إختر المقاطع المراد نسخها"
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
-msgstr "أنسخ"
+msgstr "نسخ"
#: editor/animation_track_editor.cpp
msgid "Select All/None"
@@ -754,13 +756,13 @@ msgstr "تحديد التبويب البرمجي"
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom In"
-msgstr "تقريب"
+msgstr "تكبير"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Out"
-msgstr "إبعاد"
+msgstr "تصغير"
#: editor/code_editor.cpp
msgid "Reset Zoom"
@@ -869,7 +871,7 @@ msgstr "إشارة غير قادر على الاتصال"
#: editor/run_settings_dialog.cpp editor/settings_config_dialog.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Close"
-msgstr "اغلاق"
+msgstr "إغلاق"
#: editor/connections_dialog.cpp
msgid "Connect"
@@ -1100,7 +1102,7 @@ msgstr "Ù…ØªØµÙØ­ الموارد Ø£ÙˆØ±ÙØ§Ù†"
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
-msgstr "مسح"
+msgstr "حذÙ"
#: editor/dependency_editor.cpp
msgid "Owns"
@@ -1716,9 +1718,8 @@ msgid "Current Profile:"
msgstr "المل٠(النسخة) الحالية:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Make Current"
-msgstr "الحالي:"
+msgstr "إجعل الحالي"
#: editor/editor_feature_profile.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -1838,15 +1839,15 @@ msgstr "Ø­ÙØ¸ ملÙ"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
-msgstr "إرجع للخلÙ"
+msgstr "الرجوع للخلÙ"
#: editor/editor_file_dialog.cpp
msgid "Go Forward"
-msgstr "إذهب للأمام"
+msgstr "الذهاب للأمام"
#: editor/editor_file_dialog.cpp
msgid "Go Up"
-msgstr "إذهب للأعلي"
+msgstr "إذهب للأعلى"
#: editor/editor_file_dialog.cpp
msgid "Toggle Hidden Files"
@@ -1866,51 +1867,43 @@ msgstr "مسار التركيز"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Up"
-msgstr "حرك المÙÙØ¶Ù„Ø© للأعلي"
+msgstr "حرك المÙÙØ¶Ù„Ø© للأعلى"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Down"
msgstr "حرك المÙÙØ¶Ù„Ø© للأسÙÙ„"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to previous folder."
-msgstr "إذهب إلي المجلد السابق"
+msgstr "إرجع إلي المجلد السابق."
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to next folder."
-msgstr "إذهب إلي المجلد السابق"
+msgstr "إذهب إلي المجلد التالي."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder."
-msgstr "إذهب إلي المجلد السابق"
+msgstr "إذهب إلي مجلد الأصل."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Refresh files."
-msgstr "إبحث ÙÙŠ الأصناÙ"
+msgstr "Ø­ÙŽØ¯Ù‘ÙØ« Ø§Ù„Ù…Ù„ÙØ§Øª."
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "(Un)favorite current folder."
-msgstr "لا يمكن إنشاء المجلد."
+msgstr "Ø¥Ø¶Ø§ÙØ© المجلد إلى Ø§Ù„Ù…ÙØ¶Ù„Ø© / إخراجه من Ø§Ù„Ù…ÙØ¶Ù„Ø©."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Toggle the visibility of hidden files."
-msgstr "أظهر Ø§Ù„Ù…Ù„ÙØ§Øª المخÙية"
+msgstr "إظهار/Ø¥Ø®ÙØ§Ø¡ Ø§Ù„Ù…Ù„ÙØ§Øª المخÙية."
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-#, fuzzy
msgid "View items as a grid of thumbnails."
-msgstr "أظهر العناصر كشبكة من الصور المصغرة"
+msgstr "أظهر العناصر كشبكة من الصور المصغرة."
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-#, fuzzy
msgid "View items as a list."
-msgstr "أظهر العناصر كقائمة"
+msgstr "أظهر العناصر كقائمة."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1963,12 +1956,11 @@ msgstr "مورث بواسطة:"
#: editor/editor_help.cpp
msgid "Description"
-msgstr "الوصÙ:"
+msgstr "الوصÙ"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Online Tutorials"
-msgstr "الدورس علي الإنترنت:"
+msgstr "التعليمات على الإنترنت"
#: editor/editor_help.cpp
msgid "Properties"
@@ -1979,9 +1971,8 @@ msgid "override:"
msgstr "يتجاوز:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "default:"
-msgstr "Ø§Ù„Ø¥ÙØªØ±Ø§Ø¶ÙŠ"
+msgstr "Ø§Ù„Ø§ÙØªØ±Ø§Ø¶ÙŠ:"
#: editor/editor_help.cpp
msgid "Methods"
@@ -2000,14 +1991,12 @@ msgid "Constants"
msgstr "الثوابت"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Property Descriptions"
-msgstr "وص٠الملكية:"
+msgstr "أوصا٠المÙلكية"
#: editor/editor_help.cpp
-#, fuzzy
msgid "(value)"
-msgstr "القيمة:"
+msgstr "(القيمة)"
#: editor/editor_help.cpp
msgid ""
@@ -2018,9 +2007,8 @@ msgstr ""
"المساهمة واحد [color=$color][url=$url]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Method Descriptions"
-msgstr "وص٠الطريقة:"
+msgstr "أوصا٠الدوال Method"
#: editor/editor_help.cpp
msgid ""
@@ -2033,16 +2021,15 @@ msgstr ""
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
msgid "Search Help"
-msgstr "إبحث ÙÙŠ المساعدة"
+msgstr "ابحث ÙÙŠ المساعدة"
#: editor/editor_help_search.cpp
msgid "Case Sensitive"
msgstr "حساسة لحالة الأحرÙ"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Show Hierarchy"
-msgstr "أظهر المساعدات"
+msgstr "اظهر التراتبية"
#: editor/editor_help_search.cpp
msgid "Display All"
@@ -2069,9 +2056,8 @@ msgid "Properties Only"
msgstr "خصائص Ùقط"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Theme Properties Only"
-msgstr "خصائص"
+msgstr "خصائص الموضوع Theme Ùقط"
#: editor/editor_help_search.cpp
msgid "Member Type"
@@ -2079,35 +2065,31 @@ msgstr "نوع العضو"
#: editor/editor_help_search.cpp
msgid "Class"
-msgstr "الصنÙ"
+msgstr "الصÙ"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Method"
-msgstr "قائمة الطرق"
+msgstr "دالة"
#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Signal"
-msgstr "إشارات"
+msgstr "الإشاراة"
#: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
msgstr "ثابت"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Property"
-msgstr "خصيصة:"
+msgstr "خاصية"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Theme Property"
-msgstr "خصائص الثمة"
+msgstr "خاصية الموضوع Theme"
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
msgid "Property:"
-msgstr "خصيصة:"
+msgstr "خاصية:"
#: editor/editor_inspector.cpp
msgid "Set"
@@ -2119,12 +2101,11 @@ msgstr "تحديد التكرار:"
#: editor/editor_log.cpp
msgid "Output:"
-msgstr "الخرج:"
+msgstr "Ø§Ù„Ù…ÙØ®Ø±Ø¬Ø§Øª:"
#: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Copy Selection"
-msgstr "Ø­Ø°Ù Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
+msgstr "نسخ Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
#: editor/editor_log.cpp editor/editor_network_profiler.cpp
#: editor/editor_profiler.cpp editor/editor_properties.cpp
@@ -2134,11 +2115,11 @@ msgstr "Ø­Ø°Ù Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
#: modules/gdnative/gdnative_library_editor_plugin.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
msgid "Clear"
-msgstr "خالي"
+msgstr "مسح"
#: editor/editor_log.cpp
msgid "Clear Output"
-msgstr "أخلاء الخرج"
+msgstr "مسح Ø§Ù„Ù…ÙØ®Ø±Ø¬Ø§Øª"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
#: editor/editor_profiler.cpp
@@ -2147,23 +2128,20 @@ msgstr "إيقاÙ"
#: editor/editor_network_profiler.cpp editor/editor_profiler.cpp
#: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp
-#, fuzzy
msgid "Start"
-msgstr "بدء!"
+msgstr "بدء"
#: editor/editor_network_profiler.cpp
-#, fuzzy
msgid "%s/s"
msgstr "%s/s"
#: editor/editor_network_profiler.cpp
-#, fuzzy
msgid "Down"
-msgstr "تنزيل"
+msgstr "أسÙÙ„"
#: editor/editor_network_profiler.cpp
msgid "Up"
-msgstr "Ùوق"
+msgstr "أعلى"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
msgid "Node"
@@ -2260,7 +2238,7 @@ msgstr "ينشئ الصورة المصغرة"
#: editor/editor_node.cpp
msgid "This operation can't be done without a tree root."
-msgstr "هذه العملية لا يمكنها الإكتمال من غير شجرة رئيسة."
+msgstr "هذه العملية لا يمكنها الإكتمال من غير جذر شجرة ."
#: editor/editor_node.cpp
msgid ""
@@ -2323,7 +2301,6 @@ msgstr ""
"هذا النظام."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it won't be kept when saving the current scene."
@@ -2340,7 +2317,6 @@ msgstr ""
"الإستيراد ومن ثم أعد إستيراده."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This scene was imported, so changes to it won't be kept.\n"
"Instancing it or inheriting will allow making changes to it.\n"
@@ -2353,13 +2329,12 @@ msgstr ""
"هذا النظام."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This is a remote object, so changes to it won't be kept.\n"
"Please read the documentation relevant to debugging to better understand "
"this workflow."
msgstr ""
-"هذا المصدر ينتمي إلي مشهد قد تم إستيراده، إذا لا يمكن تعديله.\n"
+"هذا المصدر ينتمي إلي مشهد قد تم إستيراده، التعديلات لن ØªØ­ÙØ¸.\n"
"من ÙØ¶Ù„Ùƒ إقرأ التوثيق المرتبط بإستيراد المشاهد لكي تÙهم بشكل Ø£ÙØ¶Ù„ كيÙية عمل "
"هذا النظام."
@@ -2384,9 +2359,8 @@ msgid "Open Base Scene"
msgstr "ÙØªØ­ مشهد أساسي"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Quick Open..."
-msgstr "ÙØªØ­ سريع للمشهد..."
+msgstr "ÙØªØ­ سريع ..."
#: editor/editor_node.cpp
msgid "Quick Open Scene..."
@@ -2405,9 +2379,8 @@ msgid "Save changes to '%s' before closing?"
msgstr "هل تريد Ø­ÙØ¸ التغييرات إلي'%s' قبل الإغلاق؟"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Saved %s modified resource(s)."
-msgstr "ÙØ´Ù„ تحميل المورد."
+msgstr "Ø­ÙØ¸Øª %s الموارد المعدلة."
#: editor/editor_node.cpp
msgid "A root node is required to save the scene."
@@ -2471,7 +2444,7 @@ msgstr "تشغيل مشهد بسرعة..."
#: editor/editor_node.cpp
msgid "Quit"
-msgstr "خروج"
+msgstr "إنهاء"
#: editor/editor_node.cpp
msgid "Exit the editor?"
@@ -2512,9 +2485,8 @@ msgid "Close Scene"
msgstr "اغلاق المشهد"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reopen Closed Scene"
-msgstr "اغلاق المشهد"
+msgstr "إعادة ÙØªØ­ المشهد"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
@@ -2530,19 +2502,19 @@ msgid "Unable to load addon script from path: '%s'."
msgstr "غير قادر علي تحميل كود Ø§Ù„Ø¥Ø¶Ø§ÙØ© من المسار: '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"Unable to load addon script from path: '%s' There seems to be an error in "
"the code, please check the syntax."
msgstr ""
-"غير قادر علي تحميل كود Ø§Ù„Ø¥Ø¶Ø§ÙØ© من المسار: '%s' الكود ليس ÙÙŠ وضع الأداة."
+"غير قادر علي تحميل كود Ø§Ù„Ø¥Ø¶Ø§ÙØ© من المسار: '%s' يبدو أن الكود يوجد Ùيه "
+"أخطاء , الرجاء مراجعة الكود."
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
"غير قادر علي تحميل كود Ø§Ù„Ø¥Ø¶Ø§ÙØ© من المسار: '%s' النوع الأساسي ليس Ø¥Ø¶Ø§ÙØ© "
-"Ù„Ù„Ù…ÙØ¹Ø¯Ù„."
+"Ø§Ù„Ù…ÙØ¹Ø¯Ù„."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
@@ -2615,24 +2587,20 @@ msgstr "Ø§Ù„Ø¥ÙØªØ±Ø§Ø¶ÙŠ"
#: editor/editor_node.cpp editor/editor_properties.cpp
#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Show in FileSystem"
msgstr "أظهر ÙÙŠ مدير Ø§Ù„Ù…Ù„ÙØ§Øª"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Play This Scene"
msgstr "تشغيل المشهد"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Close Tab"
-msgstr "اغلاق"
+msgstr "اغلاق التبويب"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Undo Close Tab"
-msgstr "اغلاق"
+msgstr "تراجع عن ‭‬إغلاق التبويب"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Close Other Tabs"
@@ -2643,9 +2611,8 @@ msgid "Close Tabs to the Right"
msgstr "أغلق التبويبات على اليمين"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Close All Tabs"
-msgstr "اغلاق"
+msgstr "اغلاق جميع Ù†ÙˆØ§ÙØ° التبويب"
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
@@ -2688,9 +2655,8 @@ msgid "Go to previously opened scene."
msgstr "اذهب الي المشهد Ø§Ù„Ù…ÙØªÙˆØ­ مسبقا."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Copy Text"
-msgstr "نسخ المسار"
+msgstr "نسخ النص"
#: editor/editor_node.cpp
msgid "Next tab"
@@ -2729,7 +2695,6 @@ msgid "Save Scene"
msgstr "Ø­ÙØ¸ المشهد"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save All Scenes"
msgstr "Ø­ÙØ¸ جميع المشاهد"
@@ -2753,7 +2718,7 @@ msgstr "تراجع"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Redo"
-msgstr "إعادة"
+msgstr "إعادة تراجع"
#: editor/editor_node.cpp
msgid "Revert Scene"
@@ -2769,14 +2734,12 @@ msgid "Project"
msgstr "مشروع"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project Settings..."
-msgstr "إعدادات المشروع"
+msgstr "إعدادات المشروع..."
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Version Control"
-msgstr "النسخة:"
+msgstr "التحكم ÙÙŠ الإصدار"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Set Up Version Control"
@@ -2787,31 +2750,28 @@ msgid "Shut Down Version Control"
msgstr "Ø¥Ø·ÙØ§Ø¡ التحكم بالنسخة Version Control"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Export..."
-msgstr "تصدير"
+msgstr "تصدير..."
#: editor/editor_node.cpp
msgid "Install Android Build Template..."
msgstr "تحميل قالب البناء للأندرويد..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Project Data Folder"
-msgstr "ÙØªØ­ مدير المشروع؟"
+msgstr "ÙØªØ­ مجلد بيانات المشروع"
#: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp
msgid "Tools"
msgstr "ادوات"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Orphan Resource Explorer..."
-msgstr "Ù…ØªØµÙØ­ الموارد Ø£ÙˆØ±ÙØ§Ù†"
+msgstr "Ù…ØªØµÙØ­ الموارد Ø£ÙˆØ±ÙØ§Ù†..."
#: editor/editor_node.cpp
msgid "Quit to Project List"
-msgstr "غادر الي قائمه المشاريع"
+msgstr "غادر إلى قائمه المشاريع"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/project_export.cpp
@@ -2908,56 +2868,48 @@ msgid "Editor"
msgstr "Ø§Ù„Ù…ÙØ¹Ø¯Ù„"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor Settings..."
-msgstr "إعدادات Ø§Ù„Ù…ÙØ¹Ø¯Ù„"
+msgstr "إعدادات المحرّر"
#: editor/editor_node.cpp
msgid "Editor Layout"
msgstr "نسق Ø§Ù„Ù…ÙØ¹Ø¯Ù„"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Take Screenshot"
-msgstr "Ø­ÙØ¸ المشهد"
+msgstr "أخذ صورة للشاشة"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Screenshots are stored in the Editor Data/Settings Folder."
-msgstr "إعدادات Ø§Ù„Ù…ÙØ¹Ø¯Ù„"
+msgstr "لقطات الشاشة تكون محÙوظة ÙÙŠ مجلّد البيانات/الإعدادت داخل المحرّر"
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
msgstr "إلغاء/ØªÙØ¹ÙŠÙ„ وضع الشاشة الكاملة"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Toggle System Console"
-msgstr "أظهر المود"
+msgstr "إظهار/Ø¥Ø®ÙØ§Ø¡ وحدة التحكم بالنظام"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Editor Data/Settings Folder"
-msgstr "إعدادات Ø§Ù„Ù…ÙØ¹Ø¯Ù„"
+msgstr "ÙØªØ­ مجلّد البيانات/الإعدادت المحرّر"
#: editor/editor_node.cpp
msgid "Open Editor Data Folder"
msgstr "Ø§ÙØªØ­ مل٠بيانات المحرر"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Editor Settings Folder"
-msgstr "إعدادات Ø§Ù„Ù…ÙØ¹Ø¯Ù„"
+msgstr "ÙØªØ­ مجلّد إعدادات المحرّر"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Manage Editor Features..."
-msgstr "إدارة قوالب التصدير"
+msgstr "إدارة ميّزات المحرّر"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Manage Export Templates..."
-msgstr "إدارة قوالب التصدير"
+msgstr "إدارة قوالب التصدير..."
#: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp
msgid "Help"
@@ -2982,9 +2934,8 @@ msgid "Q&A"
msgstr "الأسئلة و الأجوبة"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Report a Bug"
-msgstr "إعادة إستيراد"
+msgstr "إرسال تقرير عن bug أو خلل ÙÙŠ شيء ما"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -3040,24 +2991,20 @@ msgstr "تعديل معرّ٠الÙيديو video driver يتطلب إعادة
#: editor/editor_node.cpp editor/project_settings_editor.cpp
#: editor/settings_config_dialog.cpp
-#, fuzzy
msgid "Save & Restart"
-msgstr "Ø­ÙØ¸ Ùˆ خروج"
+msgstr "Ø­ÙØ¸ Ùˆ إعادة تشغيل"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Spins when the editor window redraws."
-msgstr "يدور حينما Ù†Ø§ÙØ°Ø© Ø§Ù„Ù…ÙØ¹Ø¯Ù„ يتم إعادة دهانة!"
+msgstr "يدور حينما يتم إعادة رسم Ù†Ø§ÙØ°Ø© المحرّر"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update Continuously"
-msgstr "متواصل"
+msgstr "تحديث متواصل"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update When Changed"
-msgstr "تحديث التغييرات"
+msgstr "تحديث عند التغيير"
#: editor/editor_node.cpp
#, fuzzy
@@ -3073,9 +3020,8 @@ msgid "Inspector"
msgstr "Ù…ÙØ±Ø§Ù‚ب"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Expand Bottom Panel"
-msgstr "توسيع الكل"
+msgstr "توسيع التبويب السÙلي"
#: editor/editor_node.cpp
msgid "Output"
@@ -3090,9 +3036,8 @@ msgid "Android build template is missing, please install relevant templates."
msgstr "قالب البناء الخاص بالأندرويد Ù…Ùقود، من ÙØ¶Ù„Ùƒ نزل قوالب ذات صلة."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Manage Templates"
-msgstr "إدارة قوالب التصدير"
+msgstr "إدارة القوالب"
#: editor/editor_node.cpp
msgid ""
@@ -3128,9 +3073,8 @@ msgid "Import Templates From ZIP File"
msgstr "إستيراد القوالب من مل٠مضغوط بصيغة Zip"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Template Package"
-msgstr "‌تصدير مدير القوالب"
+msgstr "رزمة القوالب"
#: editor/editor_node.cpp
msgid "Export Library"
@@ -3181,12 +3125,10 @@ msgid "Open the previous Editor"
msgstr "Ø¥ÙØªØ­ Ø§Ù„Ù…ÙØ¹Ø¯Ù„ السابق"
#: editor/editor_node.h
-#, fuzzy
msgid "Warning!"
-msgstr "تحذيرات"
+msgstr "تحذيرات!"
#: editor/editor_path.cpp
-#, fuzzy
msgid "No sub-resources found."
msgstr "لا مصدر للسطح تم تحديده."
@@ -3199,14 +3141,12 @@ msgid "Thumbnail..."
msgstr "الصورة المصغرة..."
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Main Script:"
-msgstr "ÙØªØ­ الكود"
+msgstr "النص البرمجي الأصلي :"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Edit Plugin"
-msgstr "تعديل البولي"
+msgstr "تعديل Ø§Ù„Ø¥Ø¶Ø§ÙØ©"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -3230,9 +3170,8 @@ msgid "Status:"
msgstr "الحالة:"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Edit:"
-msgstr "Ø§Ù„Ù…ÙØ¹Ø¯Ù„"
+msgstr "تحرير:"
#: editor/editor_profiler.cpp
msgid "Measure:"
@@ -5709,7 +5648,7 @@ msgstr "Ù†ØµÙ Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Frame Selection"
-msgstr "إملئ الشاشة بالمحدد"
+msgstr "تحديد الإطار"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
@@ -6144,6 +6083,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"ÙŠÙنشى سطحاً مخططاً outline mesh سكونياً. هذا السطح تكون قيمه الطبيعية مقلوبة "
+"بصورة تلقائية.\n"
+"يمكن أن يستخدم بدلاً من خاصية التمدد (Grow ) لمادة الحيز المكاني "
+"SpatialMaterial عندما يكون استخدام هذه الخاصية غير مقدور عليه."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -6865,7 +6808,7 @@ msgstr "%s مرجعية الص٠Class"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find Next"
-msgstr "ابحث عن التالي"
+msgstr "إيجاد التالي"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -6898,7 +6841,7 @@ msgstr "تحريك لأعلى"
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Move Down"
-msgstr "تحرك لأسÙÙ„"
+msgstr "تحريك لأسÙÙ„"
#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
@@ -6922,7 +6865,7 @@ msgstr "إعادة ÙØªØ­ النص البرمجي Ø§Ù„Ù…ÙØºÙ„Ù‚"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
-msgstr "Ø§Ø­ÙØ¸ الكل"
+msgstr "Ø¥Ø­ÙØ¸ الكل"
#: editor/plugins/script_editor_plugin.cpp
msgid "Soft Reload Script"
@@ -6934,11 +6877,11 @@ msgstr "نسخ مسار النص البرمجي"
#: editor/plugins/script_editor_plugin.cpp
msgid "History Previous"
-msgstr "التأريخ السابق"
+msgstr "التاريخ السابق"
#: editor/plugins/script_editor_plugin.cpp
msgid "History Next"
-msgstr "التأريخ التالي"
+msgstr "التاريخ التالي"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -6971,11 +6914,11 @@ msgstr "تشغيل"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Into"
-msgstr "خطوة ضمن"
+msgstr "اخط خطوة ضمن"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
-msgstr "خطوة متجاوزة"
+msgstr "اخط خطوة متجاوزة"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Break"
@@ -7473,7 +7416,7 @@ msgstr "عرض Ø§Ù„Ù…ÙØ®Ø·Ø· Wireframe"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Overdraw"
-msgstr ""
+msgstr "عرض تراكبات الرسم Overdraw"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Unshaded"
@@ -7651,27 +7594,27 @@ msgstr "Ù†Ø§ÙØ°Ø© التحويلات ..."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "1 Viewport"
-msgstr "إطار عرض واحد 1"
+msgstr "ساحة رؤية واحدة"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports"
-msgstr "إطاري عرض"
+msgstr "ساحتان للرؤية"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports (Alt)"
-msgstr "إطاري عرض (Alt)"
+msgstr "ساحتان للرؤية (Alt)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports"
-msgstr "3 إطارات عرض"
+msgstr "3 ساحات للرؤية"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports (Alt)"
-msgstr "3 إطارات عرض (Alt)"
+msgstr "3 ساحات للرؤية (Alt)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "4 Viewports"
-msgstr "4 إطارات عرض"
+msgstr "4 ساحات للرؤية"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Gizmos"
@@ -8283,7 +8226,7 @@ msgstr "القلب Ø£Ùقياً"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Flip Vertically"
-msgstr "القلب شاقولياً"
+msgstr "القلب عموديًا"
#: editor/plugins/tile_map_editor_plugin.cpp
#, fuzzy
@@ -8322,7 +8265,7 @@ msgstr "أطلس جديد"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Next Coordinate"
-msgstr "الإحداثات التالية"
+msgstr "الإحداثيات التالية"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Select the next shape, subtile, or Tile."
@@ -8704,11 +8647,11 @@ msgstr "إظهار آخر تعديلات المل٠قبل قبولهم ÙÙŠ Ø¢Ø
#: editor/plugins/version_control_editor_plugin.cpp
msgid "No file diff is active"
-msgstr ""
+msgstr "لا Ù…Ù„Ù ÙØ±ÙˆÙ‚ نشط"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Detect changes in file diff"
-msgstr ""
+msgstr "الكش٠عن التغييرات ÙÙŠ Ù…Ù„Ù Ø§Ù„ÙØ±ÙˆÙ‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(GLES3 only)"
@@ -8861,7 +8804,7 @@ msgstr "Ù…ÙØ´ØºÙ„ Ø§Ù„ÙØ§Ø±Ù‚."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Dodge operator."
-msgstr ""
+msgstr "Ù…ÙØ´ØºÙ„ التملص Dodge."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "HardLight operator."
@@ -9438,7 +9381,7 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Divides vector by vector."
-msgstr ""
+msgstr "ÙŠÙقسّم Ø§Ù„Ù…ÙØªØ¬Ù‡ (الشعاع) على Ø§Ù„Ù…ÙØªØ¬Ù‡."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Multiplies vector by vector."
@@ -9863,10 +9806,10 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
-"قيمة بصرية أعلى\n"
-"جميع المزايا Ù…ØªÙˆØ§ÙØ±Ø©\n"
-"غير متواÙÙ‚ مع العتاد القديم\n"
-"ليس نصحية بالنسبة لألعاب الويب"
+"جودة بصرية أعلى\n"
+"جميع الميزات المتاحة\n"
+"غير متواÙÙ‚ مع الأجهزة القديمة\n"
+"لا ينصح به لألعاب الويب"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
@@ -9879,15 +9822,14 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
-"قيمة بصرية أقل\n"
-"بعض المزايا غير Ù…ØªÙˆØ§ÙØ±Ø© \n"
-"يعمل على أغلب العتاد\n"
-"نصيحة لألعاب الويب"
+"جودة بصرية أقل\n"
+"بعض الميزات غير Ù…ØªÙˆÙØ±Ø© \n"
+"يعمل على معظم الأجهزة\n"
+"يوصى به لألعاب الويب"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
-msgstr ""
-"Ù…ÙØ­Ø±Ùƒ الإخراج البصري يمكن تغييره لاحقاً، ولكن قد تحتاج إلى تعديل المشاهد."
+msgstr "يمكن تعديل جهاز العرض لاحقاً، ولكن قد تحتاج المشاهد إلى تعديل."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -9899,7 +9841,7 @@ msgstr "مشروع Ù…Ùقود"
#: editor/project_manager.cpp
msgid "Error: Project is missing on the filesystem."
-msgstr "خطأ: المشروع Ù…Ùقود ÙÙŠ Ù…Ù„ÙØ§Øª النظام."
+msgstr "خطأ: المشروع Ù…Ùقود ÙÙŠ نظام Ø§Ù„Ù…Ù„ÙØ§Øª."
#: editor/project_manager.cpp
msgid "Can't open project at '%s'."
@@ -10168,11 +10110,11 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
-msgstr ""
+msgstr "مسح حدث إجراء Ø§Ù„Ø¥Ø¶Ø§ÙØ©"
#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr ""
+msgstr "Ø¥Ø¶Ø§ÙØ© حَدث"
#: editor/project_settings_editor.cpp
msgid "Button"
@@ -10180,61 +10122,63 @@ msgstr "زر"
#: editor/project_settings_editor.cpp
msgid "Left Button."
-msgstr ""
+msgstr "الزر الأيسر."
#: editor/project_settings_editor.cpp
msgid "Right Button."
-msgstr ""
+msgstr "الزر الأيمن."
#: editor/project_settings_editor.cpp
msgid "Middle Button."
-msgstr ""
+msgstr "الزر الأوسط."
#: editor/project_settings_editor.cpp
msgid "Wheel Up."
-msgstr ""
+msgstr "العجلة نحو الأقصى."
#: editor/project_settings_editor.cpp
msgid "Wheel Down."
-msgstr ""
+msgstr "العجلة نحو الأدنى."
#: editor/project_settings_editor.cpp
msgid "Add Global Property"
-msgstr ""
+msgstr "Ø¥Ø¶Ø§ÙØ© خاصية شمولية"
#: editor/project_settings_editor.cpp
msgid "Select a setting item first!"
-msgstr ""
+msgstr "اختر عنصر إعدادات بدايةً!"
#: editor/project_settings_editor.cpp
msgid "No property '%s' exists."
-msgstr ""
+msgstr "لا خاصية '%s' موجودة."
#: editor/project_settings_editor.cpp
msgid "Setting '%s' is internal, and it can't be deleted."
-msgstr ""
+msgstr "الإعداد '%s' ضمني، ولا يمكن حذÙÙ‡."
#: editor/project_settings_editor.cpp
msgid "Delete Item"
-msgstr ""
+msgstr "حذ٠العÙنصر"
#: editor/project_settings_editor.cpp
msgid ""
"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'."
msgstr ""
+"اسم إجراء غير صالح. لا يجوز أن يكون الاسم ÙØ§Ø±ØºØ§Ù‹ أو متضمناً '/'ØŒ ':'ØŒ'='ØŒ '\\' "
+"أو'\"'."
#: editor/project_settings_editor.cpp
msgid "Add Input Action"
-msgstr ""
+msgstr "Ø¥Ø¶Ø§ÙØ© إجراء إدخال"
#: editor/project_settings_editor.cpp
msgid "Error saving settings."
-msgstr ""
+msgstr "خطأ ÙÙŠ Ø­ÙØ¸ الإعدادات."
#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
-msgstr ""
+msgstr "تيسّر Ø­ÙØ¸ الإعدادات."
#: editor/project_settings_editor.cpp
#, fuzzy
@@ -10243,19 +10187,19 @@ msgstr "حرك النقطة داخل المنحنى"
#: editor/project_settings_editor.cpp
msgid "Override for Feature"
-msgstr ""
+msgstr "التجاوز للميزة"
#: editor/project_settings_editor.cpp
msgid "Add Translation"
-msgstr ""
+msgstr "Ø¥Ø¶Ø§ÙØ© ترجمة"
#: editor/project_settings_editor.cpp
msgid "Remove Translation"
-msgstr ""
+msgstr "إزالة الترجمة"
#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
-msgstr ""
+msgstr "Ø¥Ø¶Ø§ÙØ© مسار Ù…ÙØ¹Ø§Ø¯ تعيينه Remapped"
#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
@@ -10275,7 +10219,7 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Changed Locale Filter"
-msgstr ""
+msgstr "Ù…ÙØ±Ø´Ø­ محلي Ù…ÙØ¹Ø¯Ù‘Ù„"
#: editor/project_settings_editor.cpp
msgid "Changed Locale Filter Mode"
@@ -10283,7 +10227,7 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr ""
+msgstr "إعدادات المشروع (project.godot)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
@@ -10291,47 +10235,47 @@ msgstr "بشكل عام"
#: editor/project_settings_editor.cpp
msgid "Override For..."
-msgstr ""
+msgstr "تجاوز لأجل..."
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "The editor must be restarted for changes to take effect."
-msgstr ""
+msgstr "لكي يظهر تأثير التغييرات ينبغي إعادة تشغيل Ø§Ù„Ù…ÙØ­Ø±Ø±."
#: editor/project_settings_editor.cpp
msgid "Input Map"
-msgstr ""
+msgstr "خريطة الإدخال"
#: editor/project_settings_editor.cpp
msgid "Action:"
-msgstr ""
+msgstr "إجراء:"
#: editor/project_settings_editor.cpp
msgid "Action"
-msgstr "Ø§Ù„ÙØ¹Ù„"
+msgstr "إجراء"
#: editor/project_settings_editor.cpp
msgid "Deadzone"
-msgstr ""
+msgstr "الحيز الميّت"
#: editor/project_settings_editor.cpp
msgid "Device:"
-msgstr ""
+msgstr "الجهاز:"
#: editor/project_settings_editor.cpp
msgid "Index:"
-msgstr ""
+msgstr "الÙهرس:"
#: editor/project_settings_editor.cpp
msgid "Localization"
-msgstr ""
+msgstr "توطين"
#: editor/project_settings_editor.cpp
msgid "Translations"
-msgstr ""
+msgstr "الترجمات"
#: editor/project_settings_editor.cpp
msgid "Translations:"
-msgstr ""
+msgstr "الترجمات:"
#: editor/project_settings_editor.cpp
msgid "Remaps"
@@ -10339,41 +10283,39 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Resources:"
-msgstr ""
+msgstr "الموارد:"
#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
-msgstr ""
+msgstr "إعادة تعيين الخرائط محلياً:"
#: editor/project_settings_editor.cpp
msgid "Locale"
-msgstr ""
+msgstr "محلي"
#: editor/project_settings_editor.cpp
msgid "Locales Filter"
-msgstr ""
+msgstr "Ù…ÙØ±Ø´Ø­ المحليّات Locales"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Show All Locales"
-msgstr "إظهار العظام"
+msgstr "إظهار جميع المَحليّات Locales"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Show Selected Locales Only"
-msgstr "المحدد Ùقط"
+msgstr "إظهار المَحليّات Ø§Ù„Ù…ÙØ®ØªØ§Ø±Ø© ÙØ­Ø³Ø¨"
#: editor/project_settings_editor.cpp
msgid "Filter mode:"
-msgstr "وضع Ø§Ù„Ù…ÙØµÙÙŠ:"
+msgstr "وضع Ø§Ù„Ù…ÙØ±Ø´Ø­:"
#: editor/project_settings_editor.cpp
msgid "Locales:"
-msgstr ""
+msgstr "مَحليّات:"
#: editor/project_settings_editor.cpp
msgid "AutoLoad"
-msgstr ""
+msgstr "تحميل تلقائي"
#: editor/project_settings_editor.cpp
msgid "Plugins"
@@ -10385,19 +10327,19 @@ msgstr "إعداد Ù…ÙØ³Ø¨Ù‚..."
#: editor/property_editor.cpp
msgid "Zero"
-msgstr ""
+msgstr "ØµÙØ±"
#: editor/property_editor.cpp
msgid "Easing In-Out"
-msgstr ""
+msgstr "تسارع بعد بداية بطيئة"
#: editor/property_editor.cpp
msgid "Easing Out-In"
-msgstr ""
+msgstr "تباطؤ بعد بداية سريعة"
#: editor/property_editor.cpp
msgid "File..."
-msgstr ""
+msgstr "ملÙ..."
#: editor/property_editor.cpp
msgid "Dir..."
@@ -10405,31 +10347,31 @@ msgstr ""
#: editor/property_editor.cpp
msgid "Assign"
-msgstr ""
+msgstr "ألحق"
#: editor/property_editor.cpp
msgid "Select Node"
-msgstr ""
+msgstr "اختر عÙقدة"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
-msgstr ""
+msgstr "خطأ ÙÙŠ تحميل الملÙ: ليس مورداً!"
#: editor/property_editor.cpp
msgid "Pick a Node"
-msgstr ""
+msgstr "اختر عÙقدة"
#: editor/property_editor.cpp
msgid "Bit %d, val %d."
-msgstr ""
+msgstr "Bit %d، قيمة%d."
#: editor/property_selector.cpp
msgid "Select Property"
-msgstr ""
+msgstr "انتقاء الخاصية"
#: editor/property_selector.cpp
msgid "Select Virtual Method"
-msgstr "إختر طريقة Ø¥ÙØªØ±Ø§Ø¶ÙŠØ©"
+msgstr "اختر الطريقة Ø§Ù„Ø¥ÙØªØ±Ø§Ø¶ÙŠØ©"
#: editor/property_selector.cpp
msgid "Select Method"
@@ -10442,24 +10384,23 @@ msgstr "إعادة التسمية"
#: editor/rename_dialog.cpp
msgid "Prefix"
-msgstr ""
+msgstr "بادئة"
#: editor/rename_dialog.cpp
msgid "Suffix"
-msgstr ""
+msgstr "لاحقة"
#: editor/rename_dialog.cpp
msgid "Use Regular Expressions"
msgstr "استخدام التعبيرات الاعتيادية Regular Expressions"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Advanced Options"
-msgstr "إعدادات الكبس"
+msgstr "إعدادات Ù…ÙØªÙ‚دمة"
#: editor/rename_dialog.cpp
msgid "Substitute"
-msgstr ""
+msgstr "استبدال"
#: editor/rename_dialog.cpp
#, fuzzy
@@ -10468,40 +10409,39 @@ msgstr "إسم العقدة:"
#: editor/rename_dialog.cpp
msgid "Node's parent name, if available"
-msgstr ""
+msgstr "اسم العÙقدة الأب، إن ØªÙˆØ§ÙØ±"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Node type"
-msgstr "إسم العقدة:"
+msgstr "نوع العÙقدة"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Current scene name"
-msgstr "لم يتم Ø­ÙØ¸ المشهد الحالي. Ø¥ÙØªØ­Ù‡ علي أية حال؟"
+msgstr "اسم المشهد الحالي"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Root node name"
-msgstr "إعادة التسمية"
+msgstr "اسم العÙقدة الرئيسة (الجذر)"
#: editor/rename_dialog.cpp
msgid ""
"Sequential integer counter.\n"
"Compare counter options."
msgstr ""
+"عداد الأعداد الصحيحة التسلسلية.\n"
+"يقارن إعدادات العداد."
#: editor/rename_dialog.cpp
msgid "Per-level Counter"
-msgstr ""
+msgstr "العداد ÙˆÙÙ‚-المستوى"
#: editor/rename_dialog.cpp
msgid "If set the counter restarts for each group of child nodes"
-msgstr ""
+msgstr "إذا تم تحديده ÙØ¥Ù† العداد سيعيد البدء لكل مجموعة من العÙقد الأبناء"
#: editor/rename_dialog.cpp
msgid "Initial value for the counter"
-msgstr ""
+msgstr "القيمة المبدئية للعداد"
#: editor/rename_dialog.cpp
#, fuzzy
@@ -10510,7 +10450,7 @@ msgstr "خطوة (ثانية):"
#: editor/rename_dialog.cpp
msgid "Amount by which counter is incremented for each node"
-msgstr ""
+msgstr "مقدار الزيادة للعداد لكل عÙقدة"
#: editor/rename_dialog.cpp
msgid "Padding"
@@ -10524,31 +10464,31 @@ msgstr ""
#: editor/rename_dialog.cpp
msgid "Post-Process"
-msgstr ""
+msgstr "المعالجة-اللاحقة Post-Process"
#: editor/rename_dialog.cpp
msgid "Keep"
-msgstr ""
+msgstr "Ø§Ø­ØªÙØ¸"
#: editor/rename_dialog.cpp
msgid "PascalCase to snake_case"
-msgstr ""
+msgstr "حالة أحر٠PascalCase إلى snake_case"
#: editor/rename_dialog.cpp
msgid "snake_case to PascalCase"
-msgstr ""
+msgstr "حالة أحر٠snake_case إلى PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
-msgstr ""
+msgstr "حالة"
#: editor/rename_dialog.cpp
msgid "To Lowercase"
-msgstr ""
+msgstr "لأحر٠صغيرة Lowercase"
#: editor/rename_dialog.cpp
msgid "To Uppercase"
-msgstr ""
+msgstr "لأحر٠كبيرة Uppercase"
#: editor/rename_dialog.cpp
#, fuzzy
@@ -10557,7 +10497,7 @@ msgstr "إرجاع التكبير"
#: editor/rename_dialog.cpp
msgid "Regular Expression Error"
-msgstr ""
+msgstr "خطأ ذو علاقة بالتعبير الاعتيادي Regular Expression"
#: editor/rename_dialog.cpp
msgid "At character %s"
@@ -10565,65 +10505,65 @@ msgstr "عند الحر٠%s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
-msgstr ""
+msgstr "إعادة اختيار أبوة العÙقدة"
#: editor/reparent_dialog.cpp
msgid "Reparent Location (Select new Parent):"
-msgstr ""
+msgstr "إعادة اختيار أبوة المكان (اختر أب جديد):"
#: editor/reparent_dialog.cpp
msgid "Keep Global Transform"
-msgstr ""
+msgstr "Ø§Ù„Ø§Ø­ØªÙØ§Ø¸ بالتحوّل الشمولي Global"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent"
-msgstr ""
+msgstr "إعادة اختيار الأبوة"
#: editor/run_settings_dialog.cpp
msgid "Run Mode:"
-msgstr ""
+msgstr "وضع التشغيل:"
#: editor/run_settings_dialog.cpp
msgid "Current Scene"
-msgstr ""
+msgstr "المشهد الحالي"
#: editor/run_settings_dialog.cpp
msgid "Main Scene"
-msgstr ""
+msgstr "المشهد الرئيس"
#: editor/run_settings_dialog.cpp
msgid "Main Scene Arguments:"
-msgstr ""
+msgstr "معاملات المشهد الرئيس:"
#: editor/run_settings_dialog.cpp
msgid "Scene Run Settings"
-msgstr ""
+msgstr "إعدادت تشغيل المشهد"
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
-msgstr ""
+msgstr "لا أب لنمذجة المشاهد عنده."
#: editor/scene_tree_dock.cpp
msgid "Error loading scene from %s"
-msgstr ""
+msgstr "خطأ ÙÙŠ تحميل المشهد من %s"
#: editor/scene_tree_dock.cpp
msgid ""
"Cannot instance the scene '%s' because the current scene exists within one "
"of its nodes."
-msgstr ""
+msgstr "لا يمكن نمذجة المشهد '%s' لأن المشهد الحالي Ù…ÙØªØ¶ÙŽÙ…Ù† ÙÙŠ واحد من عÙقده."
#: editor/scene_tree_dock.cpp
msgid "Instance Scene(s)"
-msgstr ""
+msgstr "نمذجة المشهد(المشاهد)"
#: editor/scene_tree_dock.cpp
msgid "Replace with Branch Scene"
-msgstr ""
+msgstr "استبدال بمشهد ÙØ±Ø¹ÙŠ"
#: editor/scene_tree_dock.cpp
msgid "Instance Child Scene"
-msgstr ""
+msgstr "نمذجة المشهد الابن"
#: editor/scene_tree_dock.cpp
msgid "Clear Script"
@@ -10631,31 +10571,33 @@ msgstr "إخلاء الكود"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
-msgstr ""
+msgstr "لا يمكن إجراء هذه العملية على جذر الشجرة."
#: editor/scene_tree_dock.cpp
msgid "Move Node In Parent"
-msgstr ""
+msgstr "نقل العÙقدة عند الأب"
#: editor/scene_tree_dock.cpp
msgid "Move Nodes In Parent"
-msgstr ""
+msgstr "تحريك العÙقد عند الأب"
#: editor/scene_tree_dock.cpp
msgid "Duplicate Node(s)"
-msgstr ""
+msgstr "Ù…Ø¶Ø§Ø¹ÙØ© العÙقدة(العÙقد)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"لا يمكن إعادة اختيار أبوة العÙقدة ÙÙŠ المشاهد الموروثة، لا يمكن تغيير ترتيب "
+"العÙقد."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
-msgstr ""
+msgstr "لكي تصبح هذه العÙقدة رئيسة (جذر) عليها أن تنتمي إلى المشهد Ø§Ù„Ù…ÙØ­Ø±Ø±."
#: editor/scene_tree_dock.cpp
msgid "Instantiated scenes can't become root"
-msgstr ""
+msgstr "لا يمكن أن تصبح المشاهد المنمذجة مشاهد رئيسة (جذر)"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10669,11 +10611,11 @@ msgstr "إنشاء عقدة"
#: editor/scene_tree_dock.cpp
msgid "Delete the root node \"%s\"?"
-msgstr ""
+msgstr "حذ٠العÙقدة الرئيسة (الجذر) \"%s\"ØŸ"
#: editor/scene_tree_dock.cpp
msgid "Delete node \"%s\" and its children?"
-msgstr ""
+msgstr "حذ٠العÙقدة \"%s\" مع جميع أبنائها؟"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10682,56 +10624,56 @@ msgstr "إنشاء عقدة"
#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
-msgstr ""
+msgstr "لا يمكن التنÙيذ مع العÙقدة الرئيسة (الجذر)."
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on instanced scenes."
-msgstr ""
+msgstr "لا يمكن تنÙيذ هذا الإجراء على المشاهد المÙنمذجة."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
-msgstr ""
+msgstr "Ø§Ø­ÙØ¸ المشهد الجديد كـ..."
#: editor/scene_tree_dock.cpp
msgid ""
"Disabling \"editable_instance\" will cause all properties of the node to be "
"reverted to their default."
msgstr ""
+"سيسبب تعطيل خاصية \"النمذجة_Ø§Ù„Ù…ÙØ­Ø±Ø±Ø©\" \"editable_instance\" عودة قيم العÙقد "
+"إلى القيم Ø§Ù„Ø§ÙØªØ±Ø§Ø¶ÙŠØ© لها."
#: editor/scene_tree_dock.cpp
msgid ""
"Enabling \"Load As Placeholder\" will disable \"Editable Children\" and "
"cause all properties of the node to be reverted to their default."
msgstr ""
+"سيسبب تمكين \"التحميل كعنصر نائب\" \"Load As Placeholder\" تعطيل \"ابن قابل "
+"للتحرير\" \"Editable Children\" والذي ينجم عنه عودة قيم جميع العÙقد إلى قيمها "
+"Ø§Ù„Ø§ÙØªØ±Ø§Ø¶ÙŠØ©."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Make Local"
-msgstr "أنشئ عظام"
+msgstr "اجعله محلياً"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "New Scene Root"
-msgstr "Ø­ÙØ¸ المشهد"
+msgstr "مشهد رئيس (جذر) جديد"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Create Root Node:"
-msgstr "إنشاء عقدة"
+msgstr "إنشاء العÙقدة الرئيسة (الجذر):"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "2D Scene"
-msgstr "مشهد"
+msgstr "مشهد ثنائي Ø§Ù„Ø¨ÙØ¹Ø¯"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "3D Scene"
-msgstr "مشهد"
+msgstr "مشهد ثلاثي الأبعاد"
#: editor/scene_tree_dock.cpp
msgid "User Interface"
-msgstr ""
+msgstr "واجهة المستخدم"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10740,37 +10682,37 @@ msgstr "إنشاء عقدة"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
-msgstr ""
+msgstr "لا يمكن تنÙيذ الإجراء على عÙقدة من مشهد أجنبي!"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes the current scene inherits from!"
-msgstr ""
+msgstr "لا يمكن تنÙيذ الإجراء على عÙقد يرثها المشهد الحالي!"
#: editor/scene_tree_dock.cpp
msgid "Attach Script"
-msgstr ""
+msgstr "إلحاق نص برمجي"
#: editor/scene_tree_dock.cpp
msgid "Remove Node(s)"
-msgstr ""
+msgstr "إزالة عÙقدة (عÙقد)"
#: editor/scene_tree_dock.cpp
msgid "Change type of node(s)"
-msgstr ""
+msgstr "تغيير نوع العÙقدة(العÙقد)"
#: editor/scene_tree_dock.cpp
msgid ""
"Couldn't save new scene. Likely dependencies (instances) couldn't be "
"satisfied."
-msgstr ""
+msgstr "لم ينجح Ø­ÙØ¸ المشهد الجديد. غالباً لا يمكن إشباع التبعات (النماذج)."
#: editor/scene_tree_dock.cpp
msgid "Error saving scene."
-msgstr ""
+msgstr "خطأ ÙÙŠ Ø­ÙØ¸ المشهد."
#: editor/scene_tree_dock.cpp
msgid "Error duplicating scene to save it."
-msgstr ""
+msgstr "خطأ ÙÙŠ Ù…Ø¶Ø§Ø¹ÙØ© المشهد Ù„Ø­ÙØ¸Ù‡."
#: editor/scene_tree_dock.cpp
msgid "Sub-Resources"
@@ -10778,15 +10720,15 @@ msgstr "مورد ÙØ±Ø¹ÙŠ"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance"
-msgstr ""
+msgstr "مسح الميراث"
#: editor/scene_tree_dock.cpp
msgid "Editable Children"
-msgstr ""
+msgstr "أبناء قابلين للتعديل"
#: editor/scene_tree_dock.cpp
msgid "Load As Placeholder"
-msgstr ""
+msgstr "تحميله كعنصر نائب"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10795,7 +10737,7 @@ msgstr "ÙÙØªØ­ مؤخراً"
#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
-msgstr ""
+msgstr "Ø¥Ø¶Ø§ÙØ© عÙقدة ابن"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10804,7 +10746,7 @@ msgstr "طوي الكل"
#: editor/scene_tree_dock.cpp
msgid "Change Type"
-msgstr ""
+msgstr "تغيير النوع"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10818,19 +10760,19 @@ msgstr "Ø­ÙØ¸ المشهد"
#: editor/scene_tree_dock.cpp
msgid "Merge From Scene"
-msgstr ""
+msgstr "دمج من المشهد"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
msgid "Save Branch as Scene"
-msgstr ""
+msgstr "Ø­ÙØ¸ Ø§Ù„ÙØ±Ø¹ كمشهد"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
msgid "Copy Node Path"
-msgstr ""
+msgstr "نسخ مسار العÙقدة"
#: editor/scene_tree_dock.cpp
msgid "Delete (No Confirm)"
-msgstr ""
+msgstr "حذ٠(دون تأكيد)"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10842,14 +10784,16 @@ msgid ""
"Instance a scene file as a Node. Creates an inherited scene if no root node "
"exists."
msgstr ""
+"نمذجة مل٠المشهد كعÙقدة. إن لم يكن هناك عÙقدة رئيسة (جذر) سيتم إنشاء مشهد "
+"موروث."
#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
-msgstr ""
+msgstr "إلحاق نص برمجي موجود أو جديد للعÙقدة المختارة."
#: editor/scene_tree_dock.cpp
msgid "Clear a script for the selected node."
-msgstr ""
+msgstr "مسح النص البرمجي للعÙقدة المختارة."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10857,11 +10801,11 @@ msgstr "عن بعد"
#: editor/scene_tree_dock.cpp
msgid "Local"
-msgstr ""
+msgstr "محلي"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
+msgstr "مسح الموروث؟ (لا تراجع!)"
#: editor/scene_tree_editor.cpp
#, fuzzy
@@ -11235,11 +11179,11 @@ msgstr ""
#: editor/script_editor_debugger.cpp
msgid "Set From Tree"
-msgstr ""
+msgstr "التحديد من الشجرة"
#: editor/script_editor_debugger.cpp
msgid "Export measures as CSV"
-msgstr ""
+msgstr "تصدير القياسات ك CSV"
#: editor/settings_config_dialog.cpp
#, fuzzy
@@ -11248,7 +11192,7 @@ msgstr "تخÙي٠للخارج"
#: editor/settings_config_dialog.cpp
msgid "Restore Shortcut"
-msgstr ""
+msgstr "إعادة تعيين الاختصارات"
#: editor/settings_config_dialog.cpp
#, fuzzy
@@ -11261,15 +11205,15 @@ msgstr "إعدادات Ø§Ù„Ù…ÙØ¹Ø¯Ù„"
#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
-msgstr ""
+msgstr "الاختصارات"
#: editor/settings_config_dialog.cpp
msgid "Binding"
-msgstr ""
+msgstr "الربط"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Light Radius"
-msgstr ""
+msgstr "تغيير نص٠قطر الإنارة"
#: editor/spatial_editor_gizmos.cpp
msgid "Change AudioStreamPlayer3D Emission Angle"
@@ -11555,9 +11499,8 @@ msgid "Clear Selection"
msgstr "إخلاء المحدد"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Fill Selection"
-msgstr "ÙƒÙÙ„ Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
+msgstr "تعبئة Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Settings"
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index 3f5c140428..aaa46da54d 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -7,12 +7,13 @@
# Tahmid Karim <tahmidk15@gmail.com>, 2016.
# Tawhid H. <Tawhidk757@yahoo.com>, 2019.
# Hasibul Hasan <hasibeng78@gmail.com>, 2019.
+# Oymate <dhruboadittya96@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-12-13 09:38+0000\n"
-"Last-Translator: Hasibul Hasan <hasibeng78@gmail.com>\n"
+"PO-Revision-Date: 2020-05-04 15:11+0000\n"
+"Last-Translator: Anonymous <noreply@weblate.org>\n"
"Language-Team: Bengali <https://hosted.weblate.org/projects/godot-engine/"
"godot/bn/>\n"
"Language: bn\n"
@@ -20,7 +21,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Weblate 3.10-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -29,7 +30,7 @@ msgstr "অবৈধ পà§à¦°à¦•ার রূপানà§à¦¤à¦° করার à¦
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "à§§ (à¦à¦•টি অকà§à¦·à¦°) দৈরà§à¦˜à§à¦¯ à¦à¦° সà§à¦Ÿà§à¦°à¦¿à¦‚ পà§à¦°à¦¤à§à¦¯à¦¾à¦¶à¦¿à¦¤à¥¤"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
diff --git a/editor/translations/de.po b/editor/translations/de.po
index 86e7d09671..c3b2d6ee58 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -53,8 +53,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-20 05:51+0000\n"
-"Last-Translator: anonymous <noreply@weblate.org>\n"
+"PO-Revision-Date: 2020-05-04 15:11+0000\n"
+"Last-Translator: Anonymous <noreply@weblate.org>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
"Language: de\n"
@@ -62,7 +62,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -3001,7 +3001,7 @@ msgstr "Dokumentationsvorschläge senden"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
-msgstr "Community"
+msgstr "Gemeinschaft"
#: editor/editor_node.cpp
msgid "About"
@@ -10002,6 +10002,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"Die Suchmaske filtert Projekte nach ihrem Namen oder der letzten Komponente "
+"ihres Pfadnamens.\n"
+"Um den Filter auf den gesamten Pfadnamen anzuwenden muss mindestens ein ‚/‘-"
+"Zeichen in der Suchanfrage vorhanden sein."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -11123,9 +11127,8 @@ msgid "Total:"
msgstr "Insgesamt:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Profil exportieren"
+msgstr "Liste als CSV-Datei exportieren"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
diff --git a/editor/translations/eo.po b/editor/translations/eo.po
index dc10209d18..d75cb88920 100644
--- a/editor/translations/eo.po
+++ b/editor/translations/eo.po
@@ -7,18 +7,19 @@
# Teashrock <kajitsu22@gmail.com>, 2019.
# Brandon Dyer <brandondyer64@gmail.com>, 2019.
# Alejandro Sánchez Medina <alejandrosanchzmedina@gmail.com>, 2019.
+# Sr Half <flavio05@outlook.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2019-11-11 14:19+0000\n"
-"Last-Translator: Alejandro Sánchez Medina <alejandrosanchzmedina@gmail.com>\n"
+"PO-Revision-Date: 2020-05-01 11:43+0000\n"
+"Last-Translator: Sr Half <flavio05@outlook.com>\n"
"Language-Team: Esperanto <https://hosted.weblate.org/projects/godot-engine/"
"godot/eo/>\n"
"Language: eo\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.10-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -27,7 +28,7 @@ msgstr "Nevalida tip-argumento por funkcio convert(). Uzu konstantojn TYPE_*."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "Atendas ĉenon de longo 1 (unu karaktero)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -65,31 +66,31 @@ msgstr "En voko al '%s':"
#: core/ustring.cpp
msgid "B"
-msgstr ""
+msgstr "B"
#: core/ustring.cpp
msgid "KiB"
-msgstr ""
+msgstr "Kib"
#: core/ustring.cpp
msgid "MiB"
-msgstr ""
+msgstr "MiB"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "Gib"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "TiB"
#: core/ustring.cpp
msgid "PiB"
-msgstr ""
+msgstr "PiB"
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "EiB"
#: editor/animation_bezier_editor.cpp
msgid "Free"
@@ -422,7 +423,7 @@ msgstr "Äœi ne estas ebla adici novan vojeton sen radiko"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
-msgstr ""
+msgstr "Nevalida trako por Bezier (neniu taŭga subproprietaĵoj)"
#: editor/animation_track_editor.cpp
msgid "Add Bezier Track"
@@ -12285,7 +12286,7 @@ msgstr ""
#: servers/visual/shader_language.cpp
msgid "Constants cannot be modified."
-msgstr ""
+msgstr "Konstantoj ne povas esti modifitaj."
#, fuzzy
#~ msgid "Help improve the Godot documentation by giving feedback."
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 933cff80a4..8446ed2415 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -45,11 +45,12 @@
# Julián Luini <jluini@gmail.com>, 2020.
# Victor S. <victorstancioiu@gmail.com>, 2020.
# henry rujano herrera <rujhen@gmail.com>, 2020.
+# Megamega53 <Christopher.Morales21@myhunter.cuny.edu>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-23 20:21+0000\n"
+"PO-Revision-Date: 2020-05-04 15:11+0000\n"
"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
@@ -58,7 +59,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -617,11 +618,11 @@ msgstr "Eliminar Selección"
#: editor/animation_track_editor.cpp
msgid "Go to Next Step"
-msgstr "Ir al Paso Siguiente"
+msgstr "Ir al Siguiente Paso"
#: editor/animation_track_editor.cpp
msgid "Go to Previous Step"
-msgstr "Ir al Paso Anterior"
+msgstr "Ir al Anterior Paso"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -2043,7 +2044,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr "Descripción de Métodos"
+msgstr "Descripciones de Métodos"
#: editor/editor_help.cpp
msgid ""
@@ -2691,7 +2692,7 @@ msgstr "Posición del Dock"
#: editor/editor_node.cpp
msgid "Distraction Free Mode"
-msgstr "Modo sin distracciones"
+msgstr "Modo Sin Distracciones"
#: editor/editor_node.cpp
msgid "Toggle distraction-free mode."
@@ -2715,11 +2716,11 @@ msgstr "Copiar Texto"
#: editor/editor_node.cpp
msgid "Next tab"
-msgstr "Pestaña siguiente"
+msgstr "Siguiente pestaña"
#: editor/editor_node.cpp
msgid "Previous tab"
-msgstr "Pestaña anterior"
+msgstr "Anterior pestaña"
#: editor/editor_node.cpp
msgid "Filter Files..."
@@ -5428,7 +5429,7 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Reset"
-msgstr "Resetear el Zoom"
+msgstr "Resetear Zoom"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5456,17 +5457,17 @@ msgstr "Alt + Clic Derecho: Selección en listado de solapamientos"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode"
-msgstr "Modo Movimiento"
+msgstr "Modo de Movimiento"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Mode"
-msgstr "Modo Rotación"
+msgstr "Modo de Rotación"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Mode"
-msgstr "Modo Escalado"
+msgstr "Modo de Escalado"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5488,7 +5489,7 @@ msgstr "Modo desplazamiento lateral"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Ruler Mode"
-msgstr "Modo Regla"
+msgstr "Modo de Regla"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle smart snapping."
@@ -5679,7 +5680,7 @@ msgstr "Clave de animación y Opciones de Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key (Existing Tracks)"
-msgstr "Insertar clave (pistas existentes)"
+msgstr "Insertar Clave (Pistas Existentes)"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Copy Pose"
@@ -6035,7 +6036,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Collision Sibling"
-msgstr "Crear Colisión Convexa Única Hermana"
+msgstr "Crear Collider Convexo Único Hermano"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6047,7 +6048,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Crear Múltiples Colisiones Convexas Hermanas"
+msgstr "Crear Múltiples Collider Convexos Hermanos"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6855,7 +6856,7 @@ msgstr "Guardar Todo"
#: editor/plugins/script_editor_plugin.cpp
msgid "Soft Reload Script"
-msgstr "Recargar parcialmente el script"
+msgstr "Recargar Parcialmente el Script"
#: editor/plugins/script_editor_plugin.cpp
msgid "Copy Script Path"
@@ -6863,7 +6864,7 @@ msgstr "Copiar Ruta del Script"
#: editor/plugins/script_editor_plugin.cpp
msgid "History Previous"
-msgstr "Previo en Historial"
+msgstr "Previo en el Historial"
#: editor/plugins/script_editor_plugin.cpp
msgid "History Next"
@@ -6900,11 +6901,11 @@ msgstr "Ejecutar"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Into"
-msgstr "Step Into"
+msgstr "Entrar En"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
-msgstr "Step Over"
+msgstr "Salir de Aquí"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Break"
@@ -7112,15 +7113,15 @@ msgstr "Eliminar Espacios Sobrantes al Final"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent to Spaces"
-msgstr "Convertir Indentación en Espacios"
+msgstr "Convertir Sangría en Espacios"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent to Tabs"
-msgstr "Convertir Indentación en Tabulaciones"
+msgstr "Convertir Sangría en Tabulaciones"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
-msgstr "Autoindentar"
+msgstr "Auto Sangría"
#: editor/plugins/script_text_editor.cpp
msgid "Find in Files..."
@@ -7140,7 +7141,7 @@ msgstr "Ir al Siguiente Marcador"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Previous Bookmark"
-msgstr "Ir al Marcador Anterior"
+msgstr "Ir al Anterior Marcador"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Bookmarks"
@@ -7157,19 +7158,19 @@ msgstr "Ir a Línea..."
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Toggle Breakpoint"
-msgstr "Act./Desact. Breakpoint"
+msgstr "Cambiar Punto de Ruptura"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr "Eliminar Todos los Breakpoints"
+msgstr "Eliminar Todos los Puntos de Ruptura"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Next Breakpoint"
-msgstr "Ir al Siguiente Breakpoint"
+msgstr "Ir al Siguiente Punto de Ruptura"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Previous Breakpoint"
-msgstr "Ir al Breakpoint Anterior"
+msgstr "Ir al Anterior Punto de Ruptura"
#: editor/plugins/shader_editor_plugin.cpp
msgid ""
@@ -7349,11 +7350,11 @@ msgstr "Detrás"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
-msgstr "Alinear Transform con Vista"
+msgstr "Alinear la Transformación con la Vista"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Rotation with View"
-msgstr "Alinear Rotación con Vista"
+msgstr "Alinear la Rotación con la Vista"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -7437,7 +7438,7 @@ msgstr "Vista Libre Frontal"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Backwards"
-msgstr "Vista Libre Posterior"
+msgstr "Vista Libre Trasera"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Up"
@@ -7507,7 +7508,7 @@ msgstr "Vista Superior"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View"
-msgstr "Vista Posterior"
+msgstr "Vista Trasera"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View"
@@ -8125,7 +8126,7 @@ msgstr "Asignar un recurso TileSet a este TileMap para usas sus tiles."
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint Tile"
-msgstr "Dibujar tile"
+msgstr "Dibujar Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid ""
@@ -8233,35 +8234,35 @@ msgstr "Ãndice Z"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Region Mode"
-msgstr "Modo Región"
+msgstr "Modo de Región"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Collision Mode"
-msgstr "Modo Colisión"
+msgstr "Modo de Colisión"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Occlusion Mode"
-msgstr "Modo Oclusión"
+msgstr "Modo de Oclusión"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Navigation Mode"
-msgstr "Modo Navegación"
+msgstr "Modo de Navegación"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Bitmask Mode"
-msgstr "Modo Bitmask"
+msgstr "Modo de Bitmask"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Priority Mode"
-msgstr "Modo Prioridad"
+msgstr "Modo de Prioridad"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Icon Mode"
-msgstr "Modo Icono"
+msgstr "Modo de Icono"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Z Index Mode"
-msgstr "Modo Ãndice Z"
+msgstr "Modo de Ãndice Z"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
@@ -9997,6 +9998,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"La casilla de búsqueda filtra los proyectos por nombre y el último "
+"componente de la ruta.\n"
+"Para filtrar los proyectos por nombre y ruta completa, la consulta debe "
+"contener al menos un carácter `/`."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -11115,9 +11120,8 @@ msgid "Total:"
msgstr "Total:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Exportar Perfil"
+msgstr "Exportar lista a un archivo CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -11890,7 +11894,7 @@ msgstr "Crear Función"
#: modules/visual_script/visual_script_editor.cpp
msgid "Refresh Graph"
-msgstr "Actualizar Gráfico"
+msgstr "Refrescar Gráfico"
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit Member"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index bd6d934a59..9136ac11c3 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -18,8 +18,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-23 20:21+0000\n"
-"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n"
+"PO-Revision-Date: 2020-05-02 01:48+0000\n"
+"Last-Translator: Anonymous <noreply@weblate.org>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
"Language: es_AR\n"
@@ -27,7 +27,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2954,13 +2954,12 @@ msgid "Q&A"
msgstr "Q&A"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Report a Bug"
-msgstr "Reimportar"
+msgstr "Reportar un Bug"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
-msgstr ""
+msgstr "Enviar comentarios sobre la documentación"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
@@ -4020,9 +4019,8 @@ msgid "Reimport"
msgstr "Reimportar"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Save Scenes, Re-Import, and Restart"
-msgstr "Guardar escenas, reimportar y reiniciar"
+msgstr "Guardar Escenas, Reimportar y Reiniciar"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
@@ -7323,9 +7321,8 @@ msgid "This operation requires a single selected node."
msgstr "Esta operación requiere un solo nodo seleccionado."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Auto Orthogonal Enabled"
-msgstr "Ortogonal"
+msgstr "Auto Ortogonal Activado"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
@@ -9956,6 +9953,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"La casilla de búsqueda filtra los proyectos por nombre y el último "
+"componente de la ruta.\n"
+"Para filtrar los proyectos por nombre y ruta completa, la consulta debe "
+"contener al menos un carácter `/`."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10951,6 +10952,8 @@ msgid ""
"Note: Built-in scripts have some limitations and can't be edited using an "
"external editor."
msgstr ""
+"Nota: Los scripts integrados tienen algunas limitaciones y no pueden ser "
+"editados con un editor externo."
#: editor/script_create_dialog.cpp
msgid "Class Name:"
@@ -11073,9 +11076,8 @@ msgid "Total:"
msgstr "Total:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Exportar Perfil"
+msgstr "Exportar lista a un archivo CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -12759,7 +12761,7 @@ msgstr ""
#: scene/main/viewport.cpp
msgid "Viewport size must be greater than 0 to render anything."
-msgstr ""
+msgstr "El tamaño del viewport debe ser mayor a 0 para poder renderizar."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index af9486a2ad..6695783866 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -10,11 +10,12 @@
# Sami Lehtilä <sami.lehtila@gmail.com>, 2018.
# Tapani Niemi <tapani.niemi@kapsi.fi>, 2018, 2019, 2020.
# Tuomas Lähteenmäki <lahtis@gmail.com>, 2019.
+# Matti Niskanen <matti.t.niskanen@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-20 05:51+0000\n"
+"PO-Revision-Date: 2020-05-01 11:42+0000\n"
"Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/"
"godot/fi/>\n"
@@ -23,7 +24,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2757,7 +2758,7 @@ msgstr "Irrallisten resurssien hallinta..."
#: editor/editor_node.cpp
msgid "Quit to Project List"
-msgstr "Lopeta ja palaa projektiluetteloon"
+msgstr "Poistu projektiluetteloon"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/project_export.cpp
@@ -5353,7 +5354,7 @@ msgstr "Palauta oletuslähennystaso"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode"
-msgstr "Valitse tila"
+msgstr "Valintatila"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag: Rotate"
@@ -5381,7 +5382,7 @@ msgstr "Siirtotila"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Mode"
-msgstr "Kääntötila"
+msgstr "Kiertotila"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9898,6 +9899,9 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"Hakulaatikko suodattaa projektit nimen ja polun loppuosan mukaan.\n"
+"Suodattaaksesi projektit nimen ja koko polun mukaan, haussa tulee olla "
+"mukana vähintään yksi `/` merkki."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -11017,9 +11021,8 @@ msgid "Total:"
msgstr "Yhteensä:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Vie profiili"
+msgstr "Vie lista CSV tiedostoon"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -11790,7 +11793,7 @@ msgstr "Tee funktio"
#: modules/visual_script/visual_script_editor.cpp
msgid "Refresh Graph"
-msgstr "Päivitä graafi"
+msgstr "Päivitä kaaviokuva"
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit Member"
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index 552da2cedf..bb371b7674 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -76,8 +76,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-23 20:21+0000\n"
-"Last-Translator: LaurentOngaro <laurent@gameamea.com>\n"
+"PO-Revision-Date: 2020-05-05 14:01+0000\n"
+"Last-Translator: Anonymous <noreply@weblate.org>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -85,7 +85,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -5467,12 +5467,12 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Reset"
-msgstr "Réinitialiser le facteur d'agrandissement"
+msgstr "Réinitialiser le zoom"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode"
-msgstr "Sélectionner le mode"
+msgstr "Mode sélection"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag: Rotate"
@@ -5505,7 +5505,7 @@ msgstr "Mode rotation"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Mode"
-msgstr "Mode de mise à l'échelle"
+msgstr "Mode mise à l'échelle"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5542,7 +5542,7 @@ msgstr "Activer/Désactiver l'aimantation à la grille."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Grid Snap"
-msgstr "Aimanter à la grille"
+msgstr "Utiliser l'aimantation à la grille"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snapping Options"
@@ -5672,7 +5672,7 @@ msgstr "Centrer sur la sélection"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Frame Selection"
-msgstr "Cadrer la sélection"
+msgstr "Encadrer la sélection"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
@@ -7394,7 +7394,7 @@ msgstr "Arrière"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
-msgstr "Aligner le Transform avec la vue"
+msgstr "Aligner Transform avec la vue"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Rotation with View"
@@ -7480,19 +7480,19 @@ msgstr "Vue libre droite"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Forward"
-msgstr "Vue libre de devant"
+msgstr "Vue libre avant"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Backwards"
-msgstr "Vue libre de derrière"
+msgstr "Vue libre arrière"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Up"
-msgstr "Vue libre de dessus"
+msgstr "Vue libre haut"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Down"
-msgstr "Vue libre de dessous"
+msgstr "Vue libre bas"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Speed Modifier"
@@ -7500,20 +7500,20 @@ msgstr "Modificateur de vitesse de la vue libre"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Slow Modifier"
-msgstr "Modificateur de vitesse de la vue libre"
+msgstr "Ralentissement de la vue libre"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
-msgstr "Verrouiller la rotation de la vue"
+msgstr "Rotation de la vue verrouillée"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
"Note: The FPS value displayed is the editor's framerate.\n"
"It cannot be used as a reliable indication of in-game performance."
msgstr ""
-"Note : La valeur FPS affichée est la fréquence d'images de l'éditeur.\n"
-"Il ne doit pas être utilisé comme un indicateur fiable de la performance en "
-"jeu."
+"Note : Les FPS (images par secondes) affichées sont celles de éditeur.\n"
+"Elles ne doivent pas être utilisées comme un indicateur fiable de la "
+"performance en jeu."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
@@ -7521,11 +7521,11 @@ msgstr "Dialogue XForm"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
-msgstr "Aligner les nœuds au sol"
+msgstr "Aligner les nœuds avec le sol"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Couldn't find a solid floor to snap the selection to."
-msgstr "N'a pas pu trouvé de sol solide pour y attacher la sélection."
+msgstr "Pas de sol solide trouvé pour y attacher la sélection."
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -7539,11 +7539,11 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Use Local Space"
-msgstr "Utiliser l'espace local"
+msgstr "Utiliser les coordonées locales"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Use Snap"
-msgstr "Aligner sur la grille"
+msgstr "Aligner avec la grille"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
@@ -7555,11 +7555,11 @@ msgstr "Vue de dessus"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View"
-msgstr "Vue arrière"
+msgstr "Vue de derrière"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View"
-msgstr "Vue avant"
+msgstr "Vue de devant"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View"
@@ -7579,7 +7579,7 @@ msgstr "Insérer une clef d'animation"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Origin"
-msgstr "Focaliser l'origine"
+msgstr "Focaliser sur l'origine"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Selection"
@@ -8174,7 +8174,7 @@ msgstr "Donnez une ressource TileSet à cette TileMap pour utiliser ses tuiles."
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint Tile"
-msgstr "Peindre la case"
+msgstr "Peindre la tuile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid ""
@@ -8186,7 +8186,7 @@ msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
-msgstr "Sélectionner une case"
+msgstr "Sélectionner une tuile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate Left"
diff --git a/editor/translations/he.po b/editor/translations/he.po
index 35421252b2..69d8bcc3b5 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -5,18 +5,19 @@
# Daniel <lorddaniel09@gmail.com>, 2018.
# Ben Golan <golanben4@gmail.com>, 2017.
# Luc Stepniewski <lior@gradstein.info>, 2017.
-# Yaron Shahrabani <sh.yaron@gmail.com>, 2018, 2019.
+# Yaron Shahrabani <sh.yaron@gmail.com>, 2018, 2019, 2020.
# RaikaRakka <shaiyatta@gmail.com>, 2018.
# Ido Dana <idodana01@gmail.com>, 2019.
# Daniel Dovgun <daniel.dovgun@gmail.com>, 2019.
# MordechaiHadad <Mordechai.hadad01@gmail.com>, 2019.
# Daniel <danielharush5252@gmail.com>, 2020.
+# test test <ugbdvwpeikvyzwaadt@awdrt.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-25 09:41+0000\n"
-"Last-Translator: Daniel <danielharush5252@gmail.com>\n"
+"PO-Revision-Date: 2020-05-05 14:01+0000\n"
+"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
"Language-Team: Hebrew <https://hosted.weblate.org/projects/godot-engine/"
"godot/he/>\n"
"Language: he\n"
@@ -25,7 +26,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && "
"n % 10 == 0) ? 2 : 3));\n"
-"X-Generator: Weblate 4.0-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -34,7 +35,7 @@ msgstr "משתנה סוג ×œ× ×—×•×§×™ לפונקציית convert()‎, יש ל
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "צופה מחרוזת ב×ורך 1 (תו)"
+msgstr "צפויה מחרוזת ב×ורך 1 (תו)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -722,13 +723,12 @@ msgid "Line Number:"
msgstr "מספר השורה:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "החלפה…"
+msgstr "%d הוחלף."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
-msgstr ""
+msgstr "d% הת×מות."
#: editor/code_editor.cpp editor/editor_help.cpp
#, fuzzy
@@ -4044,9 +4044,8 @@ msgid "Saving..."
msgstr "שמירה…"
#: editor/import_dock.cpp
-#, fuzzy
msgid "%d Files"
-msgstr " קבצי×"
+msgstr "%d קבצי×"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
@@ -6788,66 +6787,58 @@ msgid "Error writing TextFile:"
msgstr "שגי××” ×‘×™×™×‘×•× ×¢×¨×›×ª הנוש×"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Could not load file at:"
-msgstr "×œ× × ×™×ª×Ÿ ליצור תיקייה."
+msgstr "×œ× × ×™×ª×Ÿ לטעון קובץ מהמיקו×:"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error saving file!"
-msgstr "שגי××” בשמירה"
+msgstr "שגי××” בשמירת קובץ!"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error while saving theme."
-msgstr "שגי××” בשמירת ערכת העיצוב"
+msgstr "שגי××” בשמירת ערכת העיצוב."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Saving"
msgstr "שגי××” בשמירה"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error importing theme."
-msgstr "שגי××” ×‘×™×™×‘×•× ×¢×¨×›×ª הנוש×"
+msgstr "שגי××” ×‘×™×™×‘×•× ×¢×¨×›×ª העיצוב."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Importing"
msgstr "שגי××” בייבו×"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "New Text File..."
-msgstr "תיקייה חדשה…"
+msgstr "קובץ טקסט חדש…"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open File"
msgstr "פתיחת קובץ"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Save File As..."
-msgstr "שמירה בש×…"
+msgstr "שמירת קובץ בש×…"
#: editor/plugins/script_editor_plugin.cpp
msgid "Can't obtain the script for running."
-msgstr ""
+msgstr "×œ× × ×™×ª×Ÿ לקבל ×ת הסקריפט להרצה."
#: editor/plugins/script_editor_plugin.cpp
msgid "Script failed reloading, check console for errors."
-msgstr ""
+msgstr "רענון הסקריפט נכשל, × × ×œ×—×¤×© ×ת השגי×ות במסוף."
#: editor/plugins/script_editor_plugin.cpp
msgid "Script is not in tool mode, will not be able to run."
-msgstr ""
+msgstr "הסקריפט ×ינו במצב כלי×, ×œ× ×ª×”×™×” לו ×פשרות לרוץ."
#: editor/plugins/script_editor_plugin.cpp
msgid ""
"To run this script, it must inherit EditorScript and be set to tool mode."
msgstr ""
+"כדי להריץ ×ת הסקריפט ×”×–×”, עליו לרשת EditorScript ולהגדיר ×ותו למצב כלי×."
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme"
@@ -6880,9 +6871,8 @@ msgid "Find Previous"
msgstr "×יתור הקוד×"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Filter scripts"
-msgstr "מ×פייני פריט."
+msgstr "סינון סקריפטי×"
#: editor/plugins/script_editor_plugin.cpp
msgid "Toggle alphabetical sorting of the method list."
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index d066d5e317..620a2d4d5b 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -10,7 +10,6 @@
# Tusa Gamer <tusagamer@mailinator.com>, 2018.
# Máté Lugosi <mate.lugosi@gmail.com>, 2019.
# sztrovacsek <magadeve@gmail.com>, 2019.
-# Deleted User <noreply+18797@weblate.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 1c7c72ce12..8e9432baac 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -46,12 +46,14 @@
# Douglas Fiedler <dognew@gmail.com>, 2020.
# E440QF <ettore.beltra@gmail.com>, 2020.
# Giuseppe Lucido <giuseppe.lucido@gmail.com>, 2020.
+# Mirko Proto <mirko7@protonmail.com>, 2020.
+# J. Lavoie <j.lavoie@net-c.ca>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-27 08:25+0000\n"
-"Last-Translator: Micila Micillotto <micillotto@gmail.com>\n"
+"PO-Revision-Date: 2020-05-04 15:12+0000\n"
+"Last-Translator: J. Lavoie <j.lavoie@net-c.ca>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
"Language: it\n"
@@ -59,7 +61,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -3026,7 +3028,7 @@ msgstr "Esegui la scena in modifica."
#: editor/editor_node.cpp
msgid "Play Scene"
-msgstr "Esegui scena"
+msgstr "Avvia Scena"
#: editor/editor_node.cpp
msgid "Play custom scene"
@@ -3034,7 +3036,7 @@ msgstr "Esegui scena personalizzata"
#: editor/editor_node.cpp
msgid "Play Custom Scene"
-msgstr "Esegui scena personalizzata"
+msgstr "Avvia Scena Personalizzata"
#: editor/editor_node.cpp
msgid "Changing the video driver requires restarting the editor."
@@ -3071,7 +3073,7 @@ msgstr "Ispettore"
#: editor/editor_node.cpp
msgid "Expand Bottom Panel"
-msgstr "Espandi pannello inferiore"
+msgstr "Espandi Pannello Inferiore"
#: editor/editor_node.cpp
msgid "Output"
@@ -11111,9 +11113,8 @@ msgid "Total:"
msgstr "Totale:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Esporta profilo"
+msgstr "Esporta l'elenco in un file CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index aac20e9666..8aef04db94 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -35,8 +35,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-27 08:25+0000\n"
-"Last-Translator: Anonymous <noreply@weblate.org>\n"
+"PO-Revision-Date: 2020-05-04 15:12+0000\n"
+"Last-Translator: Wataru Onuki <bettawat@yahoo.co.jp>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/"
"godot/ja/>\n"
"Language: ja\n"
@@ -44,7 +44,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -592,7 +592,7 @@ msgstr "é¸æŠžç¯„å›²ã‚’è¤‡è£½"
#: editor/animation_track_editor.cpp
msgid "Duplicate Transposed"
-msgstr "複製を転置"
+msgstr "転置ã—ã¦è¤‡è£½"
#: editor/animation_track_editor.cpp
msgid "Delete Selection"
@@ -1862,7 +1862,7 @@ msgstr "éš ã—ファイルをオン / オフ"
#: editor/editor_file_dialog.cpp
msgid "Toggle Favorite"
-msgstr "ãŠæ°—ã«å…¥ã‚Šã®ã‚ªãƒ³ / オフ"
+msgstr "ãŠæ°—ã«å…¥ã‚Šã«ã™ã‚‹ / ã—ãªã„"
#: editor/editor_file_dialog.cpp
msgid "Toggle Mode"
@@ -1870,7 +1870,7 @@ msgstr "モード切替ãˆ"
#: editor/editor_file_dialog.cpp
msgid "Focus Path"
-msgstr "フォーカスパス"
+msgstr "パスã«ãƒ•ォーカス"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Up"
@@ -1898,7 +1898,7 @@ msgstr "ファイル更新。"
#: editor/editor_file_dialog.cpp
msgid "(Un)favorite current folder."
-msgstr "ç¾åœ¨ã®ãƒ•ã‚©ãƒ«ãƒ€ã‚’ãŠæ°—ã«å…¥ã‚Šã«ã™ã‚‹/ãŠæ°—ã«å…¥ã‚Šã‹ã‚‰å¤–ã™ã€‚"
+msgstr "ç¾åœ¨ã®ãƒ•ã‚©ãƒ«ãƒ€ã‚’ãŠæ°—ã«å…¥ã‚Šã«ã™ã‚‹ / ã—ãªã„。"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Toggle the visibility of hidden files."
@@ -1989,7 +1989,7 @@ msgstr "メソッド"
#: editor/editor_help.cpp
msgid "Theme Properties"
-msgstr "テーマプロパティ"
+msgstr "テーマ プロパティ"
#: editor/editor_help.cpp
msgid "Enumerations"
@@ -4051,6 +4051,7 @@ msgid "Copy Resource"
msgstr "リソースをコピー"
#: editor/inspector_dock.cpp
+#, fuzzy
msgid "Make Built-In"
msgstr "ビルトインを作æˆ"
@@ -5316,22 +5317,22 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock Selected"
-msgstr "é¸æŠžã‚’ãƒ­ãƒƒã‚¯"
+msgstr "é¸æŠžå¯¾è±¡ã‚’ãƒ­ãƒƒã‚¯"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unlock Selected"
-msgstr "é¸æŠžã‚’è§£é™¤"
+msgstr "é¸æŠžå¯¾è±¡ã‚’ãƒ­ãƒƒã‚¯è§£é™¤"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Group Selected"
-msgstr "é¸æŠžã—ãŸã‚°ãƒ«ãƒ¼ãƒ—"
+msgstr "é¸æŠžå¯¾è±¡ã‚’ã‚°ãƒ«ãƒ¼ãƒ—åŒ–"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Ungroup Selected"
-msgstr "グループ解除"
+msgstr "é¸æŠžå¯¾è±¡ã‚’ã‚°ãƒ«ãƒ¼ãƒ—è§£é™¤"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Paste Pose"
@@ -5390,7 +5391,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Alt+RMB: Depth list selection"
-msgstr "Alt+å³ã‚¯ãƒªãƒƒã‚¯: 奥行ã(被写界深度)リストã®é¸æŠž"
+msgstr "Alt+å³ã‚¯ãƒªãƒƒã‚¯: 奥行ãé¸æŠžãƒªã‚¹ãƒˆ"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5500,12 +5501,12 @@ msgstr "ガイドã«ã‚¹ãƒŠãƒƒãƒ—"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
-msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトをãã®å ´ã§ãƒ­ãƒƒã‚¯ (移動ä¸å¯èƒ½ã«ã™ã‚‹)。"
+msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトをç¾åœ¨ä½ç½®ã§ãƒ­ãƒƒã‚¯ (移動ä¸å¯èƒ½ã«ã™ã‚‹)。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unlock the selected object (can be moved)."
-msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトをアンロック (移動å¯èƒ½ã«ã™ã‚‹)。"
+msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトをロック解除 (移動å¯èƒ½ã«ã™ã‚‹)。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5568,11 +5569,11 @@ msgstr "グループアイコンã¨ãƒ­ãƒƒã‚¯ã‚¢ã‚¤ã‚³ãƒ³ã‚’表示"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
-msgstr "ã‚»ãƒ³ã‚¿ãƒ¼é¸æŠž"
+msgstr "é¸æŠžå¯¾è±¡ã‚’ä¸­å¤®ã«"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Frame Selection"
-msgstr "ãƒ•ãƒ¬ãƒ¼ãƒ é¸æŠž"
+msgstr "é¸æŠžå¯¾è±¡ã‚’å…¨é¢ã«"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
@@ -6842,7 +6843,7 @@ msgstr "ブレーク"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
#: editor/script_editor_debugger.cpp
msgid "Continue"
-msgstr "実行を継続"
+msgstr "続行"
#: editor/plugins/script_editor_plugin.cpp
msgid "Keep Debugger Open"
@@ -7034,7 +7035,7 @@ msgstr "シンボルを補完"
#: editor/plugins/script_text_editor.cpp
msgid "Evaluate Selection"
-msgstr "é¸æŠžã—ãŸã‚‚ã®ã‚’評価ã™ã‚‹"
+msgstr "é¸æŠžç¯„å›²ã‚’è©•ä¾¡ã™ã‚‹"
#: editor/plugins/script_text_editor.cpp
msgid "Trim Trailing Whitespace"
@@ -7058,7 +7059,7 @@ msgstr "複数ファイル内を検索..."
#: editor/plugins/script_text_editor.cpp
msgid "Contextual Help"
-msgstr "コンテキストヘルプ"
+msgstr "コンテキスト ヘルプ"
#: editor/plugins/script_text_editor.cpp
msgid "Toggle Bookmark"
@@ -7363,11 +7364,11 @@ msgstr "フリールックå³"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Forward"
-msgstr "剿–¹ã‚’フリールックã§è¦‹ã‚‹"
+msgstr "フリールックå‰é€²"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Backwards"
-msgstr "フリールック後方"
+msgstr "フリールック後進"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Up"
@@ -7379,11 +7380,11 @@ msgstr "フリールック下"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Speed Modifier"
-msgstr "フリールックã®é€Ÿåº¦ã‚’調整"
+msgstr "フリールックã®é€Ÿåº¦èª¿æ•´"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Slow Modifier"
-msgstr "ãƒ•ãƒªãƒ¼ãƒ«ãƒƒã‚¯ã®æ¸›é€Ÿã‚’調整"
+msgstr "ãƒ•ãƒªãƒ¼ãƒ«ãƒƒã‚¯ã®æ¸›é€Ÿèª¿æ•´"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -7399,7 +7400,7 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
-msgstr "Xformダイアログ"
+msgstr "XFormダイアログ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
@@ -7407,7 +7408,7 @@ msgstr "ノードをフロアã«ã‚¹ãƒŠãƒƒãƒ—"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Couldn't find a solid floor to snap the selection to."
-msgstr "é¸æŠžã‚’ã‚¹ãƒŠãƒƒãƒ—ã™ã‚‹å‰›ä½“ã®åºŠã‚’見ã¤ã‘れã¾ã›ã‚“。"
+msgstr "é¸æŠžå¯¾è±¡ã‚’ã‚¹ãƒŠãƒƒãƒ—ã•ã›ã‚‹å‰›ä½“ã®åºŠã‚’見ã¤ã‘られã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -7415,9 +7416,9 @@ msgid ""
"Alt+Drag: Move\n"
"Alt+RMB: Depth list selection"
msgstr ""
-"ドラッグ:回転\n"
-"Alt+ドラッグ:移動\n"
-"Alt+å³ã‚¯ãƒªãƒƒã‚¯: 奥行ãリストã®é¸æŠž"
+"ドラッグ: 回転\n"
+"Alt+ドラッグ: 移動\n"
+"Alt+å³ã‚¯ãƒªãƒƒã‚¯: 奥行ãé¸æŠžãƒªã‚¹ãƒˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Use Local Space"
@@ -7453,7 +7454,7 @@ msgstr "å³å´é¢å›³"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Switch Perspective/Orthogonal View"
-msgstr "é€è¦–図/正投影図ã®åˆ‡ã‚Šæ›¿ãˆ"
+msgstr "é€è¦–投影 / 平行投影ã®åˆ‡ã‚Šæ›¿ãˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Insert Animation Key"
@@ -7465,7 +7466,7 @@ msgstr "原点ã«ãƒ•ォーカス"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Selection"
-msgstr "é¸æŠžã«ãƒ•ォーカス"
+msgstr "é¸æŠžå¯¾è±¡ã«ãƒ•ォーカス"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Toggle Freelook"
@@ -7494,7 +7495,7 @@ msgstr "2 ビューãƒãƒ¼ãƒˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports (Alt)"
-msgstr "2 ビューãƒãƒ¼ãƒˆ(Alt)"
+msgstr "2 ビューãƒãƒ¼ãƒˆ (Alt)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports"
@@ -7502,7 +7503,7 @@ msgstr "3 ビューãƒãƒ¼ãƒˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports (Alt)"
-msgstr "3 ビューãƒãƒ¼ãƒˆ(Alt)"
+msgstr "3 ビューãƒãƒ¼ãƒˆ (Alt)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "4 Viewports"
@@ -7799,7 +7800,7 @@ msgstr "スプライトフレーム"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Set Region Rect"
-msgstr "矩形ã®é ˜åŸŸã‚’設定"
+msgstr "領域 Rect を設定"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Set Margin"
@@ -7989,7 +7990,7 @@ msgstr "フォント"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Color"
-msgstr "\\ Color"
+msgstr "Color"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme File"
@@ -7997,7 +7998,7 @@ msgstr "テーマ ファイル"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
-msgstr "é¸æŠžå¯¾è±¡ã‚’æ¶ˆåŽ»"
+msgstr "é¸æŠžç¯„å›²ã‚’æ¶ˆåŽ»"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Fix Invalid Tiles"
@@ -8006,7 +8007,7 @@ msgstr "無効ãªã‚¿ã‚¤ãƒ«ã‚’修正"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cut Selection"
-msgstr "é¸æŠžå¯¾è±¡ã‚’åˆ‡ã‚Šå–り"
+msgstr "é¸æŠžç¯„å›²ã‚’åˆ‡ã‚Šå–り"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
@@ -8018,7 +8019,7 @@ msgstr "ç›´ç·šã‚’æç”»"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rectangle Paint"
-msgstr "矩形ペイント"
+msgstr "長方形ペイント"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Bucket Fill"
@@ -8030,7 +8031,7 @@ msgstr "タイルマップを消去"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Find Tile"
-msgstr "タイルを検索ã™ã‚‹"
+msgstr "タイルを検索"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Transpose"
@@ -8056,19 +8057,19 @@ msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint Tile"
-msgstr "タイルを塗る"
+msgstr "タイルをペイント"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid ""
"Shift+LMB: Line Draw\n"
"Shift+Ctrl+LMB: Rectangle Paint"
msgstr ""
-"Shift+左マウスボタン:ç·šã®æç”»\n"
-"Shift+Ctrl+左マウスボタン:矩形ペイント"
+"Shift+左マウスボタン: ç›´ç·šã«æã\n"
+"Shift+Ctrl+左マウスボタン: 長方形ペイント"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
-msgstr "ã‚¿ã‚¤ãƒ«ã‚’é¸æŠž"
+msgstr "タイルをピック"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate Left"
@@ -8208,7 +8209,7 @@ msgstr "ビットマスクを消去。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new rectangle."
-msgstr "æ–°è¦çŸ©å½¢ã‚’作æˆã€‚"
+msgstr "æ–°ã—ã長方形を作æˆã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
@@ -8265,12 +8266,12 @@ msgid ""
"Drag handles to edit Rect.\n"
"Click on another Tile to edit it."
msgstr ""
-"ãƒãƒ³ãƒ‰ãƒ«ã‚’ドラッグã—ã¦çŸ©å½¢ã‚’編集ã—ã¾ã™ã€‚\n"
-"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚"
+"ãƒãƒ³ãƒ‰ãƒ«ã‚’ドラッグã—ã¦é•·æ–¹å½¢ã‚’編集ã—ã¾ã™ã€‚\n"
+"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã™ã‚‹ã¨ãれを編集ã—ã¾ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Delete selected Rect."
-msgstr "é¸æŠžã—ãŸçŸ©å½¢ã‚’削除ã™ã‚‹ã€‚"
+msgstr "é¸æŠžã—ãŸé•·æ–¹å½¢ã‚’削除ã™ã‚‹ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -8476,7 +8477,7 @@ msgstr "タイプã®å¤‰æ›´"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Stage Selected"
-msgstr "é¸æŠžç‰©ã‚’ã‚¹ãƒ†ãƒ¼ã‚¸ã™ã‚‹"
+msgstr "é¸æŠžå¯¾è±¡ã‚’ã‚¹ãƒ†ãƒ¼ã‚¸ã™ã‚‹"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Stage All"
@@ -9285,6 +9286,7 @@ msgstr ""
"ãŸã‚ã«ãれを使用ã—ãªã„ã§ãã ã•ã„。"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns falloff based on the dot product of surface normal and view "
"direction of camera (pass associated inputs to it)."
@@ -9911,6 +9913,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"検索ボックスã§ã¯ã€ãƒ—ロジェクトã¯åå‰ãŠã‚ˆã³ãƒ‘ã‚¹ã®æœ€å¾Œã®éƒ¨åˆ†ã§ãƒ•ィルターã•れã¾"
+"ã™ã€‚\n"
+"プロジェクトåãŠã‚ˆã³å®Œå…¨ãƒ‘スã§ãƒ•ィルターã™ã‚‹ã«ã¯ã€ã‚¯ã‚¨ãƒªã«ã¯ `/` 文字ãŒå°‘ãªã"
+"ã¨ã‚‚1ã¤å¿…è¦ã§ã™ã€‚"
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -11026,9 +11032,8 @@ msgid "Total:"
msgstr "åˆè¨ˆ:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "プロファイルã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
+msgstr "CSVファイルã«ãƒªã‚¹ãƒˆã‚’エクスãƒãƒ¼ãƒˆ"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -11779,7 +11784,7 @@ msgstr "グラフを編集ã™ã‚‹é–¢æ•°ã‚’é¸æŠžã¾ãŸã¯ä½œæˆã—ã¾ã™ã€‚"
#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
-msgstr "é¸æŠžæ¸ˆã¿ã‚’削除"
+msgstr "é¸æŠžå¯¾è±¡ã‚’å‰Šé™¤"
#: modules/visual_script/visual_script_editor.cpp
msgid "Find Node Type"
@@ -11795,11 +11800,11 @@ msgstr "ノードを切りå–ã‚‹"
#: modules/visual_script/visual_script_editor.cpp
msgid "Make Function"
-msgstr "関数ã®ä½œæˆ"
+msgstr "関数を作æˆ"
#: modules/visual_script/visual_script_editor.cpp
msgid "Refresh Graph"
-msgstr "ã‚°ãƒ©ãƒ•ã®æ›´æ–°"
+msgstr "グラフを更新"
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit Member"
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index b2dbd4e353..f25550709a 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-20 05:51+0000\n"
-"Last-Translator: Myeongjin Lee <aranet100@gmail.com>\n"
+"PO-Revision-Date: 2020-05-01 11:42+0000\n"
+"Last-Translator: Ch. <ccwpc@hanmail.net>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/"
"godot/ko/>\n"
"Language: ko\n"
@@ -30,7 +30,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -5929,7 +5929,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Collision Sibling"
-msgstr "개별 Convex ì¶©ëŒ í˜•ì œ 만들기"
+msgstr "ë‹¨ì¼ Convex ì¶©ëŒ í˜•ì œ 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -9838,6 +9838,9 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"ì´ ê²€ìƒ‰ì°½ì€ í”„ë¡œì íŠ¸ë¥¼ ì´ë¦„ê³¼ ê²½ë¡œì˜ ë§ˆì§€ë§‰ 부분으로 거릅니다.\n"
+"프로ì íŠ¸ë¥¼ ì „ì²´ 경로를 기준으로 걸러내려면 ê²€ìƒ‰ì–´ì— `/` ê°€ 한 ê¸€ìž ì´ìƒ í¬í•¨"
+"시키세요."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10949,9 +10952,8 @@ msgid "Total:"
msgstr "ì „ì²´:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "프로필 내보내기"
+msgstr "목ë¡ì„ CSV 파ì¼ë¡œ 내보내기"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -12584,7 +12586,7 @@ msgstr ""
#: scene/main/viewport.cpp
msgid "Viewport size must be greater than 0 to render anything."
-msgstr "ë·°í¬íЏ í¬ê¸°ëŠ” 무엇ì´ë“  ë Œë”ë§í•˜ê¸° 위해 0보다 커야 합니다."
+msgstr "무엇ì´ë“  ë Œë”ë§í•˜ë ¤ë©´ ë·°í¬íЏ í¬ê¸°ê°€ 0보다 커야 합니다."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/mr.po b/editor/translations/mr.po
index 5b2a55ffbe..902c243d16 100644
--- a/editor/translations/mr.po
+++ b/editor/translations/mr.po
@@ -3,41 +3,42 @@
# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
# Prachi Joshi <josprachi@yahoo.com>, 2019, 2020.
+# Shirious <sad3119823@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2020-01-30 03:56+0000\n"
-"Last-Translator: Prachi Joshi <josprachi@yahoo.com>\n"
+"PO-Revision-Date: 2020-05-05 14:01+0000\n"
+"Last-Translator: Shirious <sad3119823@gmail.com>\n"
"Language-Team: Marathi <https://hosted.weblate.org/projects/godot-engine/"
"godot/mr/>\n"
"Language: mr\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr ""
+msgstr "convert() साठी अवैध आरगà¥à¤¯à¥à¤®à¥‡à¤¨à¥à¤Ÿ, TYPE_* कोनà¥à¤¸à¤Ÿà¤¨à¥à¤Ÿ वापरा."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "1 लांबीची सà¥à¤Ÿà¥à¤°à¤¿à¤‚ग अपेकà¥à¤·à¤¿à¤¤ (à¤à¤• कैरेकà¥à¤Ÿà¤°)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr ""
+msgstr "डिकोड करणà¥à¤¯à¤¾à¤¸à¤¾à¤ à¥€ पà¥à¤°à¤¸à¥‡ बाईटसॠनाहित, किंवा अवैध फ़ोरमैट."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr ""
+msgstr "à¤à¤•à¥à¤¸à¤ªà¥à¤°à¥‡à¤¶à¤¨ मधे अवैध इनपà¥à¤Ÿ %i (पास नाही à¤à¤¾à¤²à¥‡)"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr ""
+msgstr "self वापरले जाऊ शकत नाही कारण इनà¥à¤¸à¤Ÿà¤¨à¥à¤¸ null आहे (पास नाही à¤à¤¾à¤²à¥‡)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -1928,9 +1929,8 @@ msgid "Property Descriptions"
msgstr ""
#: editor/editor_help.cpp
-#, fuzzy
msgid "(value)"
-msgstr "मूलà¥à¤¯:"
+msgstr "(किंमत)"
#: editor/editor_help.cpp
msgid ""
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index ba11dc0dad..93219f8bfc 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -44,7 +44,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-23 20:21+0000\n"
+"PO-Revision-Date: 2020-05-04 15:12+0000\n"
"Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/"
"nl/>\n"
@@ -53,7 +53,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2023,8 +2023,8 @@ msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
-"Er is momenteel geen beschrijving voor deze eigenschap. Help ons alsjeblieft "
-"door [color=$color][url=$url]een toe te voegen[/url][/color]!"
+"Er is momenteel geen beschrijving voor deze eigenschap. Help ons alstublieft "
+"door [color=$color][url=$url]een bijdrage te leveren[/url][/color]!"
#: editor/editor_help.cpp
msgid "Method Descriptions"
@@ -2035,8 +2035,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
-"Er is momenteel geen beschrijving voor deze methode. Help ons alsjeblieft "
-"door [color=$color][url=$url]een toe te voegen[/url][/color]!"
+"Er is momenteel geen beschrijving voor deze methode. Help ons alstublieft "
+"door [color=$color][url=$url]een bijdrage te leveren[/url][/color]!"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -2500,8 +2500,8 @@ msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
-"Deze optie is verouderd. Situaties waar een hernieuwing geforceerd moet "
-"worden zijn softwarefouten. Rapporteer dit alsjeblieft."
+"Deze optie is verouderd. Situaties waarbij gedwongen herladen moet worden, "
+"worden gezien als softwarefouten. Rapporteer dit alstublieft."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
@@ -2730,7 +2730,7 @@ msgstr "Alle scènes opslaan"
#: editor/editor_node.cpp
msgid "Convert To..."
-msgstr "Converteer Naar..."
+msgstr "Omzetten naar..."
#: editor/editor_node.cpp
msgid "MeshLibrary..."
@@ -5898,7 +5898,7 @@ msgstr "Creëer een statisch tri-mesh lichaam"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "This doesn't work on scene root!"
-msgstr "Dit werkt niet op scènewortel!"
+msgstr "Dit werkt niet op de scènewortel!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Shape"
@@ -6986,7 +6986,7 @@ msgstr "Kies Kleur"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Convert Case"
-msgstr "Converteer Hoofdlettergebruik"
+msgstr "Letters omzetten"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Uppercase"
@@ -6998,7 +6998,7 @@ msgstr "Kleine letters"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Capitalize"
-msgstr "Maak Hoofdletters"
+msgstr "Elk Woord Met Hoofdletter"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Syntax Highlighter"
@@ -7074,15 +7074,15 @@ msgstr "Trim Navolgende Spaties"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent to Spaces"
-msgstr "Converteer Indentatie Naar Spaties"
+msgstr "Insprong in spaties omzetten"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent to Tabs"
-msgstr "Converteer Indentatie Naar Tabs"
+msgstr "Insprong in Tabs omzetten"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
-msgstr "Auto Indentatie"
+msgstr "Automatisch inspringen"
#: editor/plugins/script_text_editor.cpp
msgid "Find in Files..."
@@ -7678,7 +7678,7 @@ msgstr "Ongeldige geometrie, kan geen polygon creëren."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Polygon2D"
-msgstr "Converteer naar Polygon2D"
+msgstr "Naar Polygon2D omzetten"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create collision polygon."
@@ -9816,8 +9816,8 @@ msgstr ""
"\n"
"%s\n"
"\n"
-"Als je doorgaat met het openen van dit bestand, zal het worden geconverteerd "
-"naar Godot's huidige format voor project-configuratiebestanden.\n"
+"Als je doorgaat met het openen van dit bestand, zal het worden omgezet naar "
+"Godot's huidige formaat voor project-configuratiebestanden.\n"
"Waarschuwing: Hierna kan het project niet meer worden geopend door oudere "
"versies van Godot Engine."
@@ -9966,6 +9966,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"De zoekbalk filtert projecten op naam en naam van de map waarin het project "
+"staat.\n"
+"Om ook op het volledige pad te filteren, moet de zoekopdracht tenminste één "
+"`/` karakter bevatten."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10706,7 +10710,7 @@ msgstr "Knoop hieronder toevoegen"
#: editor/scene_tree_dock.cpp
msgid "Expand/Collapse All"
-msgstr "Alles uit-/inklappen"
+msgstr "Alles in-/uitklappen"
#: editor/scene_tree_dock.cpp
msgid "Change Type"
@@ -10718,7 +10722,7 @@ msgstr "Onder nieuwe knoop hangen"
#: editor/scene_tree_dock.cpp
msgid "Make Scene Root"
-msgstr "Scènewortel instellen"
+msgstr "Als scènewortel instellen"
#: editor/scene_tree_dock.cpp
msgid "Merge From Scene"
@@ -11085,9 +11089,8 @@ msgid "Total:"
msgstr "Totaal:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Profiel exporteren"
+msgstr "Exporteer lijst naar een csv-bestand"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -12208,9 +12211,7 @@ msgstr ""
msgid ""
"A shape must be provided for CollisionShape2D to function. Please create a "
"shape resource for it!"
-msgstr ""
-"Een vorm moet voorzien worden om CollisionShape2D te laten functioneren. "
-"Creëer hiervoor alsjeblieft een vorm resource!"
+msgstr "Een CollisionShape2D heeft een vorm nodig in de Shape-eigenschap!"
#: scene/2d/cpu_particles_2d.cpp
msgid ""
@@ -12238,7 +12239,7 @@ msgstr ""
#: scene/2d/light_occluder_2d.cpp
msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
msgstr ""
-"De occluder polygoon van deze occluder is leeg. Teken alsjeblieft een "
+"De occluder-polygoon van deze occluder is leeg. Teken alstublieft een "
"polygoon."
#: scene/2d/navigation_polygon.cpp
@@ -12703,7 +12704,7 @@ msgstr "Alarm!"
#: scene/gui/dialogs.cpp
msgid "Please Confirm..."
-msgstr "Bevestig alsjeblieft..."
+msgstr "Bevestig alstublieft..."
#: scene/gui/popup.cpp
msgid ""
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index eb84ea26ca..a7b57f31ba 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -42,7 +42,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-27 08:25+0000\n"
+"PO-Revision-Date: 2020-05-01 11:42+0000\n"
"Last-Translator: Tomek <kobewi4e@gmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
@@ -52,7 +52,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -9933,6 +9933,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"Pasek wyszukiwania filtruje projekty po nazwie i ostatnim komponencie "
+"ścieżki.\n"
+"By filtrować po nazwie i pełnej ścieżce, zapytanie musi zawierać "
+"przynajmniej jeden znak \"/\"."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -11049,9 +11053,8 @@ msgid "Total:"
msgstr "Całkowity:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Eksportuj profil"
+msgstr "Eksportuj listÄ™ do pliku CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index b7102a7cdf..d38c4186c7 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -86,12 +86,14 @@
# Richard Urban <redasuio1@gmail.com>, 2020.
# Wellyngton R Weller <well.weller@hotmail.com>, 2020.
# Lucas Araujo <lucassants2808@gmail.com>, 2020.
+# Sr Half <flavio05@outlook.com>, 2020.
+# Matheus Pesegoginski <pese.ek.tk@outlook.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2020-04-27 08:25+0000\n"
-"Last-Translator: johnnybigoode <jamarson@gmail.com>\n"
+"PO-Revision-Date: 2020-05-04 15:12+0000\n"
+"Last-Translator: Anonymous <noreply@weblate.org>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -99,7 +101,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -736,7 +738,7 @@ msgstr "Selecionar Todos/Nenhum"
#: editor/animation_track_editor_plugins.cpp
msgid "Add Audio Track Clip"
-msgstr "Adicionar Trilha de Clipes de Ãudio"
+msgstr "Adicionar Clipe de Trilha de Ãudio"
#: editor/animation_track_editor_plugins.cpp
msgid "Change Audio Track Clip Start Offset"
@@ -3128,7 +3130,7 @@ msgstr ""
"Você pode então aplicar modificações e construir seu próprio APK na guia "
"Exportação (Adicionando módulos, trocando o AndroidManifest.xml, etc.).\n"
"Note que para fazer uma construção customizada, em vez de usar APKs pre-"
-"construídos, a opção \"Usar construção customizada\" deve estar ativa nas "
+"construídos, a opção \"Usar Construção Customizada\" deve estar ativa nas "
"predefinições de exportação Android."
#: editor/editor_node.cpp
@@ -5655,7 +5657,7 @@ msgstr "Visualizar Canvas Scale"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Translation mask for inserting keys."
-msgstr "Mascara de tradução para inserção de chaves"
+msgstr "Máscara de tradução para inserção de chaves"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation mask for inserting keys."
@@ -6044,7 +6046,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Collision Sibling"
-msgstr "Criar Simples Colisão Convexa Irmã(s)"
+msgstr "Criar um irmão de Colisão Convexa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -7369,7 +7371,7 @@ msgstr "Essa operação requer um único nó selecionado."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Auto Orthogonal Enabled"
-msgstr "Ortogonal automático habilitado"
+msgstr "Auto-Ortogonal Habilitado"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
@@ -7689,7 +7691,7 @@ msgstr "Visualizar Polígono De Colisão 2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create LightOccluder2D"
-msgstr "Criar LightOccluder2D"
+msgstr "Criar Polígono de Oclusão (LightOccluder2D)"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "LightOccluder2D Preview"
@@ -7730,7 +7732,7 @@ msgstr "Criar PolígonoDeColisão2D Irmão"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create light occluder."
-msgstr "Geometria inválida, não é possível criar oclusor de luz."
+msgstr "Geometria inválida, não é possível criar o oclusor de luz."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create LightOccluder2D Sibling"
@@ -8145,11 +8147,11 @@ msgstr "Pegar Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate Left"
-msgstr "Girar à esquerda"
+msgstr "Girar à Esquerda"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate Right"
-msgstr "Girar à direita"
+msgstr "Girar à Direita"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Flip Horizontally"
@@ -9991,6 +9993,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"A caixa de busca filtra projetos por nome e pelo último componente do "
+"caminho.\n"
+"Para filtrar projetos por nome e pelo caminho completo, a consulta deve "
+"conter pelo menos um caractere `/`."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -11107,9 +11113,8 @@ msgid "Total:"
msgstr "Total:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Exportar Perfil"
+msgstr "Exportar lista para arquivo CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po
index f7c6f042d2..6314d31908 100644
--- a/editor/translations/pt_PT.po
+++ b/editor/translations/pt_PT.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-20 05:51+0000\n"
+"PO-Revision-Date: 2020-05-01 11:42+0000\n"
"Last-Translator: João Lopes <linux-man@hotmail.com>\n"
"Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_PT/>\n"
@@ -29,7 +29,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -1473,7 +1473,7 @@ msgstr "O Ficheiro não existe."
#: editor/editor_autoload_settings.cpp
msgid "Not in resource path."
-msgstr "Não está no Caminho do recurso."
+msgstr "Não está no caminho do recurso."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2498,27 +2498,27 @@ msgstr "Incapaz de localizar campo Script para plugin em: 'res://addons/%s'."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s'."
-msgstr "Incapaz de carregar Script addon do Caminho: '%s'."
+msgstr "Incapaz de carregar script addon do caminho: '%s'."
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' There seems to be an error in "
"the code, please check the syntax."
msgstr ""
-"Incapaz de carregar Script addon do caminho: '%s' Parece haver um erro no "
+"Incapaz de carregar script addon do caminho: '%s' Parece haver um erro no "
"código, reveja a sintaxe."
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
-"Incapaz de carregar Script addon do Caminho: '%s' Tipo base não é "
+"Incapaz de carregar script addon do Caminho: '%s' Tipo base não é "
"EditorPlugin."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
-"Incapaz de carregar Script addon do Caminho: '%s' Script não está no modo "
+"Incapaz de carregar script addon do Caminho: '%s' Script não está no modo "
"ferramenta."
#: editor/editor_node.cpp
@@ -3443,7 +3443,7 @@ msgstr "Não foi encontrado version.txt dentro dos Modelos."
#: editor/export_template_manager.cpp
msgid "Error creating path for templates:"
-msgstr "Erro ao criar o Caminho para os Modelos:"
+msgstr "Erro ao criar o caminho para os modelos:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -6069,7 +6069,7 @@ msgstr "Fonte da Malha não especificada (e MultiMesh não contêm Malha)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (invalid path)."
-msgstr "A fonte da Malha é inválida (Caminho inválido)."
+msgstr "A fonte da malha é inválida (caminho inválido)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (not a MeshInstance)."
@@ -6085,7 +6085,7 @@ msgstr "Fonte de superfície não especificada."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (invalid path)."
-msgstr "A fonte de superfície é inválida (Caminho inválido)."
+msgstr "A fonte de superfície é inválida (caminho inválido)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (no geometry)."
@@ -9615,7 +9615,7 @@ msgstr "Seria uma boa ideia dar um nome ao Projeto."
#: editor/project_manager.cpp
msgid "Invalid project path (changed anything?)."
-msgstr "Caminho de Projeto inválido (alguma alteração?)."
+msgstr "Caminho de projeto inválido (alguma alteração?)."
#: editor/project_manager.cpp
msgid ""
@@ -9902,6 +9902,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"A caixa de pesquisa filtra projetos por nome e último componente do "
+"caminho.\n"
+"Para filtrar projetos por nome e caminho completo, a pesquisa tem de conter "
+"pelo menos um caráter `/`."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10101,7 +10105,7 @@ msgstr "Remover tradução"
#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
-msgstr "Adicionar correção remapeada"
+msgstr "Adicionar Caminho Remapeado"
#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
@@ -10862,11 +10866,11 @@ msgstr "Nome de classe inválido."
#: editor/script_create_dialog.cpp
msgid "Invalid inherited parent name or path."
-msgstr "Nome ou Caminho de parente herdado inválido."
+msgstr "Nome ou caminho de parente herdado inválido."
#: editor/script_create_dialog.cpp
msgid "Script path/name is valid."
-msgstr "Caminho/nome de Script é válido."
+msgstr "Caminho/nome de script é válido."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11017,13 +11021,12 @@ msgid "Total:"
msgstr "Total:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Exportar Perfil"
+msgstr "Exportar lista para ficheiro CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
-msgstr "Caminho do recurso"
+msgstr "Caminho do Recurso"
#: editor/script_editor_debugger.cpp
msgid "Type"
@@ -11241,7 +11244,7 @@ msgstr ""
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (invalid script at @path)"
-msgstr "Formato de dicionário de instância inválido (Script inválido em @path)"
+msgstr "Formato de dicionário de instância inválido (script inválido em @path)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary (invalid subclasses)"
@@ -12240,7 +12243,7 @@ msgstr ""
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
msgstr ""
-"Para funcionar, a Propriedade Caminho tem de apontar para um nó Node2D "
+"Para funcionar, a propriedade caminho tem de apontar para um nó Node2D "
"válido."
#: scene/2d/skeleton_2d.cpp
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index 2344b31e59..d8c55d825e 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -70,12 +70,13 @@
# Ivan Kuzmenko <kuzmenko.ivan2002@yandex.com>, 2020.
# Super Pracion <superpracion2@gmail.com>, 2020.
# PizzArt <7o7goo7o7@gmail.com>, 2020.
+# TheGracekale <mrsmailbot.lg@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-23 20:21+0000\n"
-"Last-Translator: PizzArt <7o7goo7o7@gmail.com>\n"
+"PO-Revision-Date: 2020-05-05 14:01+0000\n"
+"Last-Translator: Super Pracion <superpracion2@gmail.com>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
"Language: ru\n"
@@ -84,7 +85,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -9966,6 +9967,9 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"Поле поиÑка фильтрует проекты по имени и поÑледнему компоненту пути\n"
+"Чтобы отфильтровать проекты по имени и полному пути, Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ Ñодержать "
+"Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ один Ñимвол `/`."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10935,9 +10939,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Ðеверное Ð¸Ð¼Ñ Ð¸Ð»Ð¸ путь наÑледуемого предка."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Путь/Ð¸Ð¼Ñ Ñкрипта дейÑтвителен."
+msgstr "Путь/Ð¸Ð¼Ñ Ñкрипта допуÑтимы."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11089,9 +11092,8 @@ msgid "Total:"
msgstr "Ð’Ñего:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "ЭкÑпортировать профиль"
+msgstr "ЭкÑпортировать профиль в CSV файл"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -12524,7 +12526,6 @@ msgid "PathFollow only works when set as a child of a Path node."
msgstr "PathFollow работает только при еÑли она дочь узла Path."
#: scene/3d/path.cpp
-#, fuzzy
msgid ""
"PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its "
"parent Path's Curve resource."
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index d5730a7db9..295b7ac429 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-23 20:21+0000\n"
+"PO-Revision-Date: 2020-05-01 11:42+0000\n"
"Last-Translator: Richard Urban <redasuio1@gmail.com>\n"
"Language-Team: Slovak <https://hosted.weblate.org/projects/godot-engine/"
"godot/sk/>\n"
@@ -22,7 +22,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -3034,6 +3034,13 @@ msgid ""
"the \"Use Custom Build\" option should be enabled in the Android export "
"preset."
msgstr ""
+"Toto pripraví vás projekt pre vlastný Android builds keÄ inÅ¡talujete source "
+"template do \"res://android/build\".\n"
+"Teraz môžete pridať modifikácie a tak vytvoriť vlastné APK na export "
+"(pridávanie modulov, zmeniÅ¥ AndroidManifest.xml, atÄ.).\n"
+"Poznámka že v záujme vytvorenia vlastných zostavení namiesto použitia vopred "
+"vytvorených súborov APK by mala byť v predvoľbe exportu systému Android "
+"povolená možnosť \"Use Costom Build\"."
#: editor/editor_node.cpp
msgid ""
@@ -3042,27 +3049,30 @@ msgid ""
"Remove the \"res://android/build\" directory manually before attempting this "
"operation again."
msgstr ""
+"V tomto projekte už je nainštalovaný Android build template a nemôže byť "
+"prepísaný.\n"
+"Manuálne odstránte \"res://android/build\" predtým ako sa znova pokúsite o "
+"túto operáciu."
#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
-msgstr ""
+msgstr "Importovať Šablóny Zo ZIP File-u"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Template Package"
-msgstr "Všetky vybrané"
+msgstr "BalíÄek Å ablón"
#: editor/editor_node.cpp
msgid "Export Library"
-msgstr ""
+msgstr "Exportovať Library"
#: editor/editor_node.cpp
msgid "Merge With Existing"
-msgstr ""
+msgstr "Spojiť Z Existujúcim"
#: editor/editor_node.cpp
msgid "Open & Run a Script"
-msgstr ""
+msgstr "Otvoriť & Spustiť Script"
#: editor/editor_node.cpp
#, fuzzy
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index 46e671a8a8..e713e79a4c 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -17,7 +17,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ukrainian (Godot Engine)\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-20 05:51+0000\n"
+"PO-Revision-Date: 2020-05-01 11:43+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
@@ -27,7 +27,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -9937,6 +9937,9 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"Поле пошуку фільтрує проєкти за назвою Ñ– оÑтаннім компонентом шлÑху.\n"
+"Щоб виконати Ñ„Ñ–Ð»ÑŒÑ‚Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ñ”ÐºÑ‚Ñ–Ð² за назвою Ñ– повним шлÑхом, у запиті має "
+"бути принаймні один Ñимвол `/`."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -11055,9 +11058,8 @@ msgid "Total:"
msgstr "Загалом:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "ЕкÑпорт профілю"
+msgstr "ЕкÑпортувати ÑпиÑок до файла CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index 953ec63714..538e017a5d 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -64,8 +64,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2020-04-24 15:30+0000\n"
-"Last-Translator: Revan Ji <jiruifancr@gmail.com>\n"
+"PO-Revision-Date: 2020-05-01 11:42+0000\n"
+"Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -73,7 +73,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -5901,7 +5901,6 @@ msgstr ""
"这是最准确(但是最慢)的碰撞检测手段。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Collision Sibling"
msgstr "创建å•一凸碰撞åŒçº§"
@@ -7211,9 +7210,8 @@ msgid "This operation requires a single selected node."
msgstr "æ­¤æ“作åªèƒ½åº”用于å•个选中节点。"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Auto Orthogonal Enabled"
-msgstr "正交"
+msgstr "å¯ç”¨è‡ªåŠ¨æ­£äº¤"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
@@ -9774,6 +9772,8 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"æœç´¢æ¡†æ ¹æ®å称和路径的末尾部分æ¥è¿‡æ»¤é¡¹ç›®ã€‚\n"
+"å¦‚æžœè¦æ ¹æ®å称和完整路径过滤,æœç´¢å†…容应至少包å«ä¸€ä¸ªâ€œ/â€å­—符。"
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10874,9 +10874,8 @@ msgid "Total:"
msgstr "åˆè®¡:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "导出é…置文件"
+msgstr "将列表导出为CSV文件"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -12171,7 +12170,7 @@ msgstr "å¹³é¢å½¢çŠ¶æ— æ³•æ­£å¸¸å·¥ä½œï¼Œæœªæ¥ç‰ˆæœ¬å°†è¢«åˆ é™¤ã€‚请勿使用
#: scene/3d/collision_shape.cpp
msgid ""
"ConcavePolygonShape doesn't support RigidBody in another mode than static."
-msgstr ""
+msgstr "ConcavePolygonShape仅支æŒé™æ€RigidBody。"
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index e3d9a84cfb..770b4d38f2 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -2,27 +2,28 @@
# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
-# Wesley (zx-wt) <ZX_WT@ymail.com>, 2016-2017.
+# Wesley (zx-wt) <ZX_WT@ymail.com>, 2016-2017, 2020.
# cnieFIT <dtotncq@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-04-10 00:46+0000\n"
-"Last-Translator: cnieFIT <dtotncq@gmail.com>\n"
-"Language-Team: Chinese (Hong Kong) <https://hosted.weblate.org/projects/"
-"godot-engine/godot/zh_Hant_HK/>\n"
+"PO-Revision-Date: 2020-05-01 11:43+0000\n"
+"Last-Translator: zx-wt <ZX_WT@ymail.com>\n"
+"Language-Team: Chinese (Traditional, Hong Kong) <https://hosted.weblate.org/"
+"projects/godot-engine/godot/zh_Hant_HK/>\n"
"Language: zh_HK\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.6-dev\n"
+"X-Generator: Weblate 4.0.2\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
+#, fuzzy
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr ""
+msgstr "convert()çš„é¡žåž‹åƒæ•¸ç„¡æ•ˆ, 請使用 TYPE_* 常數。"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
@@ -68,19 +69,19 @@ msgstr ""
#: core/ustring.cpp
msgid "KiB"
-msgstr ""
+msgstr "KiB"
#: core/ustring.cpp
msgid "MiB"
-msgstr ""
+msgstr "MiB"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "GiB"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "TiB"
#: core/ustring.cpp
msgid "PiB"
@@ -88,20 +89,19 @@ msgstr ""
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "PiB"
#: editor/animation_bezier_editor.cpp
msgid "Free"
-msgstr ""
+msgstr "自由"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr ""
+msgstr "å¹³å‡"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Mirror"
-msgstr "錯誤!"
+msgstr "å°ç¨±"
#: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp
msgid "Time:"
@@ -112,9 +112,8 @@ msgid "Value:"
msgstr ""
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Insert Key Here"
-msgstr "å‹•æ™æ’入關éµå¹€ï¼Ÿ"
+msgstr "在這æ’入關éµå¹€"
#: editor/animation_bezier_editor.cpp
#, fuzzy
@@ -127,14 +126,12 @@ msgid "Delete Selected Key(s)"
msgstr "刪除é¸ä¸­æª”案"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Add Bezier Point"
-msgstr "新增訊號"
+msgstr "新增Bezier節點"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Move Bezier Points"
-msgstr "下移"
+msgstr "Bezier節點下移"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
@@ -158,9 +155,8 @@ msgid "Anim Change Transform"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Change Keyframe Value"
-msgstr "動畫變化數值"
+msgstr "動畫變化關éµå¹€æ•¸å€¼"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
@@ -199,7 +195,7 @@ msgstr "更改動畫å稱:"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr ""
+msgstr "變更動畫循環"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -241,23 +237,21 @@ msgid "Add Track"
msgstr "新增動畫軌跡"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Looping"
-msgstr "動畫縮放。"
+msgstr "動畫循環"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Functions:"
-msgstr "行為"
+msgstr ""
#: editor/animation_track_editor.cpp
msgid "Audio Clips:"
-msgstr ""
+msgstr "è²éŸ³ç‰‡æ®µï¼š"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
-msgstr ""
+msgstr "動畫片段:"
#: editor/animation_track_editor.cpp
msgid "Change Track Path"
@@ -272,9 +266,8 @@ msgid "Update Mode (How this property is set)"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Interpolation Mode"
-msgstr "無干擾模å¼"
+msgstr "模å¼"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
@@ -311,11 +304,11 @@ msgstr "發動"
#: editor/animation_track_editor.cpp
msgid "Capture"
-msgstr ""
+msgstr "æ•æ‰"
#: editor/animation_track_editor.cpp
msgid "Nearest"
-msgstr ""
+msgstr "最近"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp
@@ -337,7 +330,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr ""
+msgstr "æ’入動畫幀"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -447,16 +440,15 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr ""
+msgstr "沒有ROOT以新增新動畫軌跡"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Bezier Track"
-msgstr "新增動畫軌跡"
+msgstr "新增Bezier軌跡"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
@@ -571,14 +563,12 @@ msgid "Edit"
msgstr "編輯"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation properties."
-msgstr "新增動畫"
+msgstr "動畫內容。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Copy Tracks"
-msgstr "è¤‡è£½åƒæ•¸"
+msgstr "複製"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
@@ -701,9 +691,8 @@ msgid "Select All/None"
msgstr "ä¸é¸"
#: editor/animation_track_editor_plugins.cpp
-#, fuzzy
msgid "Add Audio Track Clip"
-msgstr "新增動畫軌跡"
+msgstr "新增è²éŸ³è»Œè·¡ç‰‡æ®µ"
#: editor/animation_track_editor_plugins.cpp
msgid "Change Audio Track Clip Start Offset"
@@ -734,18 +723,16 @@ msgid "Line Number:"
msgstr "行數:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "å–代"
+msgstr "å·²å–代 %d。"
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
msgstr ""
#: editor/code_editor.cpp editor/editor_help.cpp
-#, fuzzy
msgid "%d matches."
-msgstr "沒有相åŒ"
+msgstr "%d 相åŒã€‚"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
@@ -795,7 +782,7 @@ msgstr "é‡è¨­ç¸®æ”¾æ¯”例"
#: editor/code_editor.cpp
msgid "Warnings"
-msgstr ""
+msgstr "警告"
#: editor/code_editor.cpp
msgid "Line and column numbers."
@@ -817,18 +804,16 @@ msgid "Connect to Node:"
msgstr "連到:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect to Script:"
-msgstr "ä¸èƒ½é€£åˆ°ä¸»æ©Ÿï¼š"
+msgstr "連到腳本:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "From Signal:"
-msgstr "訊號:"
+msgstr "來自訊號:"
#: editor/connections_dialog.cpp
msgid "Scene does not contain any script."
-msgstr ""
+msgstr "å ´æ™¯æ²’æœ‰å«æœ‰ä»»ä½•腳本。"
#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
#: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp
@@ -856,17 +841,16 @@ msgid "Extra Call Arguments:"
msgstr ""
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Receiver Method:"
-msgstr "鏿“‡æ¨¡å¼"
+msgstr "接收模å¼ï¼š"
#: editor/connections_dialog.cpp
msgid "Advanced"
-msgstr ""
+msgstr "進階"
#: editor/connections_dialog.cpp
msgid "Deferred"
-msgstr ""
+msgstr "å»¶é²"
#: editor/connections_dialog.cpp
msgid ""
@@ -875,16 +859,15 @@ msgstr ""
#: editor/connections_dialog.cpp
msgid "Oneshot"
-msgstr ""
+msgstr "åªé™ä¸€æ¬¡"
#: editor/connections_dialog.cpp
msgid "Disconnects the signal after its first emission."
msgstr ""
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Cannot connect signal"
-msgstr "連接訊號:"
+msgstr "無法連接訊號"
#: editor/connections_dialog.cpp editor/dependency_editor.cpp
#: editor/export_template_manager.cpp editor/groups_editor.cpp
@@ -956,9 +939,8 @@ msgid "Are you sure you want to remove all connections from this signal?"
msgstr ""
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Disconnect All"
-msgstr "中斷"
+msgstr "中斷全部"
#: editor/connections_dialog.cpp
#, fuzzy
@@ -1142,7 +1124,7 @@ msgstr "刪除"
#: editor/dependency_editor.cpp
msgid "Owns"
-msgstr ""
+msgstr "æ“æœ‰"
#: editor/dependency_editor.cpp
msgid "Resources Without Explicit Ownership:"
@@ -1166,19 +1148,16 @@ msgid "Godot Engine contributors"
msgstr "Godot Engine è²¢ç»è€…"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Project Founders"
-msgstr "專案設定"
+msgstr "專案開è’人"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Lead Developer"
-msgstr "開發者"
+msgstr "主è¦é–‹ç™¼è€…"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Project Manager "
-msgstr "開啟 Project Manager?"
+msgstr "開啟 Project Manager "
#: editor/editor_about.cpp
msgid "Developers"
@@ -1210,7 +1189,7 @@ msgstr "ç™½éŠ€ç´šææ¬¾äºº"
#: editor/editor_about.cpp
msgid "Bronze Donors"
-msgstr "é’éŠ…ææ¬¾äºº"
+msgstr "é’éŠ…ç´šææ¬¾äºº"
#: editor/editor_about.cpp
msgid "Donors"
@@ -1304,14 +1283,12 @@ msgid "Add Effect"
msgstr "新增效果"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Rename Audio Bus"
-msgstr "釿–°å‘½åAutoload"
+msgstr "釿–°å‘½åAudio Bus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Change Audio Bus Volume"
-msgstr "動畫變化數值"
+msgstr "變更Audio Busè²é‡"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Solo"
@@ -1338,9 +1315,8 @@ msgid "Move Bus Effect"
msgstr ""
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Bus Effect"
-msgstr "刪除é¸ä¸­æª”案"
+msgstr "刪除Bus Effect"
#: editor/editor_audio_buses.cpp
msgid "Drag & drop to rearrange."
@@ -1348,7 +1324,7 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Solo"
-msgstr ""
+msgstr "Solo"
#: editor/editor_audio_buses.cpp
msgid "Mute"
@@ -1367,7 +1343,7 @@ msgstr "é¸é …"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Duplicate"
-msgstr "複製"
+msgstr "å†è£½"
#: editor/editor_audio_buses.cpp
#, fuzzy
@@ -1397,9 +1373,8 @@ msgid "Delete Audio Bus"
msgstr "刪除佈局"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Duplicate Audio Bus"
-msgstr "複製"
+msgstr "å†è£½ Audio Bus"
#: editor/editor_audio_buses.cpp
#, fuzzy
@@ -1407,9 +1382,8 @@ msgid "Reset Bus Volume"
msgstr "é‡è¨­ç¸®æ”¾æ¯”例"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Move Audio Bus"
-msgstr "移動"
+msgstr "移動 Audio Bus"
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As..."
@@ -1428,9 +1402,8 @@ msgid "There is no '%s' file."
msgstr ""
#: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Layout"
-msgstr "儲存佈局"
+msgstr "佈局"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -1483,7 +1456,7 @@ msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
-msgstr "無效å稱"
+msgstr "無效å稱。"
#: editor/editor_autoload_settings.cpp
#, fuzzy
@@ -1491,19 +1464,16 @@ msgid "Valid characters:"
msgstr "有效字符:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing engine class name."
-msgstr "有效å稱。"
+msgstr ""
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing built-in type name."
-msgstr "有效å稱。"
+msgstr ""
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing global constant name."
-msgstr "有效å稱。"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Keyword cannot be used as an autoload name."
@@ -1571,7 +1541,7 @@ msgstr "路徑:"
#: editor/editor_autoload_settings.cpp
msgid "Node Name:"
-msgstr ""
+msgstr "Nodeå稱"
#: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp
#: editor/editor_profiler.cpp editor/project_manager.cpp
@@ -1602,16 +1572,15 @@ msgstr "正在更新場景..."
#: editor/editor_data.cpp editor/editor_properties.cpp
msgid "[empty]"
-msgstr ""
+msgstr "[空]"
#: editor/editor_data.cpp
msgid "[unsaved]"
-msgstr ""
+msgstr "[未儲存]"
#: editor/editor_dir_dialog.cpp
-#, fuzzy
msgid "Please select a base directory first."
-msgstr "請先儲存場景"
+msgstr "è«‹å…ˆé¸æ“‡ä¸»è¦è³‡æ–™å¤¾ã€‚"
#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
@@ -1674,9 +1643,8 @@ msgstr ""
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom debug template not found."
-msgstr "未找到佈局å稱ï¼"
+msgstr ""
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -1685,23 +1653,20 @@ msgid "Custom release template not found."
msgstr ""
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found:"
-msgstr "未找到佈局å稱ï¼"
+msgstr ""
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "3D Editor"
-msgstr "編輯器"
+msgstr "3D編輯器"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Script Editor"
-msgstr "開啟資料夾"
+msgstr ""
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1747,9 +1712,8 @@ msgid "(Editor Disabled, Properties Disabled)"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(Properties Disabled)"
-msgstr "鏿“‡æ¨¡å¼"
+msgstr ""
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1799,9 +1763,8 @@ msgid "Unset"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Current Profile:"
-msgstr "新增資料夾"
+msgstr ""
#: editor/editor_feature_profile.cpp
msgid "Make Current"
@@ -1881,15 +1844,13 @@ msgid "Copy Path"
msgstr "複製路徑"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open in File Manager"
-msgstr "開啟 Project Manager?"
+msgstr "在Project Manager開啟"
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Show in File Manager"
-msgstr "開啟 Project Manager?"
+msgstr "在Project Manager顯示"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
#, fuzzy
@@ -1903,7 +1864,7 @@ msgstr "釿–°æ•´ç†"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Recognized"
-msgstr "所有類型"
+msgstr "所有已知類型"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Files (*)"
@@ -1915,7 +1876,7 @@ msgstr "開啟檔案"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open File(s)"
-msgstr "開啟檔案"
+msgstr "開啟(多個)檔案"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open a Directory"
@@ -1937,16 +1898,18 @@ msgid "Save a File"
msgstr "儲存檔案"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Go Back"
-msgstr ""
+msgstr "å‘後"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Go Forward"
-msgstr ""
+msgstr "å‘å‰"
#: editor/editor_file_dialog.cpp
msgid "Go Up"
-msgstr ""
+msgstr "å‘上"
#: editor/editor_file_dialog.cpp
msgid "Toggle Hidden Files"
@@ -1975,14 +1938,12 @@ msgid "Move Favorite Down"
msgstr "下移最愛"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to previous folder."
-msgstr "無法新增資料夾"
+msgstr "回到上一個資料夾。"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to next folder."
-msgstr "無法新增資料夾"
+msgstr "下一個資料夾"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
@@ -2028,7 +1989,7 @@ msgstr "檔案:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
-msgstr "請用有效的副檔å"
+msgstr "請用有效的副檔å。"
#: editor/editor_file_system.cpp
msgid "ScanSources"
@@ -2069,13 +2030,12 @@ msgid "Description"
msgstr "æè¿°ï¼š"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Online Tutorials"
-msgstr "關閉場景"
+msgstr "Online教學"
#: editor/editor_help.cpp
msgid "Properties"
-msgstr ""
+msgstr "內客"
#: editor/editor_help.cpp
msgid "override:"
@@ -2158,29 +2118,24 @@ msgid "Classes Only"
msgstr ""
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Methods Only"
-msgstr "鏿“‡æ¨¡å¼"
+msgstr ""
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Signals Only"
-msgstr "訊號"
+msgstr "åªé™è¨Šè™Ÿ"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Constants Only"
-msgstr "常數"
+msgstr "åªé™å¸¸æ•¸"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Properties Only"
-msgstr "鏿“‡æ¨¡å¼"
+msgstr "åªé™å…§å®¹"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Theme Properties Only"
-msgstr "鏿“‡æ¨¡å¼"
+msgstr ""
#: editor/editor_help_search.cpp
msgid "Member Type"
@@ -2191,9 +2146,8 @@ msgid "Class"
msgstr ""
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Method"
-msgstr "鏿“‡æ¨¡å¼"
+msgstr ""
#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
#, fuzzy
@@ -2205,14 +2159,12 @@ msgid "Constant"
msgstr "常數"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Property"
-msgstr "鏿“‡æ¨¡å¼"
+msgstr "內容"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Theme Property"
-msgstr "篩é¸:"
+msgstr ""
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
msgid "Property:"
@@ -2231,9 +2183,8 @@ msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Copy Selection"
-msgstr "移除é¸é …"
+msgstr "複製é¸é …"
#: editor/editor_log.cpp editor/editor_network_profiler.cpp
#: editor/editor_profiler.cpp editor/editor_properties.cpp
@@ -2265,9 +2216,8 @@ msgid "%s/s"
msgstr ""
#: editor/editor_network_profiler.cpp
-#, fuzzy
msgid "Down"
-msgstr "下載"
+msgstr ""
#: editor/editor_network_profiler.cpp
msgid "Up"
@@ -2322,14 +2272,12 @@ msgid "Save Resource As..."
msgstr "把資æºå¦å­˜ç‚º..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open file for writing:"
-msgstr "ä¸èƒ½å¯«å…¥ï¼Œä¸èƒ½é–‹å•Ÿæª”案:"
+msgstr "ä¸èƒ½é–‹å•Ÿæª”案以供寫入:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Requested file format unknown:"
-msgstr "è¦æ±‚çš„æª”æ¡ˆæ ¼å¼æœªçŸ¥ï¼š"
+msgstr "è¦æ±‚的檔案格å¼ä¸æ˜Žï¼š"
#: editor/editor_node.cpp
msgid "Error while saving."
@@ -3501,15 +3449,16 @@ msgstr "你是å¦å¿˜äº†é—œéµè©ž 'tool' ?"
#: editor/editor_run_script.cpp
msgid "Couldn't run script:"
-msgstr ""
+msgstr "ä¸èƒ½åŸ·è¡Œè…³æœ¬ï¼š"
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
msgstr ""
#: editor/editor_sub_scene.cpp
+#, fuzzy
msgid "Select Node(s) to Import"
-msgstr ""
+msgstr "鏿“‡è¦å°Žå…¥çš„Node(s)"
#: editor/editor_sub_scene.cpp editor/project_manager.cpp
msgid "Browse"
@@ -3521,7 +3470,7 @@ msgstr "場景路徑:"
#: editor/editor_sub_scene.cpp
msgid "Import From Node:"
-msgstr ""
+msgstr "從Node導入:"
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3542,59 +3491,66 @@ msgid "Download"
msgstr "下載"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Official export templates aren't available for development builds."
-msgstr ""
+msgstr "Development builds未能æä¾›å®˜æ–¹export templates。"
#: editor/export_template_manager.cpp
msgid "(Missing)"
-msgstr ""
+msgstr "(欠缺)"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "(Current)"
-msgstr ""
+msgstr "(Current)"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Retrieving mirrors, please wait..."
-msgstr ""
+msgstr "接收 mirrors中, è«‹ç¨ä¾¯..."
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Remove template version '%s'?"
-msgstr ""
+msgstr "移除版本 '%s' 的範本?"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Can't open export templates zip."
-msgstr ""
+msgstr "ä¸èƒ½é–‹å•Ÿexport templatesçš„zip壓縮檔。"
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Invalid version.txt format inside templates: %s."
-msgstr "無效的 version.txt æ ¼å¼ inside templates."
+msgstr "範本文件: %s 中的 version.txt æ ¼å¼ç„¡æ•ˆã€‚"
#: editor/export_template_manager.cpp
#, fuzzy
msgid "No version.txt found inside templates."
-msgstr "找ä¸åˆ°version.txt inside templates."
+msgstr "範本中找ä¸åˆ°version.txt。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for templates:"
-msgstr "載入字形出ç¾éŒ¯èª¤"
+msgstr "範本創造路徑時出ç¾éŒ¯èª¤ï¼š"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Extracting Export Templates"
-msgstr ""
+msgstr "正在解壓Export Templates"
#: editor/export_template_manager.cpp
msgid "Importing:"
-msgstr "導入中:"
+msgstr "導入中:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Error getting the list of mirrors."
-msgstr ""
+msgstr "å–å¾—mirrors列表時出錯。"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Error parsing JSON of mirror list. Please report this issue!"
-msgstr ""
+msgstr "parsing mirror列表的JSON出錯。 請回報此å•題ï¼"
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3605,8 +3561,9 @@ msgstr "找ä¸åˆ°é€™å€‹ç‰ˆæœ¬çš„下載連çµã€‚直接下載åªé©ç”¨æ–¼official
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Can't resolve."
-msgstr ""
+msgstr "無法解決。"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3624,8 +3581,9 @@ msgid "Request Failed."
msgstr "請求失敗。"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Redirect Loop."
-msgstr ""
+msgstr "釿–°å®šå‘循環。"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3633,49 +3591,49 @@ msgid "Failed:"
msgstr "失敗:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download Complete."
-msgstr "下載出ç¾éŒ¯èª¤"
+msgstr "下載完æˆã€‚"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cannot remove temporary file:"
-msgstr "無法移除:\n"
+msgstr "無法移除暫存檔:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid ""
"Templates installation failed.\n"
"The problematic templates archives can be found at '%s'."
msgstr ""
+"Templates安è£å¤±æ•—。\n"
+"出ç¾å•題的templates 存檔å¯ä»¥åœ¨ \"%s\" 中找到。"
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Error requesting URL:"
-msgstr "請求時出ç¾éŒ¯èª¤"
+msgstr "請求URL時出ç¾éŒ¯èª¤ï¼š"
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Connecting to Mirror..."
-msgstr "連到..."
+msgstr "正在連到Mirror..."
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Disconnected"
-msgstr "中斷"
+msgstr "æ–·ç·š"
#: editor/export_template_manager.cpp
msgid "Resolving"
-msgstr ""
+msgstr "解決中"
#: editor/export_template_manager.cpp
msgid "Can't Resolve"
-msgstr ""
+msgstr "ä¸èƒ½è§£æ±º"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting..."
-msgstr "連到..."
+msgstr "連接中..."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3685,7 +3643,7 @@ msgstr "ä¸èƒ½é€£æŽ¥ã€‚"
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Connected"
-msgstr "連到"
+msgstr "已連線"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3695,63 +3653,61 @@ msgstr "請求中..."
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Downloading"
-msgstr "下載出ç¾éŒ¯èª¤"
+msgstr "下載中"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connection Error"
-msgstr "連到..."
+msgstr "連接出錯"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "SSL Handshake Error"
-msgstr ""
+msgstr "SSL Handshake出錯"
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Uncompressing Android Build Sources"
-msgstr "導入中:"
+msgstr "正在解壓Android Build Sources"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Current Version:"
-msgstr ""
+msgstr "ç•¶å‰ç‰ˆæœ¬ï¼š"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Installed Versions:"
-msgstr "無效副檔å"
+msgstr "已安è£çš„版本:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install From File"
-msgstr "從檔案下載"
+msgstr "從檔案安è£"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove Template"
-msgstr "移除é¸é …"
+msgstr "移除Template"
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Select Template File"
-msgstr "è¦åˆªé™¤é¸ä¸­æª”案?"
+msgstr "é¸å–Template檔案"
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Godot Export Templates"
-msgstr "管ç†è¼¸å‡ºç¯„本"
+msgstr "Godot輸出範本"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Export Template Manager"
-msgstr ""
+msgstr "Export Template管ç†å™¨"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download Templates"
-msgstr "移除é¸é …"
+msgstr "下載Templates"
#: editor/export_template_manager.cpp
msgid "Select mirror from list: (Shift+Click: Open in Browser)"
-msgstr ""
+msgstr "å¾žæ¸…å–®ä¸­é¸æ“‡é¡åƒ: (Shift + 單擊: 在ç€è¦½å™¨ä¸­æ‰“é–‹)"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -3759,77 +3715,73 @@ msgid "Favorites"
msgstr "最愛:"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Status: Import of file failed. Please fix file and reimport manually."
-msgstr ""
+msgstr "ç‹€æ…‹ï¼šå°Žå…¥æª”æ¡ˆå¤±æ•—ã€‚è«‹ä¿®æ­£æª”æ¡ˆä¸¦å†æ‰‹å‹•導入。"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Cannot move/rename resources root."
-msgstr ""
+msgstr "ä¸èƒ½ç§»å‹•ï¼é‡æ–°å‘½å resources root."
#: editor/filesystem_dock.cpp
msgid "Cannot move a folder into itself."
-msgstr ""
+msgstr "ä¸èƒ½ç§»å‹•資料夾到資料夾自身。"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:"
-msgstr "載入錯誤:"
+msgstr "移動錯誤:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error duplicating:"
-msgstr "載入錯誤:"
+msgstr "å†è£½æ™‚出錯:"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Unable to update dependencies:"
-msgstr ""
+msgstr "未能更新dependencies:"
#: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp
msgid "No name provided."
-msgstr ""
+msgstr "沒有æä¾›å字。"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Provided name contains invalid characters."
-msgstr "有效字符:"
+msgstr "æä¾›çš„å字嫿œ‰ç„¡æ•ˆå­—符。"
#: editor/filesystem_dock.cpp
msgid "A file or folder with this name already exists."
-msgstr ""
+msgstr "具有此å稱的檔或資料夾已存在。"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Name contains invalid characters."
-msgstr "有效字符:"
+msgstr "å字嫿œ‰ç„¡æ•ˆå­—符。"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "儲存TileSet時出ç¾éŒ¯èª¤ï¼"
+msgstr "釿–°å‘½å檔案:"
#: editor/filesystem_dock.cpp
msgid "Renaming folder:"
-msgstr ""
+msgstr "釿–°å‘½å資料夾:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Duplicating file:"
-msgstr "複製"
+msgstr "å†è£½æª”案:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Duplicating folder:"
-msgstr "複製"
+msgstr "å†è£½è³‡æ–™å¤¾ï¼š"
#: editor/filesystem_dock.cpp
#, fuzzy
msgid "New Inherited Scene"
-msgstr "下一個腳本"
+msgstr "新增 Inherited Scene"
#: editor/filesystem_dock.cpp
#, fuzzy
msgid "Set As Main Scene"
-msgstr "鏿“‡ä¸»å ´æ™¯"
+msgstr "設家æˆä¸»å ´æ™¯"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -3837,22 +3789,22 @@ msgid "Open Scenes"
msgstr "開啓場景"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Instance"
-msgstr ""
+msgstr "Instance"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Add to Favorites"
-msgstr "最愛:"
+msgstr "加到最愛"
#: editor/filesystem_dock.cpp
#, fuzzy
msgid "Remove from Favorites"
-msgstr "åªé™é¸ä¸­"
+msgstr "從最愛中移除"
#: editor/filesystem_dock.cpp
msgid "Edit Dependencies..."
-msgstr ""
+msgstr "編輯Dependencies..."
#: editor/filesystem_dock.cpp
msgid "View Owners..."
@@ -3864,9 +3816,8 @@ msgid "Rename..."
msgstr "釿–°å‘½å..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Duplicate..."
-msgstr "複製"
+msgstr "å†è£½..."
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -3874,37 +3825,33 @@ msgid "Move To..."
msgstr "æ¬åˆ°..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Scene..."
-msgstr "新增場景"
+msgstr "新增場景..."
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "New Script..."
-msgstr "下一個腳本"
+msgstr "新增腳本..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Resource..."
-msgstr "把資æºå¦å­˜ç‚º..."
+msgstr "新增資æº..."
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
msgid "Expand All"
-msgstr ""
+msgstr "全部展開"
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Collapse All"
-msgstr "關閉"
+msgstr "全部折疊"
#: editor/filesystem_dock.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/project_manager.cpp editor/rename_dialog.cpp
#: editor/scene_tree_dock.cpp
msgid "Rename"
-msgstr "釿–°å‘½å..."
+msgstr "釿–°å‘½å"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -3912,18 +3859,18 @@ msgid "Previous Folder/File"
msgstr "上一個tab"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Next Folder/File"
-msgstr "新增資料夾"
+msgstr "ä¸‹ä¸€å€‹è³‡æ–™å¤¾ï¼æª”案"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Re-Scan Filesystem"
-msgstr ""
+msgstr "釿–°æŽƒææª”案系統"
#: editor/filesystem_dock.cpp
#, fuzzy
msgid "Toggle Split Mode"
-msgstr "(ä¸ï¼‰é¡¯ç¤ºéš±è—的文件"
+msgstr "切æ›Split 模å¼"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -3931,10 +3878,11 @@ msgid "Search files"
msgstr "在幫助檔æœå°‹"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid ""
"Scanning Files,\n"
"Please Wait..."
-msgstr ""
+msgstr "æ­£åœ¨æŽƒææª”案, è«‹ç¨å€™..."
#: editor/filesystem_dock.cpp
msgid "Move"
@@ -3942,35 +3890,35 @@ msgstr "移動"
#: editor/filesystem_dock.cpp
msgid "There is already file or folder with the same name in this location."
-msgstr ""
+msgstr "æ­¤ä½ç½®å·²å­˜åœ¨åŒå的檔案或資料夾。"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Overwrite"
-msgstr ""
+msgstr "覆蓋"
#: editor/filesystem_dock.cpp
#, fuzzy
msgid "Create Scene"
-msgstr "儲存場景"
+msgstr "新增場景"
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Create Script"
-msgstr ""
+msgstr "新增腳本"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Find in Files"
-msgstr "多 %d 檔案"
+msgstr "在檔案中本尋找"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Find:"
-msgstr "尋找"
+msgstr "尋找:"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Folder:"
-msgstr "新增資料夾"
+msgstr "資料夾:"
#: editor/find_in_files.cpp
#, fuzzy
@@ -3978,169 +3926,166 @@ msgid "Filters:"
msgstr "篩é¸:"
#: editor/find_in_files.cpp
+#, fuzzy
msgid ""
"Include the files with the following extensions. Add or remove them in "
"ProjectSettings."
-msgstr ""
+msgstr "包å«ä¸‹åˆ—副檔å的文件。在ProjectSettings增加或移除。"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find..."
-msgstr ""
+msgstr "尋找..."
#: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Replace..."
-msgstr ""
+msgstr "替æ›â€¦"
#: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp
msgid "Cancel"
msgstr "å–æ¶ˆ"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Find: "
-msgstr "尋找"
+msgstr "尋找: "
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace: "
-msgstr "å–代"
+msgstr "å–代: "
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace all (no undo)"
-msgstr "全部å–代"
+msgstr "全部å–代(ä¸å¯é‚„原)"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Searching..."
-msgstr "儲存中..."
+msgstr "æœå°‹ä¸­..."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Search complete"
-msgstr "在幫助檔æœå°‹"
+msgstr "æœå°‹å®Œæˆ"
#: editor/groups_editor.cpp
+#, fuzzy
msgid "Add to Group"
-msgstr ""
+msgstr "加到Group"
#: editor/groups_editor.cpp
msgid "Remove from Group"
-msgstr ""
+msgstr "從Group中移除"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group name already exists."
-msgstr "錯誤:動畫å稱已存在ï¼"
+msgstr "錯誤:groupå稱已存在。"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Invalid group name."
-msgstr "無效å稱"
+msgstr "無效groupå稱。"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Rename Group"
-msgstr "專案"
+msgstr "釿–°å‘½åGroup"
#: editor/groups_editor.cpp
#, fuzzy
msgid "Delete Group"
-msgstr "刪除佈局"
+msgstr "刪除Group"
#: editor/groups_editor.cpp editor/node_dock.cpp
+#, fuzzy
msgid "Groups"
-msgstr ""
+msgstr "Groups"
#: editor/groups_editor.cpp
msgid "Nodes Not in Group"
-msgstr ""
+msgstr "ä¸åœ¨Groupå…§çš„Nodes"
#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "Filter nodes"
-msgstr "篩é¸:"
+msgstr "篩é¸nodes:"
#: editor/groups_editor.cpp
msgid "Nodes in Group"
-msgstr ""
+msgstr "Group中的Nodes"
#: editor/groups_editor.cpp
msgid "Empty groups will be automatically removed."
-msgstr ""
+msgstr "空groups會被移除。"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group Editor"
-msgstr "開啟資料夾"
+msgstr "Group編輯器"
#: editor/groups_editor.cpp
msgid "Manage Groups"
-msgstr ""
+msgstr "管ç†groups"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
msgid "Import as Single Scene"
-msgstr "更新場景"
+msgstr "導入為單一場景"
#: editor/import/resource_importer_scene.cpp
+#, fuzzy
msgid "Import with Separate Animations"
-msgstr ""
+msgstr "以分開的動畫導入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
-msgstr ""
+msgstr "以分開的Materials導入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects"
-msgstr ""
+msgstr "以分開的物件導入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials"
-msgstr ""
+msgstr "以分開的物件+Materials導入"
#: editor/import/resource_importer_scene.cpp
+#, fuzzy
msgid "Import with Separate Objects+Animations"
-msgstr ""
+msgstr "以分開的物件+動畫導入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials+Animations"
-msgstr ""
+msgstr "以分開的Materials+動畫導入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials+Animations"
-msgstr ""
+msgstr "以分開的物件+Materials+動畫導入"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
-msgstr ""
+msgstr "導入為多個場景"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes+Materials"
-msgstr ""
+msgstr "導入為多個場景+Materials"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Import Scene"
-msgstr ""
+msgstr "導入場景"
#: editor/import/resource_importer_scene.cpp
msgid "Importing Scene..."
-msgstr ""
+msgstr "導入場景中..."
#: editor/import/resource_importer_scene.cpp
msgid "Generating Lightmaps"
-msgstr ""
+msgstr "光照圖生æˆä¸­"
#: editor/import/resource_importer_scene.cpp
msgid "Generating for Mesh: "
-msgstr ""
+msgstr "為Mesh生æˆä¸­ï¼š "
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
-msgstr ""
+msgstr "正在é‹è¡Œè‡ªå®šç¾©è…³æœ¬..."
#: editor/import/resource_importer_scene.cpp
msgid "Couldn't load post-import script:"
@@ -9101,15 +9046,15 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Equal (==)"
-msgstr ""
+msgstr "等於 (==)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Greater Than (>)"
-msgstr ""
+msgstr "大於(>)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Greater Than or Equal (>=)"
-msgstr ""
+msgstr "大於或等於(>=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9131,15 +9076,15 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Less Than (<)"
-msgstr ""
+msgstr "å°æ–¼ (<)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Less Than or Equal (<=)"
-msgstr ""
+msgstr "å°æ–¼æˆ–等於 (<=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Not Equal (!=)"
-msgstr ""
+msgstr "ä¸ç­‰æ–¼ (!=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -10833,23 +10778,24 @@ msgstr ""
#: editor/scene_tree_dock.cpp
msgid "Move Nodes In Parent"
-msgstr ""
+msgstr "在Parent內移動Nodes"
#: editor/scene_tree_dock.cpp
msgid "Duplicate Node(s)"
-msgstr ""
+msgstr "å†è£½Node"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
-msgstr ""
+msgstr "ä¸èƒ½åœ¨inherited sceneså…§reparent nodes,nodesé †åºä¸èƒ½æ”¹è®Šã€‚"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Node must belong to the edited scene to become root."
-msgstr ""
+msgstr "Node必須屬於已編輯的場景以æˆç‚ºroot."
#: editor/scene_tree_dock.cpp
msgid "Instantiated scenes can't become root"
-msgstr ""
+msgstr "Instantiated scenesä¸èƒ½æˆç‚ºroot"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10862,12 +10808,14 @@ msgid "Delete %d nodes?"
msgstr "ä¸é¸"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Delete the root node \"%s\"?"
-msgstr ""
+msgstr "删除root node \"%s\"?"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Delete node \"%s\" and its children?"
-msgstr ""
+msgstr "删除root node \"%s\"?"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -12938,7 +12886,7 @@ msgstr ""
#: scene/gui/range.cpp
msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
-msgstr ""
+msgstr "當\"Exp Edit\" 啟用時,\"Min Value\" 必須大於0。"
#: scene/gui/scroll_container.cpp
msgid ""
@@ -12949,7 +12897,7 @@ msgstr ""
#: scene/gui/tree.cpp
msgid "(Other)"
-msgstr ""
+msgstr "(å…¶ä»–)"
#: scene/main/scene_tree.cpp
msgid ""
@@ -12966,23 +12914,22 @@ msgid ""
msgstr ""
#: scene/main/viewport.cpp
+#, fuzzy
msgid "Viewport size must be greater than 0 to render anything."
-msgstr ""
+msgstr "viewport大å°å¿…須大於ï¼ä»¥æ¸²æŸ“任何æ±è¥¿ã€‚"
#: scene/resources/visual_shader_nodes.cpp
#, fuzzy
msgid "Invalid source for preview."
-msgstr "無效字型"
+msgstr "é è¦½ä¾†è‡ªç„¡æ•ˆä¾†æºã€‚"
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Invalid source for shader."
-msgstr "無效字型"
+msgstr "無效的SHADER來æºã€‚"
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Invalid comparison function for that type."
-msgstr "無效字型"
+msgstr "無效的函å¼é¡žåž‹å°æ¯”。"
#: servers/visual/shader_language.cpp
msgid "Assignment to function."
diff --git a/main/main.cpp b/main/main.cpp
index dff7907e72..95449dd5cc 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -139,6 +139,7 @@ static DisplayServer::ScreenOrientation window_orientation = DisplayServer::SCRE
static uint32_t window_flags = 0;
static Size2i window_size = Size2i(1024, 600);
static bool window_vsync_via_compositor = false;
+static bool disable_wintab = false;
static int init_screen = -1;
static bool init_fullscreen = false;
@@ -314,6 +315,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --enable-vsync-via-compositor When vsync is enabled, vsync via the OS' window compositor (Windows only).\n");
OS::get_singleton()->print(" --disable-vsync-via-compositor Disable vsync via the OS' window compositor (Windows only).\n");
OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n");
+ OS::get_singleton()->print(" --disable-wintab Disable WinTab API and always use Windows Ink API for the pen input (Windows only).\n");
OS::get_singleton()->print("\n");
#endif
@@ -595,6 +597,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (I->get() == "--gpu-abort") { // force windowed window
Engine::singleton->abort_on_gpu_errors = true;
+ } else if (I->get() == "--disable-wintab") {
+
+ disable_wintab = true;
} else if (I->get() == "--single-window") { // force single window
single_window = true;
@@ -1079,6 +1084,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->_vsync_via_compositor = window_vsync_via_compositor;
+ if (!disable_wintab) {
+ // No "--disable_wintab" option
+ disable_wintab = GLOBAL_DEF("display/window/disable_wintab_api", false);
+ }
+
+ OS::get_singleton()->_disable_wintab = disable_wintab;
+
/* todo restore
OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp
index 38f7371802..3a95581720 100644
--- a/main/tests/test_math.cpp
+++ b/main/tests/test_math.cpp
@@ -370,7 +370,7 @@ void test_vec(Plane p_vec) {
Plane v0 = cm.xform4(p_vec);
print_line("out: " + v0);
- v0.normal.z = (v0.d / 100.0 * 2.0 - 1.0) * v0.d;
+ v0.normal.z = (v0.distance / 100.0 * 2.0 - 1.0) * v0.distance;
print_line("out_F: " + v0);
}
diff --git a/misc/dist/linux/org.godotengine.Godot.desktop b/misc/dist/linux/org.godotengine.Godot.desktop
index c8b99207f8..8b74234174 100644
--- a/misc/dist/linux/org.godotengine.Godot.desktop
+++ b/misc/dist/linux/org.godotengine.Godot.desktop
@@ -5,6 +5,7 @@ Comment=Multi-platform 2D and 3D game engine with a feature-rich editor
Exec=godot %f
Icon=godot
Terminal=false
+PrefersNonDefaultGPU=true
Type=Application
MimeType=application/x-godot-project;
Categories=Development;IDE;
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index 8ac26a0fdb..e28683ba78 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/modules/bullet/shape_bullet.cpp
@@ -188,7 +188,7 @@ void PlaneShapeBullet::setup(const Plane &p_plane) {
btCollisionShape *PlaneShapeBullet::create_bt_shape(const btVector3 &p_implicit_scale, real_t p_extra_edge) {
btVector3 btPlaneNormal;
G_TO_B(plane.normal, btPlaneNormal);
- return prepare(PlaneShapeBullet::create_shape_plane(btPlaneNormal, plane.d));
+ return prepare(PlaneShapeBullet::create_shape_plane(btPlaneNormal, plane.distance));
}
/* Sphere */
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index d38ddf3f90..550a919d0d 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -46,7 +46,7 @@ void CSGShape3D::set_use_collision(bool p_enable) {
root_collision_instance = PhysicsServer3D::get_singleton()->body_create(PhysicsServer3D::BODY_MODE_STATIC);
PhysicsServer3D::get_singleton()->body_set_state(root_collision_instance, PhysicsServer3D::BODY_STATE_TRANSFORM, get_global_transform());
PhysicsServer3D::get_singleton()->body_add_shape(root_collision_instance, root_collision_shape->get_rid());
- PhysicsServer3D::get_singleton()->body_set_space(root_collision_instance, get_world()->get_space());
+ PhysicsServer3D::get_singleton()->body_set_space(root_collision_instance, get_world_3d()->get_space());
PhysicsServer3D::get_singleton()->body_attach_object_instance_id(root_collision_instance, get_instance_id());
set_collision_layer(collision_layer);
set_collision_mask(collision_mask);
@@ -507,7 +507,7 @@ void CSGShape3D::_notification(int p_what) {
root_collision_instance = PhysicsServer3D::get_singleton()->body_create(PhysicsServer3D::BODY_MODE_STATIC);
PhysicsServer3D::get_singleton()->body_set_state(root_collision_instance, PhysicsServer3D::BODY_STATE_TRANSFORM, get_global_transform());
PhysicsServer3D::get_singleton()->body_add_shape(root_collision_instance, root_collision_shape->get_rid());
- PhysicsServer3D::get_singleton()->body_set_space(root_collision_instance, get_world()->get_space());
+ PhysicsServer3D::get_singleton()->body_set_space(root_collision_instance, get_world_3d()->get_space());
PhysicsServer3D::get_singleton()->body_attach_object_instance_id(root_collision_instance, get_instance_id());
set_collision_layer(collision_layer);
set_collision_mask(collision_mask);
diff --git a/modules/gdnative/gdnative/plane.cpp b/modules/gdnative/gdnative/plane.cpp
index 17221fe081..054673d9cc 100644
--- a/modules/gdnative/gdnative/plane.cpp
+++ b/modules/gdnative/gdnative/plane.cpp
@@ -37,10 +37,10 @@
extern "C" {
#endif
-void GDAPI godot_plane_new_with_reals(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d) {
+void GDAPI godot_plane_new_with_reals(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_distance) {
Plane *dest = (Plane *)r_dest;
- *dest = Plane(p_a, p_b, p_c, p_d);
+ *dest = Plane(p_a, p_b, p_c, p_distance);
}
void GDAPI godot_plane_new_with_vectors(godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3) {
@@ -162,14 +162,14 @@ godot_vector3 GDAPI godot_plane_get_normal(const godot_plane *p_self) {
return *v3;
}
-godot_real GDAPI godot_plane_get_d(const godot_plane *p_self) {
+godot_real GDAPI godot_plane_get_distance(const godot_plane *p_self) {
const Plane *self = (const Plane *)p_self;
- return self->d;
+ return self->distance;
}
-void GDAPI godot_plane_set_d(godot_plane *p_self, const godot_real p_d) {
+void GDAPI godot_plane_set_distance(godot_plane *p_self, const godot_real p_distance) {
Plane *self = (Plane *)p_self;
- self->d = p_d;
+ self->distance = p_distance;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index d5ab62dc61..c4b8098fc6 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -3120,14 +3120,14 @@
]
},
{
- "name": "godot_plane_get_d",
+ "name": "godot_plane_get_distance",
"return_type": "godot_real",
"arguments": [
["const godot_plane *", "p_self"]
]
},
{
- "name": "godot_plane_set_d",
+ "name": "godot_plane_set_distance",
"return_type": "void",
"arguments": [
["godot_plane *", "p_self"],
diff --git a/modules/gdnative/include/gdnative/plane.h b/modules/gdnative/include/gdnative/plane.h
index b759a8cc1a..6bd28d7363 100644
--- a/modules/gdnative/include/gdnative/plane.h
+++ b/modules/gdnative/include/gdnative/plane.h
@@ -92,9 +92,9 @@ void GDAPI godot_plane_set_normal(godot_plane *p_self, const godot_vector3 *p_no
godot_vector3 GDAPI godot_plane_get_normal(const godot_plane *p_self);
-godot_real GDAPI godot_plane_get_d(const godot_plane *p_self);
+godot_real GDAPI godot_plane_get_distance(const godot_plane *p_self);
-void GDAPI godot_plane_set_d(godot_plane *p_self, const godot_real p_d);
+void GDAPI godot_plane_set_distance(godot_plane *p_self, const godot_real p_distance);
#ifdef __cplusplus
}
diff --git a/modules/gdnavigation/nav_map.cpp b/modules/gdnavigation/nav_map.cpp
index 7e6a3f7a26..9652938251 100644
--- a/modules/gdnavigation/nav_map.cpp
+++ b/modules/gdnavigation/nav_map.cpp
@@ -783,7 +783,7 @@ void NavMap::clip_path(const std::vector<gd::NavigationPoly> &p_navigation_polys
if (cut_plane.normal == Vector3())
return;
cut_plane.normal.normalize();
- cut_plane.d = cut_plane.normal.dot(from);
+ cut_plane.distance = cut_plane.normal.dot(from);
while (from_poly != p_to_poly) {
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 06ab9e226d..cdd5deb7ee 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -1052,6 +1052,16 @@ void GDScript::_init_rpc_methods_properties() {
}
GDScript::~GDScript() {
+
+ {
+ MutexLock lock(GDScriptLanguage::get_singleton()->lock);
+
+ while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) {
+ E->self()->_clear_stack();
+ pending_func_states.remove(E);
+ }
+ }
+
for (Map<StringName, GDScriptFunction *>::Element *E = member_functions.front(); E; E = E->next()) {
memdelete(E->get());
}
@@ -1470,9 +1480,15 @@ GDScriptInstance::GDScriptInstance() {
}
GDScriptInstance::~GDScriptInstance() {
- if (script.is_valid() && owner) {
- MutexLock lock(GDScriptLanguage::singleton->lock);
+ MutexLock lock(GDScriptLanguage::get_singleton()->lock);
+
+ while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) {
+ E->self()->_clear_stack();
+ pending_func_states.remove(E);
+ }
+
+ if (script.is_valid() && owner) {
script->instances.erase(owner);
}
}
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 5fdc25669f..2dbc2252fa 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -117,6 +117,8 @@ class GDScript : public Script {
String fully_qualified_name;
SelfList<GDScript> script_list;
+ SelfList<GDScriptFunctionState>::List pending_func_states;
+
GDScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error);
void _set_subclass_path(Ref<GDScript> &p_sc, const String &p_path);
@@ -254,6 +256,8 @@ class GDScriptInstance : public ScriptInstance {
Vector<Variant> members;
bool base_ref;
+ SelfList<GDScriptFunctionState>::List pending_func_states;
+
void _ml_call_reversed(GDScript *sptr, const StringName &p_method, const Variant **p_args, int p_argcount);
public:
@@ -347,6 +351,8 @@ struct GDScriptWarning {
class GDScriptLanguage : public ScriptLanguage {
+ friend class GDScriptFunctionState;
+
static GDScriptLanguage *singleton;
Variant *_global_array;
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 7ad0682637..ab3228d076 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1427,6 +1427,7 @@ static bool _guess_identifier_type_from_base(GDScriptCompletionContext &p_contex
// Variable used in the same expression
return false;
}
+
if (_guess_expression_type(p_context, m.expression, r_type)) {
return true;
}
@@ -3490,6 +3491,17 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
return OK;
}
} break;
+ case GDScriptParser::COMPLETION_TYPE_HINT: {
+
+ GDScriptParser::DataType base_type = context._class->base_type;
+ base_type.has_type = true;
+ base_type.kind = GDScriptParser::DataType::CLASS;
+ base_type.class_type = const_cast<GDScriptParser::ClassNode *>(context._class);
+
+ if (_lookup_symbol_from_base(base_type, p_symbol, false, r_result) == OK) {
+ return OK;
+ }
+ } break;
default: {
}
}
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index 44640411bb..df0fac956c 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -294,8 +294,8 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
line = p_state->line;
ip = p_state->ip;
alloca_size = p_state->stack.size();
- script = static_cast<GDScript *>(ObjectDB::get_instance(p_state->script_id));
- p_instance = p_state->instance_id.is_valid() ? static_cast<GDScriptInstance *>(ObjectDB::get_instance(p_state->instance_id)->get_script_instance()) : nullptr;
+ script = p_state->script;
+ p_instance = p_state->instance;
defarg = p_state->defarg;
self = p_state->self;
@@ -1281,11 +1281,21 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
gdfs->state.alloca_size = alloca_size;
gdfs->state.ip = ip + ipofs;
gdfs->state.line = line;
- gdfs->state.script_id = script->get_instance_id();
+ gdfs->state.script = _script;
+ {
+ MutexLock lock(GDScriptLanguage::get_singleton()->lock);
+ _script->pending_func_states.add(&gdfs->scripts_list);
+ if (p_instance) {
+ gdfs->state.instance = p_instance;
+ p_instance->pending_func_states.add(&gdfs->instances_list);
+ } else {
+ gdfs->state.instance = NULL;
+ }
+ }
#ifdef DEBUG_ENABLED
+ gdfs->state.function_name = name;
gdfs->state.script_path = _script->get_path();
#endif
- gdfs->state.instance_id = (p_instance && p_instance->get_owner()) ? p_instance->get_owner()->get_instance_id() : ObjectID();
gdfs->state.defarg = defarg;
gdfs->function = this;
@@ -1833,12 +1843,14 @@ bool GDScriptFunctionState::is_valid(bool p_extended_check) const {
return false;
if (p_extended_check) {
- // Class instance gone? (Otherwise script is valid for sure, because the instance has a ref to the script)
- if (state.instance_id.is_valid() && !ObjectDB::get_instance(state.instance_id)) {
+ MutexLock lock(GDScriptLanguage::get_singleton()->lock);
+
+ // Script gone?
+ if (!scripts_list.in_list()) {
return false;
}
- // Script gone? (Static method, so there's no instance whose ref to the script can ensure it's valid)
- if (!ObjectDB::get_instance(state.script_id)) {
+ // Class instance gone? (if not static function)
+ if (state.instance && !instances_list.in_list()) {
return false;
}
}
@@ -1849,19 +1861,26 @@ bool GDScriptFunctionState::is_valid(bool p_extended_check) const {
Variant GDScriptFunctionState::resume(const Variant &p_arg) {
ERR_FAIL_COND_V(!function, Variant());
- if (state.instance_id.is_valid() && !ObjectDB::get_instance(state.instance_id)) {
+ {
+ MutexLock lock(GDScriptLanguage::singleton->lock);
+
+ if (!scripts_list.in_list()) {
#ifdef DEBUG_ENABLED
- ERR_FAIL_V_MSG(Variant(), "Resumed function '" + String(function->get_name()) + "()' after yield, but class instance is gone. At script: " + state.script_path + ":" + itos(state.line));
+ ERR_FAIL_V_MSG(Variant(), "Resumed function '" + state.function_name + "()' after yield, but script is gone. At script: " + state.script_path + ":" + itos(state.line));
#else
- return Variant();
+ return Variant();
#endif
- }
- if (!ObjectDB::get_instance(state.script_id)) {
+ }
+ if (state.instance && !instances_list.in_list()) {
#ifdef DEBUG_ENABLED
- ERR_FAIL_V_MSG(Variant(), "Resumed function '" + String(function->get_name()) + "()' after yield, but script is gone. At script: " + state.script_path + ":" + itos(state.line));
+ ERR_FAIL_V_MSG(Variant(), "Resumed function '" + state.function_name + "()' after yield, but class instance is gone. At script: " + state.script_path + ":" + itos(state.line));
#else
- return Variant();
+ return Variant();
#endif
+ }
+ // Do these now to avoid locking again after the call
+ scripts_list.remove_from_list();
+ instances_list.remove_from_list();
}
state.result = p_arg;
@@ -1884,6 +1903,8 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) {
state.result = Variant();
if (completed) {
+ _clear_stack();
+
if (first_state.is_valid()) {
first_state->emit_signal("completed", ret);
} else {
@@ -1893,18 +1914,22 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) {
#ifdef DEBUG_ENABLED
if (EngineDebugger::is_active())
GDScriptLanguage::get_singleton()->exit_function();
- if (state.stack_size) {
- //free stack
- Variant *stack = (Variant *)state.stack.ptr();
- for (int i = 0; i < state.stack_size; i++)
- stack[i].~Variant();
- }
#endif
}
return ret;
}
+void GDScriptFunctionState::_clear_stack() {
+
+ if (state.stack_size) {
+ Variant *stack = (Variant *)state.stack.ptr();
+ for (int i = 0; i < state.stack_size; i++)
+ stack[i].~Variant();
+ state.stack_size = 0;
+ }
+}
+
void GDScriptFunctionState::_bind_methods() {
ClassDB::bind_method(D_METHOD("resume", "arg"), &GDScriptFunctionState::resume, DEFVAL(Variant()));
@@ -1914,18 +1939,20 @@ void GDScriptFunctionState::_bind_methods() {
ADD_SIGNAL(MethodInfo("completed", PropertyInfo(Variant::NIL, "result", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT)));
}
-GDScriptFunctionState::GDScriptFunctionState() {
+GDScriptFunctionState::GDScriptFunctionState() :
+ scripts_list(this),
+ instances_list(this) {
function = nullptr;
}
GDScriptFunctionState::~GDScriptFunctionState() {
- if (function != nullptr) {
- //never called, deinitialize stack
- for (int i = 0; i < state.stack_size; i++) {
- Variant *v = (Variant *)&state.stack[sizeof(Variant) * i];
- v->~Variant();
- }
+ _clear_stack();
+
+ {
+ MutexLock lock(GDScriptLanguage::singleton->lock);
+ scripts_list.remove_from_list();
+ instances_list.remove_from_list();
}
}
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index 9d8e23d994..d38b6d0739 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -293,11 +293,12 @@ private:
public:
struct CallState {
- ObjectID script_id;
+ GDScript *script;
+ GDScriptInstance *instance;
#ifdef DEBUG_ENABLED
+ StringName function_name;
String script_path;
#endif
- ObjectID instance_id;
Vector<uint8_t> stack;
int stack_size;
Variant self;
@@ -357,12 +358,18 @@ class GDScriptFunctionState : public Reference {
Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Ref<GDScriptFunctionState> first_state;
+ SelfList<GDScriptFunctionState> scripts_list;
+ SelfList<GDScriptFunctionState> instances_list;
+
protected:
static void _bind_methods();
public:
bool is_valid(bool p_extended_check = false) const;
Variant resume(const Variant &p_arg = Variant());
+
+ void _clear_stack();
+
GDScriptFunctionState();
~GDScriptFunctionState();
};
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index 0199af642f..85a5d86ca0 100644
--- a/modules/gdscript/gdscript_functions.cpp
+++ b/modules/gdscript/gdscript_functions.cpp
@@ -1199,6 +1199,11 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
}
r_ret = gdscr->_new(nullptr, -1 /*skip initializer*/, r_error);
+ if (r_error.error != Callable::CallError::CALL_OK) {
+ r_ret = Variant();
+ return;
+ }
+
GDScriptInstance *ins = static_cast<GDScriptInstance *>(static_cast<Object *>(r_ret)->get_script_instance());
Ref<GDScript> gd_ref = ins->get_script();
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index c20d517ff6..c875846fcc 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -2734,6 +2734,7 @@ void GDScriptParser::_transform_match_statment(MatchNode *p_match_statement) {
IdentifierNode *id2 = alloc_node<IdentifierNode>();
id2->name = local_var->name;
+ id2->datatype = local_var->datatype;
id2->declared_block = branch->body;
id2->set_datatype(local_var->assign->get_datatype());
@@ -4960,6 +4961,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
IdentifierNode *id = alloc_node<IdentifierNode>();
id->name = member.identifier;
+ id->datatype = member.data_type;
OperatorNode *op = alloc_node<OperatorNode>();
op->op = OperatorNode::OP_INIT_ASSIGN;
@@ -5002,6 +5004,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
IdentifierNode *id = alloc_node<IdentifierNode>();
id->name = member.identifier;
+ id->datatype = member.data_type;
OperatorNode *op = alloc_node<OperatorNode>();
op->op = OperatorNode::OP_INIT_ASSIGN;
@@ -6647,6 +6650,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
IdentifierNode *id = alloc_node<IdentifierNode>();
id->name = cn->value.operator StringName();
+ id->datatype = cn->datatype;
op->op = OperatorNode::OP_INDEX_NAMED;
op->arguments.write[1] = id;
@@ -7571,6 +7575,10 @@ GDScriptParser::DataType GDScriptParser::_reduce_identifier_type(const DataType
}
if (_get_member_type(base_type, p_identifier, member_type)) {
+ if (!p_base_type && current_function && current_function->_static) {
+ _set_error("Can't access member variable (\"" + p_identifier.operator String() + "\") from a static function.", p_line);
+ return DataType();
+ }
return member_type;
}
@@ -8571,7 +8579,13 @@ Error GDScriptParser::_parse(const String &p_base_path) {
_set_error("Parse error: " + tokenizer->get_token_error());
}
- if (error_set && !for_completion) {
+ bool for_completion_error_set = false;
+ if (error_set && for_completion) {
+ for_completion_error_set = true;
+ error_set = false;
+ }
+
+ if (error_set) {
return ERR_PARSE_ERROR;
}
@@ -8601,6 +8615,10 @@ Error GDScriptParser::_parse(const String &p_base_path) {
// Resolve the function blocks
_check_class_blocks_types(main_class);
+ if (for_completion_error_set) {
+ error_set = true;
+ }
+
if (error_set) {
return ERR_PARSE_ERROR;
}
diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp
index d42ca52731..76f42ead5f 100644
--- a/modules/gdscript/gdscript_tokenizer.cpp
+++ b/modules/gdscript/gdscript_tokenizer.cpp
@@ -803,19 +803,16 @@ void GDScriptTokenizerText::_advance() {
switch (next) {
- case 'a': res = 7; break;
- case 'b': res = 8; break;
- case 't': res = 9; break;
- case 'n': res = 10; break;
- case 'v': res = 11; break;
- case 'f': res = 12; break;
- case 'r': res = 13; break;
+ case 'a': res = '\a'; break;
+ case 'b': res = '\b'; break;
+ case 't': res = '\t'; break;
+ case 'n': res = '\n'; break;
+ case 'v': res = '\v'; break;
+ case 'f': res = '\f'; break;
+ case 'r': res = '\r'; break;
case '\'': res = '\''; break;
case '\"': res = '\"'; break;
case '\\': res = '\\'; break;
- case '/':
- res = '/';
- break; //wtf
case 'u': {
// hex number
@@ -847,6 +844,10 @@ void GDScriptTokenizerText::_advance() {
i += 3;
} break;
+ case '\n': {
+ line++;
+ column = 1;
+ } break;
default: {
_make_error("Invalid escape sequence");
@@ -854,7 +855,8 @@ void GDScriptTokenizerText::_advance() {
} break;
}
- str += res;
+ if (next != '\n')
+ str += res;
} else {
if (CharType(GETCHAR(i)) == '\n') {
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index df7c2f397f..0dbefbb39f 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -80,7 +80,7 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) {
RS::get_singleton()->get_singleton()->instance_set_base(bm.instance, bm.mesh->get_rid());
RS::get_singleton()->instance_attach_object_instance_id(bm.instance, get_instance_id());
if (is_inside_tree()) {
- RS::get_singleton()->instance_set_scenario(bm.instance, get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(bm.instance, get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_transform(bm.instance, get_global_transform());
}
baked_meshes.push_back(bm);
@@ -536,7 +536,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
RS::get_singleton()->instance_set_base(instance, mm);
if (is_inside_tree()) {
- RS::get_singleton()->instance_set_scenario(instance, get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(instance, get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_transform(instance, get_global_transform());
}
@@ -577,15 +577,15 @@ void GridMap::_octant_enter_world(const OctantKey &p_key) {
ERR_FAIL_COND(!octant_map.has(p_key));
Octant &g = *octant_map[p_key];
PhysicsServer3D::get_singleton()->body_set_state(g.static_body, PhysicsServer3D::BODY_STATE_TRANSFORM, get_global_transform());
- PhysicsServer3D::get_singleton()->body_set_space(g.static_body, get_world()->get_space());
+ PhysicsServer3D::get_singleton()->body_set_space(g.static_body, get_world_3d()->get_space());
if (g.collision_debug_instance.is_valid()) {
- RS::get_singleton()->instance_set_scenario(g.collision_debug_instance, get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(g.collision_debug_instance, get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_transform(g.collision_debug_instance, get_global_transform());
}
for (int i = 0; i < g.multimesh_instances.size(); i++) {
- RS::get_singleton()->instance_set_scenario(g.multimesh_instances[i].instance, get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(g.multimesh_instances[i].instance, get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_transform(g.multimesh_instances[i].instance, get_global_transform());
}
@@ -684,7 +684,7 @@ void GridMap::_notification(int p_what) {
}
for (int i = 0; i < baked_meshes.size(); i++) {
- RS::get_singleton()->instance_set_scenario(baked_meshes[i].instance, get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(baked_meshes[i].instance, get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_transform(baked_meshes[i].instance, get_global_transform());
}
@@ -1054,7 +1054,7 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe
RS::get_singleton()->get_singleton()->instance_set_base(bm.instance, bm.mesh->get_rid());
RS::get_singleton()->instance_attach_object_instance_id(bm.instance, get_instance_id());
if (is_inside_tree()) {
- RS::get_singleton()->instance_set_scenario(bm.instance, get_world()->get_scenario());
+ RS::get_singleton()->instance_set_scenario(bm.instance, get_world_3d()->get_scenario());
RS::get_singleton()->instance_set_transform(bm.instance, get_global_transform());
}
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 9c3101945a..b0c2c75c19 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -385,7 +385,7 @@ bool GridMapEditor::do_input_action(Camera3D *p_camera, const Point2 &p_point, b
Plane p;
p.normal[edit_axis] = 1.0;
- p.d = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
+ p.distance = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
Vector3 inters;
if (!p.intersects_segment(from, from + normal * settings_pick_distance->get_value(), &inters))
@@ -556,7 +556,7 @@ void GridMapEditor::_set_clipboard_data() {
item.cell_item = itm;
item.grid_offset = Vector3(i, j, k) - selection.begin;
item.orientation = node->get_cell_item_orientation(i, j, k);
- item.instance = RenderingServer::get_singleton()->instance_create2(mesh->get_rid(), get_tree()->get_root()->get_world()->get_scenario());
+ item.instance = RenderingServer::get_singleton()->instance_create2(mesh->get_rid(), get_tree()->get_root()->get_world_3d()->get_scenario());
clipboard_items.push_back(item);
}
@@ -1083,12 +1083,12 @@ void GridMapEditor::_notification(int p_what) {
for (int i = 0; i < 3; i++) {
grid[i] = RS::get_singleton()->mesh_create();
- grid_instance[i] = RS::get_singleton()->instance_create2(grid[i], get_tree()->get_root()->get_world()->get_scenario());
- selection_level_instance[i] = RenderingServer::get_singleton()->instance_create2(selection_level_mesh[i], get_tree()->get_root()->get_world()->get_scenario());
+ grid_instance[i] = RS::get_singleton()->instance_create2(grid[i], get_tree()->get_root()->get_world_3d()->get_scenario());
+ selection_level_instance[i] = RenderingServer::get_singleton()->instance_create2(selection_level_mesh[i], get_tree()->get_root()->get_world_3d()->get_scenario());
}
- selection_instance = RenderingServer::get_singleton()->instance_create2(selection_mesh, get_tree()->get_root()->get_world()->get_scenario());
- paste_instance = RenderingServer::get_singleton()->instance_create2(paste_mesh, get_tree()->get_root()->get_world()->get_scenario());
+ selection_instance = RenderingServer::get_singleton()->instance_create2(selection_mesh, get_tree()->get_root()->get_world_3d()->get_scenario());
+ paste_instance = RenderingServer::get_singleton()->instance_create2(paste_mesh, get_tree()->get_root()->get_world_3d()->get_scenario());
_update_selection_transform();
_update_paste_indicator();
@@ -1137,7 +1137,7 @@ void GridMapEditor::_notification(int p_what) {
Plane p;
p.normal[edit_axis] = 1.0;
- p.d = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
+ p.distance = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
p = node->get_transform().xform(p); // plane to snap
Node3DEditorPlugin *sep = Object::cast_to<Node3DEditorPlugin>(editor->get_editor_plugin_screen());
@@ -1168,7 +1168,7 @@ void GridMapEditor::_update_cursor_instance() {
Ref<Mesh> mesh = node->get_mesh_library()->get_item_mesh(selected_palette);
if (!mesh.is_null() && mesh->get_rid().is_valid()) {
- cursor_instance = RenderingServer::get_singleton()->instance_create2(mesh->get_rid(), get_tree()->get_root()->get_world()->get_scenario());
+ cursor_instance = RenderingServer::get_singleton()->instance_create2(mesh->get_rid(), get_tree()->get_root()->get_world_3d()->get_scenario());
RenderingServer::get_singleton()->instance_set_transform(cursor_instance, cursor_transform);
}
}
diff --git a/modules/mono/build_scripts/godot_tools_build.py b/modules/mono/build_scripts/godot_tools_build.py
index cffacf2577..8e77f3bb44 100644
--- a/modules/mono/build_scripts/godot_tools_build.py
+++ b/modules/mono/build_scripts/godot_tools_build.py
@@ -13,13 +13,9 @@ def build_godot_tools(source, target, env):
solution_path = os.path.join(module_dir, "editor/GodotTools/GodotTools.sln")
build_config = "Debug" if env["target"] == "debug" else "Release"
- # Custom build target to make sure output is always copied to the data dir.
- extra_build_args = ["/Target:Build;GodotTools:BuildAlwaysCopyToDataDir"]
+ from .solution_builder import build_solution
- from .solution_builder import build_solution, nuget_restore
-
- nuget_restore(env, solution_path)
- build_solution(env, solution_path, build_config, extra_build_args)
+ build_solution(env, solution_path, build_config, restore=True)
# No need to copy targets. The GodotTools csproj takes care of copying them.
diff --git a/modules/mono/build_scripts/solution_builder.py b/modules/mono/build_scripts/solution_builder.py
index db6b4ff7aa..e8ddb7114e 100644
--- a/modules/mono/build_scripts/solution_builder.py
+++ b/modules/mono/build_scripts/solution_builder.py
@@ -4,91 +4,19 @@ import os
verbose = False
-def find_nuget_unix():
- import os
-
- if "NUGET_PATH" in os.environ:
- hint_path = os.environ["NUGET_PATH"]
- if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
- return hint_path
- hint_path = os.path.join(hint_path, "nuget")
- if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
- return hint_path
-
- import os.path
- import sys
-
- hint_dirs = ["/opt/novell/mono/bin"]
- if sys.platform == "darwin":
- hint_dirs = [
- "/Library/Frameworks/Mono.framework/Versions/Current/bin",
- "/usr/local/var/homebrew/linked/mono/bin",
- ] + hint_dirs
-
- for hint_dir in hint_dirs:
- hint_path = os.path.join(hint_dir, "nuget")
- if os.path.isfile(hint_path):
- return hint_path
- elif os.path.isfile(hint_path + ".exe"):
- return hint_path + ".exe"
-
- for hint_dir in os.environ["PATH"].split(os.pathsep):
- hint_dir = hint_dir.strip('"')
- hint_path = os.path.join(hint_dir, "nuget")
- if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
- return hint_path
- if os.path.isfile(hint_path + ".exe") and os.access(hint_path + ".exe", os.X_OK):
- return hint_path + ".exe"
-
- return None
-
-
-def find_nuget_windows(env):
- import os
-
- if "NUGET_PATH" in os.environ:
- hint_path = os.environ["NUGET_PATH"]
- if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
- return hint_path
- hint_path = os.path.join(hint_path, "nuget.exe")
- if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
- return hint_path
-
- from .mono_reg_utils import find_mono_root_dir
-
- mono_root = env["mono_prefix"] or find_mono_root_dir(env["bits"])
-
- if mono_root:
- mono_bin_dir = os.path.join(mono_root, "bin")
- nuget_mono = os.path.join(mono_bin_dir, "nuget.bat")
-
- if os.path.isfile(nuget_mono):
- return nuget_mono
-
- # Standalone NuGet
-
- for hint_dir in os.environ["PATH"].split(os.pathsep):
- hint_dir = hint_dir.strip('"')
- hint_path = os.path.join(hint_dir, "nuget.exe")
- if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
- return hint_path
-
- return None
-
-
def find_msbuild_unix(filename):
import os.path
import sys
- hint_dirs = ["/opt/novell/mono/bin"]
+ hint_dirs = []
if sys.platform == "darwin":
- hint_dirs = [
+ hint_dirs[:0] = [
"/Library/Frameworks/Mono.framework/Versions/Current/bin",
"/usr/local/var/homebrew/linked/mono/bin",
- ] + hint_dirs
+ ]
for hint_dir in hint_dirs:
- hint_path = os.path.join(hint_dir, filename)
+ hint_path = os.path.join(hint_dir, "msbuild")
if os.path.isfile(hint_path):
return hint_path
elif os.path.isfile(hint_path + ".exe"):
@@ -96,7 +24,7 @@ def find_msbuild_unix(filename):
for hint_dir in os.environ["PATH"].split(os.pathsep):
hint_dir = hint_dir.strip('"')
- hint_path = os.path.join(hint_dir, filename)
+ hint_path = os.path.join(hint_dir, "msbuild")
if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
return hint_path
if os.path.isfile(hint_path + ".exe") and os.access(hint_path + ".exe", os.X_OK):
@@ -162,18 +90,11 @@ def nuget_restore(env, *args):
global verbose
verbose = env["verbose"]
- # Find NuGet
- nuget_path = find_nuget_windows(env) if os.name == "nt" else find_nuget_unix()
- if nuget_path is None:
- raise RuntimeError("Cannot find NuGet executable")
-
- print("NuGet path: " + nuget_path)
-
# Do NuGet restore
run_command(nuget_path, ["restore"] + list(args), name="nuget restore")
-def build_solution(env, solution_path, build_config, extra_msbuild_args=[]):
+def build_solution(env, solution_path, build_config, extra_msbuild_args=[], restore=False):
global verbose
verbose = env["verbose"]
@@ -193,28 +114,17 @@ def build_solution(env, solution_path, build_config, extra_msbuild_args=[]):
else:
msbuild_path = find_msbuild_unix("msbuild")
if msbuild_path is None:
- xbuild_fallback = env["xbuild_fallback"]
-
- if xbuild_fallback and os.name == "nt":
- print("Option 'xbuild_fallback' not supported on Windows")
- xbuild_fallback = False
-
- if xbuild_fallback:
- print("Cannot find MSBuild executable, trying with xbuild")
- print("Warning: xbuild is deprecated")
-
- msbuild_path = find_msbuild_unix("xbuild")
-
- if msbuild_path is None:
- raise RuntimeError("Cannot find xbuild executable")
- else:
- raise RuntimeError("Cannot find MSBuild executable")
+ raise RuntimeError("Cannot find MSBuild executable")
print("MSBuild path: " + msbuild_path)
# Build solution
- msbuild_args = [solution_path, "/p:Configuration=" + build_config]
+ targets = ["Build"]
+ if restore:
+ targets.insert(0, "Restore")
+
+ msbuild_args = [solution_path, "/t:%s" % ",".join(targets), "/p:Configuration=" + build_config]
msbuild_args += extra_msbuild_args
run_command(msbuild_path, msbuild_args, env_override=msbuild_env, name="msbuild")
diff --git a/modules/mono/config.py b/modules/mono/config.py
index 106ca6e028..d41f3755b5 100644
--- a/modules/mono/config.py
+++ b/modules/mono/config.py
@@ -35,7 +35,6 @@ def configure(env):
"copy_mono_root", "Make a copy of the mono installation directory to bundle with the editor", False
)
)
- envvars.Add(BoolVariable("xbuild_fallback", "If MSBuild is not found, fallback to xbuild", False))
# TODO: It would be great if this could be detected automatically instead
envvars.Add(
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index f5911275c9..6c1c8b87ef 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -850,7 +850,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
to_reload.push_back(script);
if (script->get_path().empty()) {
- script->tied_class_name_for_reload = script->script_class->get_name();
+ script->tied_class_name_for_reload = script->script_class->get_name_for_lookup();
script->tied_class_namespace_for_reload = script->script_class->get_namespace();
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotTools.csproj b/modules/mono/editor/GodotTools/GodotTools/GodotTools.csproj
index ac9379adf8..e1570d6465 100644
--- a/modules/mono/editor/GodotTools/GodotTools/GodotTools.csproj
+++ b/modules/mono/editor/GodotTools/GodotTools/GodotTools.csproj
@@ -8,16 +8,21 @@
<RootNamespace>GodotTools</RootNamespace>
<AssemblyName>GodotTools</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
- <GodotSourceRootPath>$(SolutionDir)/../../../../</GodotSourceRootPath>
- <DataDirToolsOutputPath>$(GodotSourceRootPath)/bin/GodotSharp/Tools</DataDirToolsOutputPath>
- <GodotApiConfiguration>Debug</GodotApiConfiguration>
<LangVersion>7</LangVersion>
+ <GodotApiConfiguration>Debug</GodotApiConfiguration> <!-- The Godot editor uses the Debug Godot API assemblies -->
+ <GodotSourceRootPath>$(SolutionDir)/../../../../</GodotSourceRootPath>
+ <GodotOutputDataDir>$(GodotSourceRootPath)/bin/GodotSharp</GodotOutputDataDir>
+ <GodotApiAssembliesDir>$(GodotOutputDataDir)/Api/$(GodotApiConfiguration)</GodotApiAssembliesDir>
+ </PropertyGroup>
+ <PropertyGroup Condition=" Exists('$(GodotApiAssembliesDir)/GodotSharp.dll') ">
+ <!-- The project is part of the Godot source tree -->
+ <!-- Use the Godot source tree output folder instead of '$(ProjectDir)/bin' -->
+ <OutputPath>$(GodotOutputDataDir)/Tools</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -25,7 +30,6 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
@@ -41,11 +45,11 @@
</Reference>
<Reference Include="System" />
<Reference Include="GodotSharp">
- <HintPath>$(GodotSourceRootPath)/bin/GodotSharp/Api/$(GodotApiConfiguration)/GodotSharp.dll</HintPath>
+ <HintPath>$(GodotApiAssembliesDir)/GodotSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="GodotSharpEditor">
- <HintPath>$(GodotSourceRootPath)/bin/GodotSharp/Api/$(GodotApiConfiguration)/GodotSharpEditor.dll</HintPath>
+ <HintPath>$(GodotApiAssembliesDir)/GodotSharpEditor.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
@@ -103,21 +107,5 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
- <Target Name="CopyToDataDir" AfterTargets="Build">
- <ItemGroup>
- <GodotToolsCopy Include="$(OutputPath)\GodotTools*.dll" />
- <GodotToolsCopy Include="$(OutputPath)\Newtonsoft.Json.dll" />
- <GodotToolsCopy Include="$(OutputPath)\DotNet.Glob.dll" />
- </ItemGroup>
- <ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
- <GodotToolsCopy Include="$(OutputPath)\GodotTools*.pdb" />
- </ItemGroup>
- <Copy SourceFiles="@(GodotToolsCopy)" DestinationFolder="$(DataDirToolsOutputPath)" ContinueOnError="false" />
- </Target>
- <Target Name="BuildAlwaysCopyToDataDir">
- <!-- Custom target run by SCons to make sure the CopyToDataDir target is always executed, without having to use DisableFastUpToDateCheck -->
- <CallTarget Targets="Build" />
- <CallTarget Targets="CopyToDataDir" />
- </Target>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
index facaf74606..6030b72a44 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
@@ -420,7 +420,7 @@ namespace Godot
return txt;
}
- // Constructors
+ // Constructors
public Color(float r, float g, float b, float a = 1.0f)
{
this.r = r;
@@ -429,6 +429,14 @@ namespace Godot
this.a = a;
}
+ public Color(Color c, float a = 1.0f)
+ {
+ r = c.r;
+ g = c.g;
+ b = c.b;
+ this.a = a;
+ }
+
public Color(uint rgba)
{
a = (rgba & 0xFF) / 255.0f;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
index 885845e3a4..55a83642fd 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
@@ -56,29 +56,29 @@ namespace Godot
}
}
- public real_t D { get; set; }
+ public real_t Distance { get; set; }
public Vector3 Center
{
get
{
- return _normal * D;
+ return _normal * Distance;
}
}
public real_t DistanceTo(Vector3 point)
{
- return _normal.Dot(point) - D;
+ return _normal.Dot(point) - Distance;
}
public Vector3 GetAnyPoint()
{
- return _normal * D;
+ return _normal * Distance;
}
public bool HasPoint(Vector3 point, real_t epsilon = Mathf.Epsilon)
{
- real_t dist = _normal.Dot(point) - D;
+ real_t dist = _normal.Dot(point) - Distance;
return Mathf.Abs(dist) <= epsilon;
}
@@ -89,9 +89,9 @@ namespace Godot
if (Mathf.IsZeroApprox(denom))
return null;
- Vector3 result = b._normal.Cross(c._normal) * D +
- c._normal.Cross(_normal) * b.D +
- _normal.Cross(b._normal) * c.D;
+ Vector3 result = b._normal.Cross(c._normal) * Distance +
+ c._normal.Cross(_normal) * b.Distance +
+ _normal.Cross(b._normal) * c.Distance;
return result / denom;
}
@@ -103,7 +103,7 @@ namespace Godot
if (Mathf.IsZeroApprox(den))
return null;
- real_t dist = (_normal.Dot(from) - D) / den;
+ real_t dist = (_normal.Dot(from) - Distance) / den;
// This is a ray, before the emitting pos (from) does not exist
if (dist > Mathf.Epsilon)
@@ -120,7 +120,7 @@ namespace Godot
if (Mathf.IsZeroApprox(den))
return null;
- real_t dist = (_normal.Dot(begin) - D) / den;
+ real_t dist = (_normal.Dot(begin) - Distance) / den;
// Only allow dist to be in the range of 0 to 1, with tolerance.
if (dist < -Mathf.Epsilon || dist > 1.0f + Mathf.Epsilon)
@@ -131,7 +131,7 @@ namespace Godot
public bool IsPointOver(Vector3 point)
{
- return _normal.Dot(point) > D;
+ return _normal.Dot(point) > Distance;
}
public Plane Normalized()
@@ -141,7 +141,7 @@ namespace Godot
if (len == 0)
return new Plane(0, 0, 0, 0);
- return new Plane(_normal / len, D / len);
+ return new Plane(_normal / len, Distance / len);
}
public Vector3 Project(Vector3 point)
@@ -159,27 +159,27 @@ namespace Godot
public static Plane PlaneXY { get { return _planeXY; } }
// Constructors
- public Plane(real_t a, real_t b, real_t c, real_t d)
+ public Plane(real_t a, real_t b, real_t c, real_t distance)
{
_normal = new Vector3(a, b, c);
- this.D = d;
+ this.Distance = distance;
}
- public Plane(Vector3 normal, real_t d)
+ public Plane(Vector3 normal, real_t distance)
{
this._normal = normal;
- this.D = d;
+ this.Distance = distance;
}
public Plane(Vector3 v1, Vector3 v2, Vector3 v3)
{
_normal = (v1 - v3).Cross(v1 - v2);
_normal.Normalize();
- D = _normal.Dot(v1);
+ Distance = _normal.Dot(v1);
}
public static Plane operator -(Plane plane)
{
- return new Plane(-plane._normal, -plane.D);
+ return new Plane(-plane._normal, -plane.Distance);
}
public static bool operator ==(Plane left, Plane right)
@@ -204,17 +204,17 @@ namespace Godot
public bool Equals(Plane other)
{
- return _normal == other._normal && D == other.D;
+ return _normal == other._normal && Distance == other.Distance;
}
public bool IsEqualApprox(Plane other)
{
- return _normal.IsEqualApprox(other._normal) && Mathf.IsEqualApprox(D, other.D);
+ return _normal.IsEqualApprox(other._normal) && Mathf.IsEqualApprox(Distance, other.Distance);
}
public override int GetHashCode()
{
- return _normal.GetHashCode() ^ D.GetHashCode();
+ return _normal.GetHashCode() ^ Distance.GetHashCode();
}
public override string ToString()
@@ -222,7 +222,7 @@ namespace Godot
return String.Format("({0}, {1})", new object[]
{
_normal.ToString(),
- D.ToString()
+ Distance.ToString()
});
}
@@ -231,7 +231,7 @@ namespace Godot
return String.Format("({0}, {1})", new object[]
{
_normal.ToString(format),
- D.ToString(format)
+ Distance.ToString(format)
});
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
index 099eacd7dd..41b4e9367f 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
@@ -12,7 +12,7 @@ namespace Godot
{
private static int GetSliceCount(this string instance, string splitter)
{
- if (instance.Empty() || splitter.Empty())
+ if (string.IsNullOrEmpty(instance) || string.IsNullOrEmpty(splitter))
return 0;
int pos = 0;
@@ -29,7 +29,7 @@ namespace Godot
private static string GetSliceCharacter(this string instance, char splitter, int slice)
{
- if (!instance.Empty() && slice >= 0)
+ if (!string.IsNullOrEmpty(instance) && slice >= 0)
{
int i = 0;
int prev = 0;
@@ -237,10 +237,10 @@ namespace Godot
// </summary>
public static int CompareTo(this string instance, string to, bool caseSensitive = true)
{
- if (instance.Empty())
- return to.Empty() ? 0 : -1;
+ if (string.IsNullOrEmpty(instance))
+ return string.IsNullOrEmpty(to) ? 0 : -1;
- if (to.Empty())
+ if (string.IsNullOrEmpty(to))
return 1;
int instanceIndex = 0;
@@ -287,14 +287,6 @@ namespace Godot
}
// <summary>
- // Return true if the string is empty.
- // </summary>
- public static bool Empty(this string instance)
- {
- return string.IsNullOrEmpty(instance);
- }
-
- // <summary>
// Return true if the strings ends with the given string.
// </summary>
public static bool EndsWith(this string instance, string text)
diff --git a/modules/mono/mono_gd/gd_mono_class.cpp b/modules/mono/mono_gd/gd_mono_class.cpp
index 2c65f7e3a0..9dabb4ec4c 100644
--- a/modules/mono/mono_gd/gd_mono_class.cpp
+++ b/modules/mono/mono_gd/gd_mono_class.cpp
@@ -79,12 +79,26 @@ bool GDMonoClass::is_assignable_from(GDMonoClass *p_from) const {
return mono_class_is_assignable_from(mono_class, p_from->mono_class);
}
-GDMonoClass *GDMonoClass::get_parent_class() {
+StringName GDMonoClass::get_namespace() const {
+ GDMonoClass *nesting_class = get_nesting_class();
+ if (!nesting_class)
+ return namespace_name;
+ return nesting_class->get_namespace();
+}
+
+String GDMonoClass::get_name_for_lookup() const {
+ GDMonoClass *nesting_class = get_nesting_class();
+ if (!nesting_class)
+ return class_name;
+ return nesting_class->get_name_for_lookup() + "/" + class_name;
+}
+
+GDMonoClass *GDMonoClass::get_parent_class() const {
MonoClass *parent_mono_class = mono_class_get_parent(mono_class);
return parent_mono_class ? GDMono::get_singleton()->get_class(parent_mono_class) : nullptr;
}
-GDMonoClass *GDMonoClass::get_nesting_class() {
+GDMonoClass *GDMonoClass::get_nesting_class() const {
MonoClass *nesting_type = mono_class_get_nesting_type(mono_class);
return nesting_type ? GDMono::get_singleton()->get_class(nesting_type) : nullptr;
}
diff --git a/modules/mono/mono_gd/gd_mono_class.h b/modules/mono/mono_gd/gd_mono_class.h
index 9237aae057..44b146b87c 100644
--- a/modules/mono/mono_gd/gd_mono_class.h
+++ b/modules/mono/mono_gd/gd_mono_class.h
@@ -113,14 +113,15 @@ public:
bool is_assignable_from(GDMonoClass *p_from) const;
- _FORCE_INLINE_ StringName get_namespace() const { return namespace_name; }
+ StringName get_namespace() const;
_FORCE_INLINE_ StringName get_name() const { return class_name; }
+ String get_name_for_lookup() const;
_FORCE_INLINE_ MonoClass *get_mono_ptr() const { return mono_class; }
_FORCE_INLINE_ const GDMonoAssembly *get_assembly() const { return assembly; }
- GDMonoClass *get_parent_class();
- GDMonoClass *get_nesting_class();
+ GDMonoClass *get_parent_class() const;
+ GDMonoClass *get_nesting_class() const;
#ifdef TOOLS_ENABLED
Vector<MonoClassField *> get_enum_fields();
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index f2d887e6d6..fd645f1608 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -274,7 +274,7 @@ enum {
MATCHES_Plane = (MATCHES_Vector3 && MATCHES_real_t && (sizeof(Plane) == (sizeof(Vector3) + sizeof(real_t))) &&
offsetof(Plane, normal) == 0 &&
- offsetof(Plane, d) == sizeof(Vector3))
+ offsetof(Plane, distance) == sizeof(Vector3))
};
// In the future we may force this if we want to ref return these structs
@@ -466,14 +466,14 @@ struct M_Color {
struct M_Plane {
M_Vector3 normal;
- real_t d;
+ real_t distance;
static _FORCE_INLINE_ Plane convert_to(const M_Plane &p_from) {
- return Plane(M_Vector3::convert_to(p_from.normal), p_from.d);
+ return Plane(M_Vector3::convert_to(p_from.normal), p_from.distance);
}
static _FORCE_INLINE_ M_Plane convert_from(const Plane &p_from) {
- M_Plane ret = { M_Vector3::convert_from(p_from.normal), p_from.d };
+ M_Plane ret = { M_Vector3::convert_from(p_from.normal), p_from.distance };
return ret;
}
};
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
index bf0d1c6273..957f6223a9 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
@@ -30,6 +30,13 @@
package org.godotengine.godot;
+import org.godotengine.godot.input.GodotEditText;
+import org.godotengine.godot.plugin.GodotPlugin;
+import org.godotengine.godot.plugin.GodotPluginRegistry;
+import org.godotengine.godot.utils.GodotNetUtils;
+import org.godotengine.godot.utils.PermissionsUtil;
+import org.godotengine.godot.xr.XRMode;
+
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityManager;
@@ -77,6 +84,7 @@ import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
+
import com.google.android.vending.expansion.downloader.DownloadProgressInfo;
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
import com.google.android.vending.expansion.downloader.DownloaderServiceMarshaller;
@@ -84,6 +92,7 @@ import com.google.android.vending.expansion.downloader.Helpers;
import com.google.android.vending.expansion.downloader.IDownloaderClient;
import com.google.android.vending.expansion.downloader.IDownloaderService;
import com.google.android.vending.expansion.downloader.IStub;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
@@ -91,12 +100,6 @@ import java.security.MessageDigest;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
-import org.godotengine.godot.input.GodotEditText;
-import org.godotengine.godot.plugin.GodotPlugin;
-import org.godotengine.godot.plugin.GodotPluginRegistry;
-import org.godotengine.godot.utils.GodotNetUtils;
-import org.godotengine.godot.utils.PermissionsUtil;
-import org.godotengine.godot.xr.XRMode;
public abstract class Godot extends FragmentActivity implements SensorEventListener, IDownloaderClient {
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java b/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java
index 1fb242d0bc..fa95e82e7a 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java
@@ -35,6 +35,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.util.Log;
+
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
/**
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java b/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java
index 7e74e8a80d..434da95bc0 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java
@@ -33,6 +33,7 @@ package org.godotengine.godot;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
+
import com.google.android.vending.expansion.downloader.impl.DownloaderService;
/**
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java b/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java
index 9be93243b8..5d8ac09643 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java
@@ -29,13 +29,7 @@
/*************************************************************************/
package org.godotengine.godot;
-import android.annotation.SuppressLint;
-import android.graphics.PixelFormat;
-import android.opengl.GLSurfaceView;
-import android.view.GestureDetector;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.SurfaceView;
+
import org.godotengine.godot.input.GodotGestureHandler;
import org.godotengine.godot.input.GodotInputHandler;
import org.godotengine.godot.utils.GLUtils;
@@ -47,6 +41,14 @@ import org.godotengine.godot.xr.regular.RegularConfigChooser;
import org.godotengine.godot.xr.regular.RegularContextFactory;
import org.godotengine.godot.xr.regular.RegularFallbackConfigChooser;
+import android.annotation.SuppressLint;
+import android.graphics.PixelFormat;
+import android.opengl.GLSurfaceView;
+import android.view.GestureDetector;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.SurfaceView;
+
/**
* A simple GLSurfaceView sub-class that demonstrate how to perform
* OpenGL ES 2.0 rendering into a GL Surface. Note the following important
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
index 016a3a8d18..2eb6f4e313 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
@@ -29,6 +29,9 @@
/*************************************************************************/
package org.godotengine.godot;
+
+import org.godotengine.godot.input.*;
+
import android.content.*;
import android.content.Intent;
import android.content.pm.ActivityInfo;
@@ -39,11 +42,10 @@ import android.os.*;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.SparseArray;
+
import java.io.IOException;
import java.io.InputStream;
import java.util.Locale;
-import org.godotengine.godot.input.*;
-//android.os.Build
// Wrapper for native library
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java b/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
index 71fe822233..9383781150 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
@@ -33,6 +33,7 @@ package org.godotengine.godot;
import android.app.Activity;
import android.hardware.SensorEvent;
import android.view.Surface;
+
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java b/platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java
index 3e5bb4a4c9..39858e5fee 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java
@@ -30,13 +30,15 @@
package org.godotengine.godot;
+import org.godotengine.godot.plugin.GodotPlugin;
+import org.godotengine.godot.plugin.GodotPluginRegistry;
+import org.godotengine.godot.utils.GLUtils;
+
import android.content.Context;
import android.opengl.GLSurfaceView;
+
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
-import org.godotengine.godot.plugin.GodotPlugin;
-import org.godotengine.godot.plugin.GodotPluginRegistry;
-import org.godotengine.godot.utils.GLUtils;
/**
* Godot's renderer implementation.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java b/platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java
index 30197d5729..3a36c512a2 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java
@@ -30,15 +30,16 @@
package org.godotengine.godot;
+import org.godotengine.godot.input.GodotGestureHandler;
+import org.godotengine.godot.input.GodotInputHandler;
+import org.godotengine.godot.vulkan.VkRenderer;
+import org.godotengine.godot.vulkan.VkSurfaceView;
+
import android.annotation.SuppressLint;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.SurfaceView;
-import org.godotengine.godot.input.GodotGestureHandler;
-import org.godotengine.godot.input.GodotInputHandler;
-import org.godotengine.godot.vulkan.VkRenderer;
-import org.godotengine.godot.vulkan.VkSurfaceView;
public class GodotVulkanRenderView extends VkSurfaceView implements GodotRenderView {
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
index 92bb118e44..547c093419 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
@@ -29,6 +29,9 @@
/*************************************************************************/
package org.godotengine.godot.input;
+
+import org.godotengine.godot.*;
+
import android.content.Context;
import android.os.Handler;
import android.os.Message;
@@ -38,8 +41,8 @@ import android.view.KeyEvent;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
+
import java.lang.ref.WeakReference;
-import org.godotengine.godot.*;
public class GodotEditText extends EditText {
// ===========================================================
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.java
index b1e0f66373..0ac82dbfe4 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.java
@@ -30,11 +30,12 @@
package org.godotengine.godot.input;
+import org.godotengine.godot.GodotLib;
+import org.godotengine.godot.GodotRenderView;
+
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
-import org.godotengine.godot.GodotLib;
-import org.godotengine.godot.GodotRenderView;
/**
* Handles gesture input related events for the {@link GodotRenderView} view.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
index 0e4fc65119..cea58f27e6 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
@@ -32,18 +32,20 @@ package org.godotengine.godot.input;
import static org.godotengine.godot.utils.GLUtils.DEBUG;
+import org.godotengine.godot.GodotLib;
+import org.godotengine.godot.GodotRenderView;
+import org.godotengine.godot.input.InputManagerCompat.InputDeviceListener;
+
import android.util.Log;
import android.view.InputDevice;
import android.view.InputDevice.MotionRange;
import android.view.KeyEvent;
import android.view.MotionEvent;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
-import org.godotengine.godot.GodotLib;
-import org.godotengine.godot.GodotRenderView;
-import org.godotengine.godot.input.InputManagerCompat.InputDeviceListener;
/**
* Handles input related events for the {@link GodotRenderView} view.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
index e12ff266bf..9cd08de529 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
@@ -29,6 +29,9 @@
/*************************************************************************/
package org.godotengine.godot.input;
+
+import org.godotengine.godot.*;
+
import android.content.Context;
import android.text.Editable;
import android.text.TextWatcher;
@@ -37,7 +40,6 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
-import org.godotengine.godot.*;
public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListener {
// ===========================================================
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java b/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java
index e4bafa7ff9..3b88609cc9 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java
@@ -23,6 +23,7 @@ import android.os.Build;
import android.os.Handler;
import android.view.InputDevice;
import android.view.MotionEvent;
+
import java.util.HashMap;
import java.util.Map;
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java b/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
index 0c1bdb32aa..1f3fe1e527 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
@@ -31,6 +31,7 @@
package org.godotengine.godot.input;
import android.view.InputDevice.MotionRange;
+
import java.util.ArrayList;
/**
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
index a051164d15..a42bcb28ce 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
@@ -30,6 +30,9 @@
package org.godotengine.godot.plugin;
+import org.godotengine.godot.BuildConfig;
+import org.godotengine.godot.Godot;
+
import android.app.Activity;
import android.content.Intent;
import android.support.annotation.NonNull;
@@ -38,16 +41,16 @@ import android.text.TextUtils;
import android.util.Log;
import android.view.Surface;
import android.view.View;
+
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
+
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
-import org.godotengine.godot.BuildConfig;
-import org.godotengine.godot.Godot;
/**
* Base class for the Godot Android plugins.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java
index e13a9c15d8..7bc8f2c03f 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java
@@ -30,12 +30,15 @@
package org.godotengine.godot.plugin;
+import org.godotengine.godot.Godot;
+
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.Log;
+
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
@@ -43,7 +46,6 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import org.godotengine.godot.Godot;
/**
* Registry used to load and access the registered Godot Android plugins.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java
index f907706889..b940d679f0 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java
@@ -32,6 +32,7 @@ package org.godotengine.godot.plugin;
import android.support.annotation.NonNull;
import android.text.TextUtils;
+
import java.util.Arrays;
/**
diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java b/platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java
index 9d29551f89..291847723c 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/utils/GLUtils.java
@@ -31,6 +31,7 @@
package org.godotengine.godot.utils;
import android.util.Log;
+
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLDisplay;
diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java b/platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java
index 011d426c7e..bb1667afda 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java
@@ -30,10 +30,11 @@
package org.godotengine.godot.utils;
+import org.godotengine.godot.Godot;
+
import android.content.Context;
import android.net.wifi.WifiManager;
import android.util.Log;
-import org.godotengine.godot.Godot;
/**
* This class handles Android-specific networking functions.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java b/platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java
index 7cf32b00fe..4000e63fbe 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java
@@ -30,15 +30,18 @@
package org.godotengine.godot.utils;
+import org.godotengine.godot.Godot;
+
import android.Manifest;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PermissionInfo;
import android.os.Build;
import android.support.v4.content.ContextCompat;
+import android.util.Log;
+
import java.util.ArrayList;
import java.util.List;
-import org.godotengine.godot.Godot;
/**
* This class includes utility functions for Android permissions related operations.
@@ -46,6 +49,8 @@ import org.godotengine.godot.Godot;
*/
public final class PermissionsUtil {
+ private static final String TAG = PermissionsUtil.class.getSimpleName();
+
static final int REQUEST_RECORD_AUDIO_PERMISSION = 1;
static final int REQUEST_CAMERA_PERMISSION = 2;
static final int REQUEST_VIBRATE_PERMISSION = 3;
@@ -113,8 +118,8 @@ public final class PermissionsUtil {
dangerousPermissions.add(manifestPermission);
}
} catch (PackageManager.NameNotFoundException e) {
- e.printStackTrace();
- return false;
+ // Skip this permission and continue.
+ Log.w(TAG, "Unable to identify permission " + manifestPermission, e);
}
}
@@ -153,8 +158,8 @@ public final class PermissionsUtil {
dangerousPermissions.add(manifestPermission);
}
} catch (PackageManager.NameNotFoundException e) {
- e.printStackTrace();
- return new String[0];
+ // Skip this permission and continue.
+ Log.w(TAG, "Unable to identify permission " + manifestPermission, e);
}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrConfigChooser.java b/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrConfigChooser.java
index 9209d6ccf2..c66d75bb2d 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrConfigChooser.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrConfigChooser.java
@@ -32,6 +32,7 @@ package org.godotengine.godot.xr.ovr;
import android.opengl.EGLExt;
import android.opengl.GLSurfaceView;
+
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLDisplay;
diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrContextFactory.java b/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrContextFactory.java
index 36f4416df2..16d4a998f2 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrContextFactory.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrContextFactory.java
@@ -32,6 +32,7 @@ package org.godotengine.godot.xr.ovr;
import android.opengl.EGL14;
import android.opengl.GLSurfaceView;
+
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrWindowSurfaceFactory.java b/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrWindowSurfaceFactory.java
index b2aa130f37..7ca0777f11 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrWindowSurfaceFactory.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/xr/ovr/OvrWindowSurfaceFactory.java
@@ -31,6 +31,7 @@
package org.godotengine.godot.xr.ovr;
import android.opengl.GLSurfaceView;
+
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLDisplay;
diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java
index 8409e37f8f..924d12f0bc 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java
@@ -30,11 +30,13 @@
package org.godotengine.godot.xr.regular;
+import org.godotengine.godot.utils.GLUtils;
+
import android.opengl.GLSurfaceView;
+
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLDisplay;
-import org.godotengine.godot.utils.GLUtils;
/**
* Used to select the egl config for pancake games.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java
index 31cf696195..126f3ad5f5 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java
@@ -30,14 +30,16 @@
package org.godotengine.godot.xr.regular;
+import org.godotengine.godot.GodotLib;
+import org.godotengine.godot.utils.GLUtils;
+
import android.opengl.GLSurfaceView;
import android.util.Log;
+
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
-import org.godotengine.godot.GodotLib;
-import org.godotengine.godot.utils.GLUtils;
/**
* Factory used to setup the opengl context for pancake games.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularFallbackConfigChooser.java b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularFallbackConfigChooser.java
index 71fcf06020..64bc4ac1da 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularFallbackConfigChooser.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularFallbackConfigChooser.java
@@ -30,11 +30,13 @@
package org.godotengine.godot.xr.regular;
+import org.godotengine.godot.utils.GLUtils;
+
import android.util.Log;
+
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLDisplay;
-import org.godotengine.godot.utils.GLUtils;
/* Fallback if 32bit View is not supported*/
public class RegularFallbackConfigChooser extends RegularConfigChooser {
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ConsumeTask.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ConsumeTask.java
index c15bc232ce..31c72fe7f8 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ConsumeTask.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ConsumeTask.java
@@ -33,7 +33,9 @@ package org.godotengine.godot.plugin.payment;
import android.content.Context;
import android.os.AsyncTask;
import android.os.RemoteException;
+
import com.android.vending.billing.IInAppBillingService;
+
import java.lang.ref.WeakReference;
abstract public class ConsumeTask {
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java
index c7d0a5de65..08ade2a18d 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java
@@ -30,16 +30,19 @@
package org.godotengine.godot.plugin.payment;
+import org.godotengine.godot.Dictionary;
+import org.godotengine.godot.Godot;
+import org.godotengine.godot.GodotLib;
+import org.godotengine.godot.plugin.GodotPlugin;
+
import android.content.Intent;
import android.support.annotation.NonNull;
import android.util.Log;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.godotengine.godot.Dictionary;
-import org.godotengine.godot.Godot;
-import org.godotengine.godot.GodotLib;
-import org.godotengine.godot.plugin.GodotPlugin;
+
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/HandlePurchaseTask.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/HandlePurchaseTask.java
index fe5685288b..70a51fcb97 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/HandlePurchaseTask.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/HandlePurchaseTask.java
@@ -32,6 +32,7 @@ package org.godotengine.godot.plugin.payment;
import android.app.Activity;
import android.content.Intent;
+
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PaymentsManager.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PaymentsManager.java
index bded1f452f..0393c0b06e 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PaymentsManager.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PaymentsManager.java
@@ -40,9 +40,12 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
+
import com.android.vending.billing.IInAppBillingService;
+
import java.util.ArrayList;
import java.util.Arrays;
+
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PurchaseTask.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PurchaseTask.java
index eecd1d2151..4894e4020f 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PurchaseTask.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/PurchaseTask.java
@@ -37,6 +37,7 @@ import android.content.IntentSender.SendIntentException;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
+
import com.android.vending.billing.IInAppBillingService;
abstract public class PurchaseTask {
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ReleaseAllConsumablesTask.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ReleaseAllConsumablesTask.java
index b7bd638feb..006688a450 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ReleaseAllConsumablesTask.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ReleaseAllConsumablesTask.java
@@ -34,9 +34,12 @@ import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
+
import com.android.vending.billing.IInAppBillingService;
+
import java.lang.ref.WeakReference;
import java.util.ArrayList;
+
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ValidateTask.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ValidateTask.java
index d42ded0c9b..4ee7b5a0f8 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ValidateTask.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/ValidateTask.java
@@ -30,12 +30,15 @@
package org.godotengine.godot.plugin.payment;
+import org.godotengine.godot.plugin.payment.utils.HttpRequester;
+import org.godotengine.godot.plugin.payment.utils.RequestParams;
+
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.AsyncTask;
+
import java.lang.ref.WeakReference;
-import org.godotengine.godot.plugin.payment.utils.HttpRequester;
-import org.godotengine.godot.plugin.payment.utils.RequestParams;
+
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/CustomSSLSocketFactory.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/CustomSSLSocketFactory.java
index 9571769cd3..55b87b49e5 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/CustomSSLSocketFactory.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/CustomSSLSocketFactory.java
@@ -38,8 +38,10 @@ import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
+
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
+
import org.apache.http.conn.ssl.SSLSocketFactory;
/**
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/HttpRequester.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/HttpRequester.java
index dcb983201e..acd17f10f2 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/HttpRequester.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/HttpRequester.java
@@ -30,9 +30,12 @@
package org.godotengine.godot.plugin.payment.utils;
+import org.godotengine.godot.utils.Crypt;
+
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -40,6 +43,7 @@ import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.security.KeyStore;
import java.util.Date;
+
import org.apache.http.HttpResponse;
import org.apache.http.HttpVersion;
import org.apache.http.client.ClientProtocolException;
@@ -61,7 +65,6 @@ import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
-import org.godotengine.godot.utils.Crypt;
/**
*
diff --git a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/RequestParams.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/RequestParams.java
index 4be8b37473..023fd87f68 100644
--- a/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/RequestParams.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/utils/RequestParams.java
@@ -33,6 +33,7 @@ package org.godotengine.godot.plugin.payment.utils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index b5052667a7..dd9298d667 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -2359,6 +2359,7 @@ void DisplayServerX11::process_events() {
xi.pressure = 0;
xi.tilt = Vector2();
+ xi.pressure_supported = false;
while (XPending(x11_display) > 0) {
XEvent event;
@@ -2421,9 +2422,11 @@ void DisplayServerX11::process_events() {
Map<int, Vector2>::Element *pen_pressure = xi.pen_pressure_range.find(device_id);
if (pen_pressure) {
Vector2 pen_pressure_range = pen_pressure->value();
- if (pen_pressure_range != Vector2())
+ if (pen_pressure_range != Vector2()) {
+ xi.pressure_supported = true;
xi.pressure = (*values - pen_pressure_range[0]) /
(pen_pressure_range[1] - pen_pressure_range[0]);
+ }
}
values++;
@@ -2782,7 +2785,11 @@ void DisplayServerX11::process_events() {
mm.instance();
mm->set_window_id(window_id);
- mm->set_pressure(xi.pressure);
+ if (xi.pressure_supported) {
+ mm->set_pressure(xi.pressure);
+ } else {
+ mm->set_pressure((mouse_get_button_state() & (1 << (BUTTON_LEFT - 1))) ? 1.0f : 0.0f);
+ }
mm->set_tilt(xi.tilt);
// Make the absolute position integral so it doesn't look _too_ weird :)
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h
index 3dc06745a1..b5ea71f72a 100644
--- a/platform/linuxbsd/display_server_x11.h
+++ b/platform/linuxbsd/display_server_x11.h
@@ -176,6 +176,7 @@ class DisplayServerX11 : public DisplayServer {
XIEventMask all_event_mask;
Map<int, Vector2> state;
double pressure;
+ bool pressure_supported;
Vector2 tilt;
Vector2 mouse_pos_to_filter;
Vector2 relative_motion;
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index e4fe7f04d0..701cf69207 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -36,10 +36,6 @@
#include <avrt.h>
-#ifndef WM_POINTERUPDATE
-#define WM_POINTERUPDATE 0x0245
-#endif
-
#ifdef DEBUG_ENABLED
static String format_error_message(DWORD id) {
@@ -545,6 +541,10 @@ void DisplayServerWindows::delete_sub_window(WindowID p_window) {
}
#endif
+ if (!OS::get_singleton()->is_wintab_disabled() && wintab_available && windows[p_window].wtctx) {
+ wintab_WTClose(windows[p_window].wtctx);
+ windows[p_window].wtctx = 0;
+ }
DestroyWindow(windows[p_window].hWnd);
windows.erase(p_window);
}
@@ -1849,7 +1849,11 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
alt_mem = false;
};
- return 0; // Return To The Message Loop
+ if (!OS::get_singleton()->is_wintab_disabled() && wintab_available && windows[window_id].wtctx) {
+ wintab_WTEnable(windows[window_id].wtctx, GET_WM_ACTIVATE_STATE(wParam, lParam));
+ }
+
+ return 0; // Return To The Message Loop
}
case WM_GETMINMAXINFO: {
if (windows[window_id].resizable && !windows[window_id].fullscreen) {
@@ -1929,6 +1933,8 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
mm->set_shift(shift_mem);
mm->set_alt(alt_mem);
+ mm->set_pressure((raw->data.mouse.ulButtons & RI_MOUSE_LEFT_BUTTON_DOWN) ? 1.0f : 0.0f);
+
mm->set_button_mask(last_button_state);
Point2i c(windows[window_id].width / 2, windows[window_id].height / 2);
@@ -1977,6 +1983,97 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
delete[] lpb;
} break;
+ case WT_CSRCHANGE:
+ case WT_PROXIMITY: {
+ if (!OS::get_singleton()->is_wintab_disabled() && wintab_available && windows[window_id].wtctx) {
+ AXIS pressure;
+ if (wintab_WTInfo(WTI_DEVICES + windows[window_id].wtlc.lcDevice, DVC_NPRESSURE, &pressure)) {
+ windows[window_id].min_pressure = int(pressure.axMin);
+ windows[window_id].max_pressure = int(pressure.axMax);
+ }
+ AXIS orientation[3];
+ if (wintab_WTInfo(WTI_DEVICES + windows[window_id].wtlc.lcDevice, DVC_ORIENTATION, &orientation)) {
+ windows[window_id].tilt_supported = orientation[0].axResolution && orientation[1].axResolution;
+ }
+ return 0;
+ }
+ } break;
+ case WT_PACKET: {
+ if (!OS::get_singleton()->is_wintab_disabled() && wintab_available && windows[window_id].wtctx) {
+ PACKET packet;
+ if (wintab_WTPacket(windows[window_id].wtctx, wParam, &packet)) {
+
+ float pressure = float(packet.pkNormalPressure - windows[window_id].min_pressure) / float(windows[window_id].max_pressure - windows[window_id].min_pressure);
+ windows[window_id].last_pressure = pressure;
+ windows[window_id].last_pressure_update = 0;
+
+ double azim = (packet.pkOrientation.orAzimuth / 10.0f) * (Math_PI / 180);
+ double alt = Math::tan((Math::abs(packet.pkOrientation.orAltitude / 10.0f)) * (Math_PI / 180));
+
+ if (windows[window_id].tilt_supported) {
+ windows[window_id].last_tilt = Vector2(Math::atan(Math::sin(azim) / alt), Math::atan(Math::cos(azim) / alt));
+ } else {
+ windows[window_id].last_tilt = Vector2();
+ }
+
+ POINT coords;
+ GetCursorPos(&coords);
+ ScreenToClient(windows[window_id].hWnd, &coords);
+
+ // Don't calculate relative mouse movement if we don't have focus in CAPTURED mode.
+ if (!windows[window_id].window_has_focus && mouse_mode == MOUSE_MODE_CAPTURED)
+ break;
+
+ Ref<InputEventMouseMotion> mm;
+ mm.instance();
+ mm->set_window_id(window_id);
+ mm->set_control(GetKeyState(VK_CONTROL) != 0);
+ mm->set_shift(GetKeyState(VK_SHIFT) != 0);
+ mm->set_alt(alt_mem);
+
+ mm->set_pressure(windows[window_id].last_pressure);
+ mm->set_tilt(windows[window_id].last_tilt);
+
+ mm->set_button_mask(last_button_state);
+
+ mm->set_position(Vector2(coords.x, coords.y));
+ mm->set_global_position(Vector2(coords.x, coords.y));
+
+ if (mouse_mode == MOUSE_MODE_CAPTURED) {
+ Point2i c(windows[window_id].width / 2, windows[window_id].height / 2);
+ old_x = c.x;
+ old_y = c.y;
+
+ if (mm->get_position() == c) {
+ center = c;
+ return 0;
+ }
+
+ Point2i ncenter = mm->get_position();
+ center = ncenter;
+ POINT pos = { (int)c.x, (int)c.y };
+ ClientToScreen(windows[window_id].hWnd, &pos);
+ SetCursorPos(pos.x, pos.y);
+ }
+
+ Input::get_singleton()->set_mouse_position(mm->get_position());
+ mm->set_speed(Input::get_singleton()->get_last_mouse_speed());
+
+ if (old_invalid) {
+ old_x = mm->get_position().x;
+ old_y = mm->get_position().y;
+ old_invalid = false;
+ }
+
+ mm->set_relative(Vector2(mm->get_position() - Vector2(old_x, old_y)));
+ old_x = mm->get_position().x;
+ old_y = mm->get_position().y;
+ if (windows[window_id].window_has_focus)
+ Input::get_singleton()->parse_input_event(mm);
+ }
+ return 0;
+ }
+ } break;
case WM_POINTERUPDATE: {
if (mouse_mode == MOUSE_MODE_CAPTURED && use_raw_input) {
break;
@@ -2038,8 +2135,14 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
mm.instance();
mm->set_window_id(window_id);
- mm->set_pressure(pen_info.pressure ? (float)pen_info.pressure / 1024 : 0);
- mm->set_tilt(Vector2(pen_info.tiltX ? (float)pen_info.tiltX / 90 : 0, pen_info.tiltY ? (float)pen_info.tiltY / 90 : 0));
+ if (pen_info.penMask & PEN_MASK_PRESSURE) {
+ mm->set_pressure((float)pen_info.pressure / 1024);
+ } else {
+ mm->set_pressure((HIWORD(wParam) & POINTER_MESSAGE_FLAG_FIRSTBUTTON) ? 1.0f : 0.0f);
+ }
+ if ((pen_info.penMask & PEN_MASK_TILT_X) && (pen_info.penMask & PEN_MASK_TILT_Y)) {
+ mm->set_tilt(Vector2((float)pen_info.tiltX / 90, (float)pen_info.tiltY / 90));
+ }
mm->set_control((wParam & MK_CONTROL) != 0);
mm->set_shift((wParam & MK_SHIFT) != 0);
@@ -2138,6 +2241,22 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
mm->set_shift((wParam & MK_SHIFT) != 0);
mm->set_alt(alt_mem);
+ if (!OS::get_singleton()->is_wintab_disabled() && wintab_available && windows[window_id].wtctx) {
+ // Note: WinTab sends both WT_PACKET and WM_xBUTTONDOWN/UP/MOUSEMOVE events, use mouse 1/0 pressure only when last_pressure was not update recently.
+ if (windows[window_id].last_pressure_update < 10) {
+ windows[window_id].last_pressure_update++;
+ } else {
+ windows[window_id].last_tilt = Vector2();
+ windows[window_id].last_pressure = (wParam & MK_LBUTTON) ? 1.0f : 0.0f;
+ }
+ } else {
+ windows[window_id].last_tilt = Vector2();
+ windows[window_id].last_pressure = (wParam & MK_LBUTTON) ? 1.0f : 0.0f;
+ }
+
+ mm->set_pressure(windows[window_id].last_pressure);
+ mm->set_tilt(windows[window_id].last_tilt);
+
mm->set_button_mask(last_button_state);
mm->set_position(Vector2(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
@@ -2759,6 +2878,39 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
DragAcceptFiles(wd.hWnd, true);
+ if (!OS::get_singleton()->is_wintab_disabled() && wintab_available) {
+ wintab_WTInfo(WTI_DEFSYSCTX, 0, &wd.wtlc);
+ wd.wtlc.lcOptions |= CXO_MESSAGES;
+ wd.wtlc.lcPktData = PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE | PK_ORIENTATION;
+ wd.wtlc.lcMoveMask = PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE;
+ wd.wtlc.lcPktMode = 0;
+ wd.wtlc.lcOutOrgX = 0;
+ wd.wtlc.lcOutExtX = wd.wtlc.lcInExtX;
+ wd.wtlc.lcOutOrgY = 0;
+ wd.wtlc.lcOutExtY = -wd.wtlc.lcInExtY;
+ wd.wtctx = wintab_WTOpen(wd.hWnd, &wd.wtlc, false);
+ if (wd.wtctx) {
+ wintab_WTEnable(wd.wtctx, true);
+ AXIS pressure;
+ if (wintab_WTInfo(WTI_DEVICES + wd.wtlc.lcDevice, DVC_NPRESSURE, &pressure)) {
+ wd.min_pressure = int(pressure.axMin);
+ wd.max_pressure = int(pressure.axMax);
+ }
+ AXIS orientation[3];
+ if (wintab_WTInfo(WTI_DEVICES + wd.wtlc.lcDevice, DVC_ORIENTATION, &orientation)) {
+ wd.tilt_supported = orientation[0].axResolution && orientation[1].axResolution;
+ }
+ } else {
+ print_verbose("WinTab context creation failed.");
+ }
+ } else {
+ wd.wtctx = 0;
+ }
+
+ wd.last_pressure = 0;
+ wd.last_pressure_update = 0;
+ wd.last_tilt = Vector2();
+
// IME
wd.im_himc = ImmGetContext(wd.hWnd);
ImmReleaseContext(wd.hWnd, wd.im_himc);
@@ -2776,6 +2928,15 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
return id;
}
+// WinTab API
+bool DisplayServerWindows::wintab_available = false;
+WTOpenPtr DisplayServerWindows::wintab_WTOpen = nullptr;
+WTClosePtr DisplayServerWindows::wintab_WTClose = nullptr;
+WTInfoPtr DisplayServerWindows::wintab_WTInfo = nullptr;
+WTPacketPtr DisplayServerWindows::wintab_WTPacket = nullptr;
+WTEnablePtr DisplayServerWindows::wintab_WTEnable = nullptr;
+
+// Windows Ink API
GetPointerTypePtr DisplayServerWindows::win8p_GetPointerType = nullptr;
GetPointerPenInfoPtr DisplayServerWindows::win8p_GetPointerPenInfo = nullptr;
@@ -2787,7 +2948,19 @@ typedef enum _SHC_PROCESS_DPI_AWARENESS {
DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, WindowMode p_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
- //Note: Functions for pen input, available on Windows 8+
+ //Note: Wacom WinTab driver API for pen input, for devices incompatible with Windows Ink.
+ HMODULE wintab_lib = LoadLibraryW(L"wintab32.dll");
+ if (wintab_lib) {
+ wintab_WTOpen = (WTOpenPtr)GetProcAddress(wintab_lib, "WTOpenW");
+ wintab_WTClose = (WTClosePtr)GetProcAddress(wintab_lib, "WTClose");
+ wintab_WTInfo = (WTInfoPtr)GetProcAddress(wintab_lib, "WTInfoW");
+ wintab_WTPacket = (WTPacketPtr)GetProcAddress(wintab_lib, "WTPacket");
+ wintab_WTEnable = (WTEnablePtr)GetProcAddress(wintab_lib, "WTEnable");
+
+ wintab_available = wintab_WTOpen && wintab_WTClose && wintab_WTInfo && wintab_WTPacket && wintab_WTEnable;
+ }
+
+ //Note: Windows Ink API for pen input, available on Windows 8+ only.
HMODULE user32_lib = LoadLibraryW(L"user32.dll");
if (user32_lib) {
win8p_GetPointerType = (GetPointerTypePtr)GetProcAddress(user32_lib, "GetPointerType");
@@ -3004,7 +3177,10 @@ DisplayServerWindows::~DisplayServerWindows() {
context_vulkan->window_destroy(MAIN_WINDOW_ID);
}
#endif
-
+ if (wintab_available && windows[MAIN_WINDOW_ID].wtctx) {
+ wintab_WTClose(windows[MAIN_WINDOW_ID].wtctx);
+ windows[MAIN_WINDOW_ID].wtctx = 0;
+ }
DestroyWindow(windows[MAIN_WINDOW_ID].hWnd);
}
}
diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h
index 6243f54cfa..4f5bdbac5b 100644
--- a/platform/windows/display_server_windows.h
+++ b/platform/windows/display_server_windows.h
@@ -66,6 +66,87 @@
#include <windows.h>
#include <windowsx.h>
+// WinTab API
+#define WT_PACKET 0x7FF0
+#define WT_PROXIMITY 0x7FF5
+#define WT_INFOCHANGE 0x7FF6
+#define WT_CSRCHANGE 0x7FF7
+
+#define WTI_DEFSYSCTX 4
+#define WTI_DEVICES 100
+#define DVC_NPRESSURE 15
+#define DVC_TPRESSURE 16
+#define DVC_ORIENTATION 17
+#define DVC_ROTATION 18
+
+#define CXO_MESSAGES 0x0004
+#define PK_NORMAL_PRESSURE 0x0400
+#define PK_TANGENT_PRESSURE 0x0800
+#define PK_ORIENTATION 0x1000
+
+typedef struct tagLOGCONTEXTW {
+ WCHAR lcName[40];
+ UINT lcOptions;
+ UINT lcStatus;
+ UINT lcLocks;
+ UINT lcMsgBase;
+ UINT lcDevice;
+ UINT lcPktRate;
+ DWORD lcPktData;
+ DWORD lcPktMode;
+ DWORD lcMoveMask;
+ DWORD lcBtnDnMask;
+ DWORD lcBtnUpMask;
+ LONG lcInOrgX;
+ LONG lcInOrgY;
+ LONG lcInOrgZ;
+ LONG lcInExtX;
+ LONG lcInExtY;
+ LONG lcInExtZ;
+ LONG lcOutOrgX;
+ LONG lcOutOrgY;
+ LONG lcOutOrgZ;
+ LONG lcOutExtX;
+ LONG lcOutExtY;
+ LONG lcOutExtZ;
+ DWORD lcSensX;
+ DWORD lcSensY;
+ DWORD lcSensZ;
+ BOOL lcSysMode;
+ int lcSysOrgX;
+ int lcSysOrgY;
+ int lcSysExtX;
+ int lcSysExtY;
+ DWORD lcSysSensX;
+ DWORD lcSysSensY;
+} LOGCONTEXTW;
+
+typedef struct tagAXIS {
+ LONG axMin;
+ LONG axMax;
+ UINT axUnits;
+ DWORD axResolution;
+} AXIS;
+
+typedef struct tagORIENTATION {
+ int orAzimuth;
+ int orAltitude;
+ int orTwist;
+} ORIENTATION;
+
+typedef struct tagPACKET {
+ int pkNormalPressure;
+ int pkTangentPressure;
+ ORIENTATION pkOrientation;
+} PACKET;
+
+typedef HANDLE(WINAPI *WTOpenPtr)(HWND p_window, LOGCONTEXTW *p_ctx, BOOL p_enable);
+typedef BOOL(WINAPI *WTClosePtr)(HANDLE p_ctx);
+typedef UINT(WINAPI *WTInfoPtr)(UINT p_category, UINT p_index, LPVOID p_output);
+typedef BOOL(WINAPI *WTPacketPtr)(HANDLE p_ctx, UINT p_param, LPVOID p_packets);
+typedef BOOL(WINAPI *WTEnablePtr)(HANDLE p_ctx, BOOL p_enable);
+
+// Windows Ink API
#ifndef POINTER_STRUCTURES
#define POINTER_STRUCTURES
@@ -75,6 +156,22 @@ typedef UINT32 POINTER_FLAGS;
typedef UINT32 PEN_FLAGS;
typedef UINT32 PEN_MASK;
+#ifndef PEN_MASK_PRESSURE
+#define PEN_MASK_PRESSURE 0x00000001
+#endif
+
+#ifndef PEN_MASK_TILT_X
+#define PEN_MASK_TILT_X 0x00000004
+#endif
+
+#ifndef PEN_MASK_TILT_Y
+#define PEN_MASK_TILT_Y 0x00000008
+#endif
+
+#ifndef POINTER_MESSAGE_FLAG_FIRSTBUTTON
+#define POINTER_MESSAGE_FLAG_FIRSTBUTTON 0x00000010
+#endif
+
enum tagPOINTER_INPUT_TYPE {
PT_POINTER = 0x00000001,
PT_TOUCH = 0x00000002,
@@ -128,6 +225,10 @@ typedef struct tagPOINTER_PEN_INFO {
#endif //POINTER_STRUCTURES
+#ifndef WM_POINTERUPDATE
+#define WM_POINTERUPDATE 0x0245
+#endif
+
typedef BOOL(WINAPI *GetPointerTypePtr)(uint32_t p_id, POINTER_INPUT_TYPE *p_type);
typedef BOOL(WINAPI *GetPointerPenInfoPtr)(uint32_t p_id, POINTER_PEN_INFO *p_pen_info);
@@ -155,6 +256,15 @@ class DisplayServerWindows : public DisplayServer {
_THREAD_SAFE_CLASS_
+ // WinTab API
+ static bool wintab_available;
+ static WTOpenPtr wintab_WTOpen;
+ static WTClosePtr wintab_WTClose;
+ static WTInfoPtr wintab_WTInfo;
+ static WTPacketPtr wintab_WTPacket;
+ static WTEnablePtr wintab_WTEnable;
+
+ // Windows Ink API
static GetPointerTypePtr win8p_GetPointerType;
static GetPointerPenInfoPtr win8p_GetPointerPenInfo;
@@ -214,6 +324,16 @@ class DisplayServerWindows : public DisplayServer {
bool no_focus = false;
bool window_has_focus = false;
+ HANDLE wtctx;
+ LOGCONTEXTW wtlc;
+ int min_pressure;
+ int max_pressure;
+ bool tilt_supported;
+
+ int last_pressure_update;
+ float last_pressure;
+ Vector2 last_tilt;
+
HBITMAP hBitmap; //DIB section for layered window
uint8_t *dib_data = nullptr;
Size2 dib_size;
diff --git a/platform/windows/key_mapping_windows.cpp b/platform/windows/key_mapping_windows.cpp
index da63e92622..92a2585745 100644
--- a/platform/windows/key_mapping_windows.cpp
+++ b/platform/windows/key_mapping_windows.cpp
@@ -130,7 +130,7 @@ static _WinTranslatePair _vk_to_keycode[] = {
{ KEY_MASK_META, VK_LWIN }, //(0x5B)
{ KEY_MASK_META, VK_RWIN }, //(0x5C)
- //VK_APPS (0x5D)
+ { KEY_MENU, VK_APPS }, //(0x5D)
{ KEY_STANDBY, VK_SLEEP }, //(0x5F)
{ KEY_KP_0, VK_NUMPAD0 }, //(0x60)
{ KEY_KP_1, VK_NUMPAD1 }, //(0x61)
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp
index 19484442b1..abbfbf83b7 100644
--- a/scene/2d/navigation_region_2d.cpp
+++ b/scene/2d/navigation_region_2d.cpp
@@ -118,7 +118,7 @@ Array NavigationPolygon::_get_polygons() const {
return ret;
}
-void NavigationPolygon::_set_outlines(const TypedArray<Vector<int32_t>> &p_array) {
+void NavigationPolygon::_set_outlines(const TypedArray<Vector<Vector2>> &p_array) {
outlines.resize(p_array.size());
for (int i = 0; i < p_array.size(); i++) {
diff --git a/scene/2d/navigation_region_2d.h b/scene/2d/navigation_region_2d.h
index cbfe4299fb..e730df6373 100644
--- a/scene/2d/navigation_region_2d.h
+++ b/scene/2d/navigation_region_2d.h
@@ -58,7 +58,7 @@ protected:
void _set_polygons(const TypedArray<Vector<int32_t>> &p_array);
Array _get_polygons() const;
- void _set_outlines(const TypedArray<Vector<int32_t>> &p_array);
+ void _set_outlines(const TypedArray<Vector<Vector2>> &p_array);
Array _get_outlines() const;
public:
diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp
index 85fd05ac15..590cc1e6c4 100644
--- a/scene/2d/touch_screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -260,9 +260,10 @@ bool TouchScreenButton::_is_point_inside(const Point2 &p_point) {
bool check_rect = true;
if (shape.is_valid()) {
-
check_rect = false;
- Transform2D xform = shape_centered ? Transform2D().translated(shape->get_rect().size * 0.5f) : Transform2D();
+
+ Vector2 size = texture.is_null() ? shape->get_rect().size : texture->get_size();
+ Transform2D xform = shape_centered ? Transform2D().translated(size * 0.5f) : Transform2D();
touched = shape->collide(xform, unit_rect, Transform2D(0, coord + Vector2(0.5, 0.5)));
}
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 28a8b01437..5701d3cea2 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -385,8 +385,8 @@ void AudioStreamPlayer3D::_notification(int p_what) {
linear_velocity = velocity_tracker->get_tracked_linear_velocity();
}
- Ref<World3D> world = get_world();
- ERR_FAIL_COND(world.is_null());
+ Ref<World3D> world_3d = get_world_3d();
+ ERR_FAIL_COND(world_3d.is_null());
int new_output_count = 0;
@@ -396,7 +396,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
//check if any area is diverting sound into a bus
- PhysicsDirectSpaceState3D *space_state = PhysicsServer3D::get_singleton()->space_get_direct_state(world->get_space());
+ PhysicsDirectSpaceState3D *space_state = PhysicsServer3D::get_singleton()->space_get_direct_state(world_3d->get_space());
PhysicsDirectSpaceState3D::ShapeResult sr[MAX_INTERSECT_AREAS];
@@ -419,7 +419,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
}
List<Camera3D *> cameras;
- world->get_camera_list(&cameras);
+ world_3d->get_camera_list(&cameras);
for (List<Camera3D *>::Element *E = cameras.front(); E; E = E->next()) {
@@ -710,6 +710,11 @@ float AudioStreamPlayer3D::get_pitch_scale() const {
void AudioStreamPlayer3D::play(float p_from_pos) {
+ if (!is_playing()) {
+ // Reset the prev_output_count if the stream is stopped
+ prev_output_count = 0;
+ }
+
if (stream_playback.is_valid()) {
active = true;
setplay = p_from_pos;
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp
index 706c49b43b..7d02befee6 100644
--- a/scene/3d/camera_3d.cpp
+++ b/scene/3d/camera_3d.cpp
@@ -95,8 +95,8 @@ void Camera3D::_update_camera() {
get_viewport()->_camera_transform_changed_notify();
- if (get_world().is_valid()) {
- get_world()->_update_camera(this);
+ if (get_world_3d().is_valid()) {
+ get_world_3d()->_update_camera(this);
}
}
@@ -144,12 +144,12 @@ void Camera3D::_notification(int p_what) {
} break;
case NOTIFICATION_BECAME_CURRENT: {
if (viewport) {
- viewport->find_world()->_register_camera(this);
+ viewport->find_world_3d()->_register_camera(this);
}
} break;
case NOTIFICATION_LOST_CURRENT: {
if (viewport) {
- viewport->find_world()->_remove_camera(this);
+ viewport->find_world_3d()->_remove_camera(this);
}
} break;
}
@@ -376,7 +376,7 @@ Point2 Camera3D::unproject_position(const Vector3 &p_pos) const {
Plane p(get_camera_transform().xform_inv(p_pos), 1.0);
p = cm.xform4(p);
- p.normal /= p.d;
+ p.normal /= p.distance;
Point2 res;
res.x = (p.normal.x * 0.5 + 0.5) * viewport_size.x;
@@ -689,7 +689,7 @@ Camera3D::Camera3D() {
viewport = nullptr;
force_change = false;
mode = PROJECTION_PERSPECTIVE;
- set_perspective(70.0, 0.05, 100.0);
+ set_perspective(75.0, 0.05, 100.0);
keep_aspect = KEEP_HEIGHT;
layers = 0xfffff;
v_offset = 0;
@@ -743,7 +743,7 @@ void ClippedCamera3D::_notification(int p_what) {
return;
}
- PhysicsDirectSpaceState3D *dspace = get_world()->get_direct_space_state();
+ PhysicsDirectSpaceState3D *dspace = get_world_3d()->get_direct_space_state();
ERR_FAIL_COND(!dspace); // most likely physics set to threads
Vector3 cam_fw = -get_global_transform().basis.get_axis(Vector3::AXIS_Z).normalized();
diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp
index e6cd7bfe7e..5d050e32b0 100644
--- a/scene/3d/collision_object_3d.cpp
+++ b/scene/3d/collision_object_3d.cpp
@@ -44,7 +44,7 @@ void CollisionObject3D::_notification(int p_what) {
else
PhysicsServer3D::get_singleton()->body_set_state(rid, PhysicsServer3D::BODY_STATE_TRANSFORM, get_global_transform());
- RID space = get_world()->get_space();
+ RID space = get_world_3d()->get_space();
if (area) {
PhysicsServer3D::get_singleton()->area_set_space(rid, space);
} else
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp
index 0b7407e049..913a3ea49f 100644
--- a/scene/3d/node_3d.cpp
+++ b/scene/3d/node_3d.cpp
@@ -507,12 +507,12 @@ bool Node3D::is_set_as_toplevel() const {
return data.toplevel;
}
-Ref<World3D> Node3D::get_world() const {
+Ref<World3D> Node3D::get_world_3d() const {
ERR_FAIL_COND_V(!is_inside_world(), Ref<World3D>());
ERR_FAIL_COND_V(!data.viewport, Ref<World3D>());
- return data.viewport->find_world();
+ return data.viewport->find_world_3d();
}
void Node3D::_propagate_visibility_changed() {
@@ -756,7 +756,7 @@ void Node3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_set_as_toplevel"), &Node3D::is_set_as_toplevel);
ClassDB::bind_method(D_METHOD("set_disable_scale", "disable"), &Node3D::set_disable_scale);
ClassDB::bind_method(D_METHOD("is_scale_disabled"), &Node3D::is_scale_disabled);
- ClassDB::bind_method(D_METHOD("get_world"), &Node3D::get_world);
+ ClassDB::bind_method(D_METHOD("get_world_3d"), &Node3D::get_world_3d);
ClassDB::bind_method(D_METHOD("force_update_transform"), &Node3D::force_update_transform);
diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h
index f97a8a97dc..a4191eb2b3 100644
--- a/scene/3d/node_3d.h
+++ b/scene/3d/node_3d.h
@@ -124,7 +124,7 @@ public:
Node3D *get_parent_spatial() const;
- Ref<World3D> get_world() const;
+ Ref<World3D> get_world_3d() const;
void set_translation(const Vector3 &p_translation);
void set_rotation(const Vector3 &p_euler_rad);
diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp
index a18da61656..304a5e1254 100644
--- a/scene/3d/ray_cast_3d.cpp
+++ b/scene/3d/ray_cast_3d.cpp
@@ -196,7 +196,7 @@ void RayCast3D::_notification(int p_what) {
}
void RayCast3D::_update_raycast_state() {
- Ref<World3D> w3d = get_world();
+ Ref<World3D> w3d = get_world_3d();
ERR_FAIL_COND(w3d.is_null());
PhysicsDirectSpaceState3D *dss = PhysicsServer3D::get_singleton()->space_get_direct_state(w3d->get_space());
diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp
index 6092818252..850ffab292 100644
--- a/scene/3d/soft_body_3d.cpp
+++ b/scene/3d/soft_body_3d.cpp
@@ -270,7 +270,7 @@ void SoftBody3D::_notification(int p_what) {
add_change_receptor(this);
}
- RID space = get_world()->get_space();
+ RID space = get_world_3d()->get_space();
PhysicsServer3D::get_singleton()->soft_body_set_space(physics_rid, space);
prepare_physics_server();
} break;
diff --git a/scene/3d/spring_arm_3d.cpp b/scene/3d/spring_arm_3d.cpp
index 0ffde7aa8f..1410b730fd 100644
--- a/scene/3d/spring_arm_3d.cpp
+++ b/scene/3d/spring_arm_3d.cpp
@@ -147,7 +147,7 @@ void SpringArm3D::process_spring() {
if (shape.is_null()) {
motion = Vector3(cast_direction * (spring_length));
PhysicsDirectSpaceState3D::RayResult r;
- bool intersected = get_world()->get_direct_space_state()->intersect_ray(get_global_transform().origin, get_global_transform().origin + motion, r, excluded_objects, mask);
+ bool intersected = get_world_3d()->get_direct_space_state()->intersect_ray(get_global_transform().origin, get_global_transform().origin + motion, r, excluded_objects, mask);
if (intersected) {
float dist = get_global_transform().origin.distance_to(r.position);
dist -= margin;
@@ -155,7 +155,7 @@ void SpringArm3D::process_spring() {
}
} else {
motion = Vector3(cast_direction * spring_length);
- get_world()->get_direct_space_state()->cast_motion(shape->get_rid(), get_global_transform(), motion, 0, motion_delta, motion_delta_unsafe, excluded_objects, mask);
+ get_world_3d()->get_direct_space_state()->cast_motion(shape->get_rid(), get_global_transform(), motion, 0, motion_delta, motion_delta_unsafe, excluded_objects, mask);
}
current_spring_length = spring_length * motion_delta;
diff --git a/scene/3d/visibility_notifier_3d.cpp b/scene/3d/visibility_notifier_3d.cpp
index 2f657fe7b1..2707a0a514 100644
--- a/scene/3d/visibility_notifier_3d.cpp
+++ b/scene/3d/visibility_notifier_3d.cpp
@@ -68,7 +68,7 @@ void VisibilityNotifier3D::set_aabb(const AABB &p_aabb) {
aabb = p_aabb;
if (is_inside_world()) {
- get_world()->_update_notifier(this, get_global_transform().xform(aabb));
+ get_world_3d()->_update_notifier(this, get_global_transform().xform(aabb));
}
_change_notify("aabb");
@@ -85,15 +85,15 @@ void VisibilityNotifier3D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_WORLD: {
- get_world()->_register_notifier(this, get_global_transform().xform(aabb));
+ get_world_3d()->_register_notifier(this, get_global_transform().xform(aabb));
} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
- get_world()->_update_notifier(this, get_global_transform().xform(aabb));
+ get_world_3d()->_update_notifier(this, get_global_transform().xform(aabb));
} break;
case NOTIFICATION_EXIT_WORLD: {
- get_world()->_remove_notifier(this);
+ get_world_3d()->_remove_notifier(this);
} break;
}
}
diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp
index 604bc53422..ce8672c1dd 100644
--- a/scene/3d/visual_instance_3d.cpp
+++ b/scene/3d/visual_instance_3d.cpp
@@ -60,8 +60,8 @@ void VisualInstance3D::_notification(int p_what) {
if (skeleton)
RenderingServer::get_singleton()->instance_attach_skeleton( instance, skeleton->get_skeleton() );
*/
- ERR_FAIL_COND(get_world().is_null());
- RenderingServer::get_singleton()->instance_set_scenario(instance, get_world()->get_scenario());
+ ERR_FAIL_COND(get_world_3d().is_null());
+ RenderingServer::get_singleton()->instance_set_scenario(instance, get_world_3d()->get_scenario());
_update_visibility();
} break;
diff --git a/scene/3d/world_environment.cpp b/scene/3d/world_environment.cpp
index 8cf4554653..8dbb709ae4 100644
--- a/scene/3d/world_environment.cpp
+++ b/scene/3d/world_environment.cpp
@@ -36,50 +36,50 @@ void WorldEnvironment::_notification(int p_what) {
if (p_what == Node3D::NOTIFICATION_ENTER_WORLD || p_what == Node3D::NOTIFICATION_ENTER_TREE) {
if (environment.is_valid()) {
- if (get_viewport()->find_world()->get_environment().is_valid()) {
+ if (get_viewport()->find_world_3d()->get_environment().is_valid()) {
WARN_PRINT("World already has an environment (Another WorldEnvironment?), overriding.");
}
- get_viewport()->find_world()->set_environment(environment);
- add_to_group("_world_environment_" + itos(get_viewport()->find_world()->get_scenario().get_id()));
+ get_viewport()->find_world_3d()->set_environment(environment);
+ add_to_group("_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()));
}
if (camera_effects.is_valid()) {
- if (get_viewport()->find_world()->get_camera_effects().is_valid()) {
+ if (get_viewport()->find_world_3d()->get_camera_effects().is_valid()) {
WARN_PRINT("World already has a camera effects (Another WorldEnvironment?), overriding.");
}
- get_viewport()->find_world()->set_camera_effects(camera_effects);
- add_to_group("_world_camera_effects_" + itos(get_viewport()->find_world()->get_scenario().get_id()));
+ get_viewport()->find_world_3d()->set_camera_effects(camera_effects);
+ add_to_group("_world_camera_effects_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()));
}
} else if (p_what == Node3D::NOTIFICATION_EXIT_WORLD || p_what == Node3D::NOTIFICATION_EXIT_TREE) {
- if (environment.is_valid() && get_viewport()->find_world()->get_environment() == environment) {
- get_viewport()->find_world()->set_environment(Ref<Environment>());
- remove_from_group("_world_environment_" + itos(get_viewport()->find_world()->get_scenario().get_id()));
+ if (environment.is_valid() && get_viewport()->find_world_3d()->get_environment() == environment) {
+ get_viewport()->find_world_3d()->set_environment(Ref<Environment>());
+ remove_from_group("_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()));
}
- if (camera_effects.is_valid() && get_viewport()->find_world()->get_camera_effects() == camera_effects) {
- get_viewport()->find_world()->set_camera_effects(Ref<CameraEffects>());
- remove_from_group("_world_camera_effects_" + itos(get_viewport()->find_world()->get_scenario().get_id()));
+ if (camera_effects.is_valid() && get_viewport()->find_world_3d()->get_camera_effects() == camera_effects) {
+ get_viewport()->find_world_3d()->set_camera_effects(Ref<CameraEffects>());
+ remove_from_group("_world_camera_effects_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()));
}
}
}
void WorldEnvironment::set_environment(const Ref<Environment> &p_environment) {
- if (is_inside_tree() && environment.is_valid() && get_viewport()->find_world()->get_environment() == environment) {
- get_viewport()->find_world()->set_environment(Ref<Environment>());
- remove_from_group("_world_environment_" + itos(get_viewport()->find_world()->get_scenario().get_id()));
+ if (is_inside_tree() && environment.is_valid() && get_viewport()->find_world_3d()->get_environment() == environment) {
+ get_viewport()->find_world_3d()->set_environment(Ref<Environment>());
+ remove_from_group("_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()));
//clean up
}
environment = p_environment;
if (is_inside_tree() && environment.is_valid()) {
- if (get_viewport()->find_world()->get_environment().is_valid()) {
+ if (get_viewport()->find_world_3d()->get_environment().is_valid()) {
WARN_PRINT("World already has an environment (Another WorldEnvironment?), overriding.");
}
- get_viewport()->find_world()->set_environment(environment);
- add_to_group("_world_environment_" + itos(get_viewport()->find_world()->get_scenario().get_id()));
+ get_viewport()->find_world_3d()->set_environment(environment);
+ add_to_group("_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()));
}
update_configuration_warning();
@@ -92,19 +92,19 @@ Ref<Environment> WorldEnvironment::get_environment() const {
void WorldEnvironment::set_camera_effects(const Ref<CameraEffects> &p_camera_effects) {
- if (is_inside_tree() && camera_effects.is_valid() && get_viewport()->find_world()->get_camera_effects() == camera_effects) {
- get_viewport()->find_world()->set_camera_effects(Ref<CameraEffects>());
- remove_from_group("_world_camera_effects_" + itos(get_viewport()->find_world()->get_scenario().get_id()));
+ if (is_inside_tree() && camera_effects.is_valid() && get_viewport()->find_world_3d()->get_camera_effects() == camera_effects) {
+ get_viewport()->find_world_3d()->set_camera_effects(Ref<CameraEffects>());
+ remove_from_group("_world_camera_effects_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()));
//clean up
}
camera_effects = p_camera_effects;
if (is_inside_tree() && camera_effects.is_valid()) {
- if (get_viewport()->find_world()->get_camera_effects().is_valid()) {
+ if (get_viewport()->find_world_3d()->get_camera_effects().is_valid()) {
WARN_PRINT("World already has an camera_effects (Another WorldEnvironment?), overriding.");
}
- get_viewport()->find_world()->set_camera_effects(camera_effects);
- add_to_group("_world_camera_effects_" + itos(get_viewport()->find_world()->get_scenario().get_id()));
+ get_viewport()->find_world_3d()->set_camera_effects(camera_effects);
+ add_to_group("_world_camera_effects_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()));
}
update_configuration_warning();
@@ -125,7 +125,7 @@ String WorldEnvironment::get_configuration_warning() const {
return String();
List<Node *> nodes;
- get_tree()->get_nodes_in_group("_world_environment_" + itos(get_viewport()->find_world()->get_scenario().get_id()), &nodes);
+ get_tree()->get_nodes_in_group("_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()), &nodes);
if (nodes.size() > 1) {
return TTR("Only one WorldEnvironment is allowed per scene (or set of instanced scenes).");
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp
index 6f41629bac..05e282533b 100644
--- a/scene/3d/xr_nodes.cpp
+++ b/scene/3d/xr_nodes.cpp
@@ -111,7 +111,7 @@ Point2 XRCamera3D::unproject_position(const Vector3 &p_pos) const {
Plane p(get_camera_transform().xform_inv(p_pos), 1.0);
p = cm.xform4(p);
- p.normal /= p.d;
+ p.normal /= p.distance;
Point2 res;
res.x = (p.normal.x * 0.5 + 0.5) * viewport_size.x;
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 9ef6b9864a..8228cf67bd 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -950,13 +950,13 @@ void AnimationPlayer::_animation_process(float p_delta) {
play(queued.front()->get());
String new_name = playback.assigned;
queued.pop_front();
- if (end_notify || playback.seeked)
+ if (end_notify)
emit_signal(SceneStringNames::get_singleton()->animation_changed, old, new_name);
} else {
//stop();
playing = false;
_set_process(false);
- if (end_notify || playback.seeked)
+ if (end_notify)
emit_signal(SceneStringNames::get_singleton()->animation_finished, playback.assigned);
}
end_reached = false;
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index bc28c38e2c..d0c6cac8cf 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -126,14 +126,17 @@ bool Tween::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name;
if (name == "playback/speed" || name == "speed") { // Backwards compatibility
set_speed_scale(p_value);
+ return true;
} else if (name == "playback/active") {
set_active(p_value);
+ return true;
} else if (name == "playback/repeat") {
set_repeat(p_value);
+ return true;
}
- return true;
+ return false;
}
bool Tween::_get(const StringName &p_name, Variant &r_ret) const {
@@ -142,14 +145,17 @@ bool Tween::_get(const StringName &p_name, Variant &r_ret) const {
String name = p_name;
if (name == "playback/speed") { // Backwards compatibility
r_ret = speed_scale;
+ return true;
} else if (name == "playback/active") {
r_ret = is_active();
+ return true;
} else if (name == "playback/repeat") {
r_ret = is_repeat();
+ return true;
}
- return true;
+ return false;
}
void Tween::_get_property_list(List<PropertyInfo> *p_list) const {
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index b4dc37c74f..b710ba4803 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2896,7 +2896,7 @@ void Control::_bind_methods() {
ADD_GROUP("Size Flags", "size_flags_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_horizontal", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_h_size_flags", "get_h_size_flags");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_vertical", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_v_size_flags", "get_v_size_flags");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_stretch_ratio", "get_stretch_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,20,0.01,or_greater"), "set_stretch_ratio", "get_stretch_ratio");
ADD_GROUP("Theme", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "Theme"), "set_theme", "get_theme");
ADD_GROUP("", "");
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index 3dffa06b49..098e8297ad 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -111,11 +111,11 @@ void LinkButton::_notification(int p_what) {
draw_string(font, Vector2(0, font->get_ascent()), text, color);
if (do_underline) {
- int underline_spacing = get_theme_constant("underline_spacing");
+ int underline_spacing = get_theme_constant("underline_spacing") + font->get_underline_position();
int width = font->get_string_size(text).width;
int y = font->get_ascent() + underline_spacing;
- draw_line(Vector2(0, y), Vector2(width, y), color);
+ draw_line(Vector2(0, y), Vector2(width, y), color, font->get_underline_thickness());
}
} break;
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index a247863298..9c48801ec1 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1079,6 +1079,11 @@ bool PopupMenu::is_item_shortcut_disabled(int p_idx) const {
return items[p_idx].shortcut_is_disabled;
}
+int PopupMenu::get_current_index() const {
+
+ return mouse_over;
+}
+
int PopupMenu::get_item_count() const {
return items.size();
@@ -1457,6 +1462,7 @@ void PopupMenu::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_tooltip", "idx"), &PopupMenu::get_item_tooltip);
ClassDB::bind_method(D_METHOD("get_item_shortcut", "idx"), &PopupMenu::get_item_shortcut);
+ ClassDB::bind_method(D_METHOD("get_current_index"), &PopupMenu::get_current_index);
ClassDB::bind_method(D_METHOD("get_item_count"), &PopupMenu::get_item_count);
ClassDB::bind_method(D_METHOD("remove_item", "idx"), &PopupMenu::remove_item);
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index 2eef1f009d..d5c1015863 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -178,6 +178,7 @@ public:
Ref<ShortCut> get_item_shortcut(int p_idx) const;
int get_item_state(int p_idx) const;
+ int get_current_index() const;
int get_item_count() const;
bool activate_item_by_event(const Ref<InputEvent> &p_event, bool p_for_global_only = false);
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 5c293cdf3c..84097eb6a1 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -600,8 +600,8 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
if (underline) {
Color uc = color;
uc.a *= 0.5;
- int uy = y + lh - line_descent + 2;
- float underline_width = 1.0;
+ int uy = y + lh - line_descent + font->get_underline_position();
+ float underline_width = font->get_underline_thickness();
#ifdef TOOLS_ENABLED
underline_width *= EDSCALE;
#endif
@@ -610,7 +610,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
Color uc = color;
uc.a *= 0.5;
int uy = y + lh - (line_ascent + line_descent) / 2;
- float strikethrough_width = 1.0;
+ float strikethrough_width = font->get_underline_thickness();
#ifdef TOOLS_ENABLED
strikethrough_width *= EDSCALE;
#endif
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 9ee7456d26..aa518fbb7d 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1153,7 +1153,7 @@ void TextEdit::_notification(int p_what) {
highlighted_text_col = _get_column_pos_of_word(highlighted_text, str, SEARCH_MATCH_CASE | SEARCH_WHOLE_WORDS, 0);
if (select_identifiers_enabled && highlighted_word.length() != 0) {
- if (_is_char(highlighted_word[0])) {
+ if (_is_char(highlighted_word[0]) || highlighted_word[0] == '.') {
highlighted_word_col = _get_column_pos_of_word(highlighted_word, fullstr, SEARCH_MATCH_CASE | SEARCH_WHOLE_WORDS, 0);
}
}
@@ -1487,12 +1487,12 @@ void TextEdit::_notification(int p_what) {
int yofs = ofs_y + (get_row_height() - cache.font->get_height()) / 2;
int w = drawer.draw_char(ci, Point2i(char_ofs + char_margin + ofs_x, yofs + ascent), str[j], str[j + 1], in_selection && override_selected_font_color ? cache.font_color_selected : color);
if (underlined) {
- float line_width = 1.0;
+ float line_width = cache.font->get_underline_thickness();
#ifdef TOOLS_ENABLED
line_width *= EDSCALE;
#endif
- draw_rect(Rect2(char_ofs + char_margin + ofs_x, yofs + ascent + 2, w, line_width), in_selection && override_selected_font_color ? cache.font_color_selected : color);
+ draw_rect(Rect2(char_ofs + char_margin + ofs_x, yofs + ascent + cache.font->get_underline_position(), w, line_width), in_selection && override_selected_font_color ? cache.font_color_selected : color);
}
} else if (draw_tabs && str[j] == '\t') {
int yofs = (get_row_height() - cache.tab_icon->get_height()) / 2;
@@ -7083,6 +7083,7 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_line_count"), &TextEdit::get_line_count);
ClassDB::bind_method(D_METHOD("get_text"), &TextEdit::get_text);
ClassDB::bind_method(D_METHOD("get_line", "line"), &TextEdit::get_line);
+ ClassDB::bind_method(D_METHOD("set_line", "line", "new_text"), &TextEdit::set_line);
ClassDB::bind_method(D_METHOD("center_viewport_to_cursor"), &TextEdit::center_viewport_to_cursor);
ClassDB::bind_method(D_METHOD("cursor_set_column", "column", "adjust_viewport"), &TextEdit::cursor_set_column, DEFVAL(true));
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index aad36ebf02..329c1085df 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -779,6 +779,9 @@ void TreeItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_text", "column", "text"), &TreeItem::set_text);
ClassDB::bind_method(D_METHOD("get_text", "column"), &TreeItem::get_text);
+ ClassDB::bind_method(D_METHOD("set_suffix", "column", "text"), &TreeItem::set_suffix);
+ ClassDB::bind_method(D_METHOD("get_suffix", "column"), &TreeItem::get_suffix);
+
ClassDB::bind_method(D_METHOD("set_icon", "column", "texture"), &TreeItem::set_icon);
ClassDB::bind_method(D_METHOD("get_icon", "column"), &TreeItem::get_icon);
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 22cd1c98ab..7afc1b2edd 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -504,7 +504,7 @@ bool SceneTree::idle(float p_time) {
String env_path = ProjectSettings::get_singleton()->get("rendering/environment/default_environment");
env_path = env_path.strip_edges(); //user may have added a space or two
String cpath;
- Ref<Environment> fallback = get_root()->get_world()->get_fallback_environment();
+ Ref<Environment> fallback = get_root()->get_world_3d()->get_fallback_environment();
if (fallback.is_valid()) {
cpath = fallback->get_path();
}
@@ -519,7 +519,7 @@ bool SceneTree::idle(float p_time) {
} else {
fallback.unref();
}
- get_root()->get_world()->set_fallback_environment(fallback);
+ get_root()->get_world_3d()->set_fallback_environment(fallback);
}
}
@@ -1409,8 +1409,8 @@ SceneTree::SceneTree() {
root = memnew(Window);
root->set_name("root");
- if (!root->get_world().is_valid())
- root->set_world(Ref<World3D>(memnew(World3D)));
+ if (!root->get_world_3d().is_valid())
+ root->set_world_3d(Ref<World3D>(memnew(World3D)));
// Initialize network state
multiplayer_poll = true;
@@ -1422,11 +1422,11 @@ SceneTree::SceneTree() {
current_scene = nullptr;
int msaa_mode = GLOBAL_DEF("rendering/quality/screen_filters/msaa", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/msaa", PropertyInfo(Variant::INT, "rendering/quality/screen_filters/msaa", PROPERTY_HINT_ENUM, "Disabled,2x,4x,8x,16x"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/msaa", PropertyInfo(Variant::INT, "rendering/quality/screen_filters/msaa", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Fast),4x (Average),8x (Slow),16x (Slower)"));
root->set_msaa(Viewport::MSAA(msaa_mode));
int ssaa_mode = GLOBAL_DEF("rendering/quality/screen_filters/screen_space_aa", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/screen_space_aa", PropertyInfo(Variant::INT, "rendering/quality/screen_filters/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled,FXAA"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/screen_space_aa", PropertyInfo(Variant::INT, "rendering/quality/screen_filters/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"));
root->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode));
{ //load default fallback environment
@@ -1447,7 +1447,7 @@ SceneTree::SceneTree() {
if (env_path != String()) {
Ref<Environment> env = ResourceLoader::load(env_path);
if (env.is_valid()) {
- root->get_world()->set_fallback_environment(env);
+ root->get_world_3d()->set_fallback_environment(env);
} else {
if (Engine::get_singleton()->is_editor_hint()) {
//file was erased, clear the field.
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index b0718eed79..e9827d521b 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -215,7 +215,7 @@ void Viewport::update_worlds() {
find_world_2d()->_update_viewport(this, xformed_rect);
find_world_2d()->_update();
- find_world()->_update(get_tree()->get_frame());
+ find_world_3d()->_update(get_tree()->get_frame());
}
void Viewport::_collision_object_input_event(CollisionObject3D *p_object, Camera3D *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape) {
@@ -422,22 +422,22 @@ void Viewport::_sub_window_remove(Window *p_window) {
RenderingServer::get_singleton()->viewport_set_parent_viewport(p_window->viewport, p_window->parent ? p_window->parent->viewport : RID());
}
-void Viewport::_own_world_changed() {
- ERR_FAIL_COND(world.is_null());
- ERR_FAIL_COND(own_world.is_null());
+void Viewport::_own_world_3d_changed() {
+ ERR_FAIL_COND(world_3d.is_null());
+ ERR_FAIL_COND(own_world_3d.is_null());
if (is_inside_tree()) {
_propagate_exit_world(this);
}
- own_world = world->duplicate();
+ own_world_3d = world_3d->duplicate();
if (is_inside_tree()) {
_propagate_enter_world(this);
}
if (is_inside_tree()) {
- RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world()->get_scenario());
+ RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world_3d()->get_scenario());
}
_update_listener();
@@ -459,7 +459,7 @@ void Viewport::_notification(int p_what) {
}
current_canvas = find_world_2d()->get_canvas();
- RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world()->get_scenario());
+ RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world_3d()->get_scenario());
RenderingServer::get_singleton()->viewport_attach_canvas(viewport, current_canvas);
_update_listener();
@@ -474,14 +474,14 @@ void Viewport::_notification(int p_what) {
contact_2d_debug = RenderingServer::get_singleton()->canvas_item_create();
RenderingServer::get_singleton()->canvas_item_set_parent(contact_2d_debug, find_world_2d()->get_canvas());
//3D
- PhysicsServer3D::get_singleton()->space_set_debug_contacts(find_world()->get_space(), get_tree()->get_collision_debug_contact_count());
+ PhysicsServer3D::get_singleton()->space_set_debug_contacts(find_world_3d()->get_space(), get_tree()->get_collision_debug_contact_count());
contact_3d_debug_multimesh = RenderingServer::get_singleton()->multimesh_create();
RenderingServer::get_singleton()->multimesh_allocate(contact_3d_debug_multimesh, get_tree()->get_collision_debug_contact_count(), RS::MULTIMESH_TRANSFORM_3D, true);
RenderingServer::get_singleton()->multimesh_set_visible_instances(contact_3d_debug_multimesh, 0);
RenderingServer::get_singleton()->multimesh_set_mesh(contact_3d_debug_multimesh, get_tree()->get_debug_contact_mesh()->get_rid());
contact_3d_debug_instance = RenderingServer::get_singleton()->instance_create();
RenderingServer::get_singleton()->instance_set_base(contact_3d_debug_instance, contact_3d_debug_multimesh);
- RenderingServer::get_singleton()->instance_set_scenario(contact_3d_debug_instance, find_world()->get_scenario());
+ RenderingServer::get_singleton()->instance_set_scenario(contact_3d_debug_instance, find_world_3d()->get_scenario());
//RenderingServer::get_singleton()->instance_geometry_set_flag(contact_3d_debug_instance, RS::INSTANCE_FLAG_VISIBLE_IN_ALL_ROOMS, true);
}
@@ -576,8 +576,8 @@ void Viewport::_notification(int p_what) {
if (get_tree()->is_debugging_collisions_hint() && contact_3d_debug_multimesh.is_valid()) {
- Vector<Vector3> points = PhysicsServer3D::get_singleton()->space_get_contacts(find_world()->get_space());
- int point_count = PhysicsServer3D::get_singleton()->space_get_contact_count(find_world()->get_space());
+ Vector<Vector3> points = PhysicsServer3D::get_singleton()->space_get_contacts(find_world_3d()->get_space());
+ int point_count = PhysicsServer3D::get_singleton()->space_get_contact_count(find_world_3d()->get_space());
RS::get_singleton()->multimesh_set_visible_instances(contact_3d_debug_multimesh, point_count);
}
@@ -805,7 +805,7 @@ void Viewport::_notification(int p_what) {
Vector3 from = camera->project_ray_origin(pos);
Vector3 dir = camera->project_ray_normal(pos);
- PhysicsDirectSpaceState3D *space = PhysicsServer3D::get_singleton()->space_get_direct_state(find_world()->get_space());
+ PhysicsDirectSpaceState3D *space = PhysicsServer3D::get_singleton()->space_get_direct_state(find_world_3d()->get_space());
if (space) {
bool col = space->intersect_ray(from, from + dir * 10000, result, Set<RID>(), 0xFFFFFFFF, true, true, true);
@@ -1185,7 +1185,7 @@ void Viewport::set_world_2d(const Ref<World2D> &p_world_2d) {
return;
if (parent && parent->find_world_2d() == p_world_2d) {
- WARN_PRINT("Unable to use parent world as world_2d");
+ WARN_PRINT("Unable to use parent world_3d as world_2d");
return;
}
@@ -1197,7 +1197,7 @@ void Viewport::set_world_2d(const Ref<World2D> &p_world_2d) {
if (p_world_2d.is_valid())
world_2d = p_world_2d;
else {
- WARN_PRINT("Invalid world");
+ WARN_PRINT("Invalid world_3d");
world_2d = Ref<World2D>(memnew(World2D));
}
@@ -1235,7 +1235,7 @@ void Viewport::_propagate_enter_world(Node *p_node) {
Viewport *v = Object::cast_to<Viewport>(p_node);
if (v) {
- if (v->world.is_valid() || v->own_world.is_valid())
+ if (v->world_3d.is_valid() || v->own_world_3d.is_valid())
return;
}
#ifndef _3D_DISABLED
@@ -1275,7 +1275,7 @@ void Viewport::_propagate_exit_world(Node *p_node) {
Viewport *v = Object::cast_to<Viewport>(p_node);
if (v) {
- if (v->world.is_valid() || v->own_world.is_valid())
+ if (v->world_3d.is_valid() || v->own_world_3d.is_valid())
return;
}
#ifndef _3D_DISABLED
@@ -1289,26 +1289,26 @@ void Viewport::_propagate_exit_world(Node *p_node) {
}
}
-void Viewport::set_world(const Ref<World3D> &p_world) {
+void Viewport::set_world_3d(const Ref<World3D> &p_world_3d) {
- if (world == p_world)
+ if (world_3d == p_world_3d)
return;
if (is_inside_tree())
_propagate_exit_world(this);
- if (own_world.is_valid() && world.is_valid()) {
- world->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_changed));
+ if (own_world_3d.is_valid() && world_3d.is_valid()) {
+ world_3d->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_3d_changed));
}
- world = p_world;
+ world_3d = p_world_3d;
- if (own_world.is_valid()) {
- if (world.is_valid()) {
- own_world = world->duplicate();
- world->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_changed));
+ if (own_world_3d.is_valid()) {
+ if (world_3d.is_valid()) {
+ own_world_3d = world_3d->duplicate();
+ world_3d->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_3d_changed));
} else {
- own_world = Ref<World3D>(memnew(World3D));
+ own_world_3d = Ref<World3D>(memnew(World3D));
}
}
@@ -1316,15 +1316,15 @@ void Viewport::set_world(const Ref<World3D> &p_world) {
_propagate_enter_world(this);
if (is_inside_tree()) {
- RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world()->get_scenario());
+ RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world_3d()->get_scenario());
}
_update_listener();
}
-Ref<World3D> Viewport::get_world() const {
+Ref<World3D> Viewport::get_world_3d() const {
- return world;
+ return world_3d;
}
Ref<World2D> Viewport::get_world_2d() const {
@@ -1332,14 +1332,14 @@ Ref<World2D> Viewport::get_world_2d() const {
return world_2d;
}
-Ref<World3D> Viewport::find_world() const {
+Ref<World3D> Viewport::find_world_3d() const {
- if (own_world.is_valid())
- return own_world;
- else if (world.is_valid())
- return world;
+ if (own_world_3d.is_valid())
+ return own_world_3d;
+ else if (world_3d.is_valid())
+ return world_3d;
else if (parent)
- return parent->find_world();
+ return parent->find_world_3d();
else
return Ref<World3D>();
}
@@ -3077,25 +3077,25 @@ void Viewport::unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coor
}
}
-void Viewport::set_use_own_world(bool p_world) {
+void Viewport::set_use_own_world_3d(bool p_world_3d) {
- if (p_world == own_world.is_valid())
+ if (p_world_3d == own_world_3d.is_valid())
return;
if (is_inside_tree())
_propagate_exit_world(this);
- if (!p_world) {
- own_world = Ref<World3D>();
- if (world.is_valid()) {
- world->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_changed));
+ if (!p_world_3d) {
+ own_world_3d = Ref<World3D>();
+ if (world_3d.is_valid()) {
+ world_3d->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_3d_changed));
}
} else {
- if (world.is_valid()) {
- own_world = world->duplicate();
- world->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_changed));
+ if (world_3d.is_valid()) {
+ own_world_3d = world_3d->duplicate();
+ world_3d->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_3d_changed));
} else {
- own_world = Ref<World3D>(memnew(World3D));
+ own_world_3d = Ref<World3D>(memnew(World3D));
}
}
@@ -3103,15 +3103,15 @@ void Viewport::set_use_own_world(bool p_world) {
_propagate_enter_world(this);
if (is_inside_tree()) {
- RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world()->get_scenario());
+ RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world_3d()->get_scenario());
}
_update_listener();
}
-bool Viewport::is_using_own_world() const {
+bool Viewport::is_using_own_world_3d() const {
- return own_world.is_valid();
+ return own_world_3d.is_valid();
}
void Viewport::set_physics_object_picking(bool p_enable) {
@@ -3366,9 +3366,9 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_world_2d", "world_2d"), &Viewport::set_world_2d);
ClassDB::bind_method(D_METHOD("get_world_2d"), &Viewport::get_world_2d);
ClassDB::bind_method(D_METHOD("find_world_2d"), &Viewport::find_world_2d);
- ClassDB::bind_method(D_METHOD("set_world", "world"), &Viewport::set_world);
- ClassDB::bind_method(D_METHOD("get_world"), &Viewport::get_world);
- ClassDB::bind_method(D_METHOD("find_world"), &Viewport::find_world);
+ ClassDB::bind_method(D_METHOD("set_world_3d", "world_3d"), &Viewport::set_world_3d);
+ ClassDB::bind_method(D_METHOD("get_world_3d"), &Viewport::get_world_3d);
+ ClassDB::bind_method(D_METHOD("find_world_3d"), &Viewport::find_world_3d);
ClassDB::bind_method(D_METHOD("set_canvas_transform", "xform"), &Viewport::set_canvas_transform);
ClassDB::bind_method(D_METHOD("get_canvas_transform"), &Viewport::get_canvas_transform);
@@ -3404,8 +3404,8 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("update_worlds"), &Viewport::update_worlds);
- ClassDB::bind_method(D_METHOD("set_use_own_world", "enable"), &Viewport::set_use_own_world);
- ClassDB::bind_method(D_METHOD("is_using_own_world"), &Viewport::is_using_own_world);
+ ClassDB::bind_method(D_METHOD("set_use_own_world_3d", "enable"), &Viewport::set_use_own_world_3d);
+ ClassDB::bind_method(D_METHOD("is_using_own_world_3d"), &Viewport::is_using_own_world_3d);
ClassDB::bind_method(D_METHOD("get_camera"), &Viewport::get_camera);
@@ -3453,8 +3453,8 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_default_canvas_item_texture_repeat", "mode"), &Viewport::set_default_canvas_item_texture_repeat);
ClassDB::bind_method(D_METHOD("get_default_canvas_item_texture_repeat"), &Viewport::get_default_canvas_item_texture_repeat);
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "own_world"), "set_use_own_world", "is_using_own_world");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world", PROPERTY_HINT_RESOURCE_TYPE, "World"), "set_world", "get_world");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "own_world_3d"), "set_use_own_world_3d", "is_using_own_world_3d");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world_3d", PROPERTY_HINT_RESOURCE_TYPE, "World3D"), "set_world_3d", "get_world_3d");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world_2d", PROPERTY_HINT_RESOURCE_TYPE, "World2D", 0), "set_world_2d", "get_world_2d");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "transparent_bg"), "set_transparent_background", "has_transparent_background");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "handle_input_locally"), "set_handle_input_locally", "is_handling_input_locally");
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 7e2df9fe42..7da57347fd 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -253,8 +253,8 @@ private:
Map<ObjectID, uint64_t> physics_2d_mouseover;
Ref<World2D> world_2d;
- Ref<World3D> world;
- Ref<World3D> own_world;
+ Ref<World3D> world_3d;
+ Ref<World3D> own_world_3d;
Rect2i to_screen_rect;
StringName input_group;
@@ -430,7 +430,7 @@ private:
void _gui_set_root_order_dirty();
- void _own_world_changed();
+ void _own_world_3d_changed();
friend class Window;
@@ -477,10 +477,10 @@ public:
Rect2 get_visible_rect() const;
RID get_viewport_rid() const;
- void set_world(const Ref<World3D> &p_world);
+ void set_world_3d(const Ref<World3D> &p_world_3d);
void set_world_2d(const Ref<World2D> &p_world_2d);
- Ref<World3D> get_world() const;
- Ref<World3D> find_world() const;
+ Ref<World3D> get_world_3d() const;
+ Ref<World3D> find_world_3d() const;
Ref<World2D> get_world_2d() const;
Ref<World2D> find_world_2d() const;
@@ -519,8 +519,8 @@ public:
Vector2 get_camera_coords(const Vector2 &p_viewport_coords) const;
Vector2 get_camera_rect_size() const;
- void set_use_own_world(bool p_world);
- bool is_using_own_world() const;
+ void set_use_own_world_3d(bool p_world_3d);
+ bool is_using_own_world_3d() const;
void input_text(const String &p_text);
void input(const Ref<InputEvent> &p_event, bool p_local_coords = false);
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp
index ab2657c892..5a3282478c 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/capsule_shape_2d.cpp
@@ -72,6 +72,9 @@ real_t CapsuleShape2D::get_radius() const {
void CapsuleShape2D::set_height(real_t p_height) {
height = p_height;
+ if (height < 0)
+ height = 0;
+
_update_shape();
}
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index ae705a47e8..d96013a081 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -1237,7 +1237,7 @@ void Curve3D::_bake() const {
p = mid;
Plane post;
post.normal = pos;
- post.d = Math::lerp(points[i].tilt, points[i + 1].tilt, mid);
+ post.distance = Math::lerp(points[i].tilt, points[i + 1].tilt, mid);
pointlist.push_back(post);
} else {
@@ -1274,7 +1274,7 @@ void Curve3D::_bake() const {
for (List<Plane>::Element *E = pointlist.front(); E; E = E->next()) {
w[idx] = E->get().normal;
- wt[idx] = E->get().d;
+ wt[idx] = E->get().distance;
if (!up_vector_enabled) {
idx++;
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index eea4d12d0e..442151de36 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -221,6 +221,8 @@ Error DynamicFontAtSize::_load() {
ascent = (face->size->metrics.ascender / 64.0) / oversampling * scale_color_font;
descent = (-face->size->metrics.descender / 64.0) / oversampling * scale_color_font;
+ underline_position = -face->underline_position / 64.0 / oversampling * scale_color_font;
+ underline_thickness = face->underline_thickness / 64.0 / oversampling * scale_color_font;
linegap = 0;
valid = true;
@@ -243,6 +245,16 @@ float DynamicFontAtSize::get_descent() const {
return descent;
}
+float DynamicFontAtSize::get_underline_position() const {
+
+ return underline_position;
+}
+
+float DynamicFontAtSize::get_underline_thickness() const {
+
+ return underline_thickness;
+}
+
const Pair<const DynamicFontAtSize::Character *, DynamicFontAtSize *> DynamicFontAtSize::_find_char_with_font(CharType p_char, const Vector<Ref<DynamicFontAtSize>> &p_fallbacks) const {
const Character *chr = char_map.getptr(p_char);
ERR_FAIL_COND_V(!chr, (Pair<const Character *, DynamicFontAtSize *>(nullptr, nullptr)));
@@ -821,6 +833,22 @@ float DynamicFont::get_descent() const {
return data_at_size->get_descent() + spacing_bottom;
}
+float DynamicFont::get_underline_position() const {
+
+ if (!data_at_size.is_valid())
+ return 2;
+
+ return data_at_size->get_underline_position();
+}
+
+float DynamicFont::get_underline_thickness() const {
+
+ if (!data_at_size.is_valid())
+ return 1;
+
+ return data_at_size->get_underline_thickness();
+}
+
Size2 DynamicFont::get_char_size(CharType p_char, CharType p_next) const {
if (!data_at_size.is_valid())
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index ef4b9dd9d0..2fa1951d27 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -124,6 +124,8 @@ class DynamicFontAtSize : public Reference {
float rect_margin;
float oversampling;
float scale_color_font;
+ float underline_position;
+ float underline_thickness;
bool valid;
@@ -187,6 +189,8 @@ public:
float get_ascent() const;
float get_descent() const;
+ float get_underline_position() const;
+ float get_underline_thickness() const;
Size2 get_char_size(CharType p_char, CharType p_next, const Vector<Ref<DynamicFontAtSize>> &p_fallbacks) const;
@@ -274,6 +278,8 @@ public:
virtual float get_ascent() const;
virtual float get_descent() const;
+ virtual float get_underline_position() const;
+ virtual float get_underline_thickness() const;
virtual Size2 get_char_size(CharType p_char, CharType p_next = 0) const;
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 267816f267..51c2ff389a 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -356,6 +356,16 @@ float BitmapFont::get_descent() const {
return height - ascent;
}
+float BitmapFont::get_underline_position() const {
+
+ return 2;
+}
+
+float BitmapFont::get_underline_thickness() const {
+
+ return 1;
+}
+
void BitmapFont::add_texture(const Ref<Texture2D> &p_texture) {
ERR_FAIL_COND_MSG(p_texture.is_null(), "It's not a reference to a valid Texture object.");
diff --git a/scene/resources/font.h b/scene/resources/font.h
index c233344529..54b1eaa1b9 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -47,6 +47,8 @@ public:
virtual float get_ascent() const = 0;
virtual float get_descent() const = 0;
+ virtual float get_underline_position() const = 0;
+ virtual float get_underline_thickness() const = 0;
virtual Size2 get_char_size(CharType p_char, CharType p_next = 0) const = 0;
Size2 get_string_size(const String &p_string) const;
@@ -167,6 +169,8 @@ public:
void set_ascent(float p_ascent);
float get_ascent() const;
float get_descent() const;
+ float get_underline_position() const;
+ float get_underline_thickness() const;
void add_texture(const Ref<Texture2D> &p_texture);
void add_char(CharType p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance = -1);
diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp
index a1c1b2f9f4..71d4f79e48 100644
--- a/scene/resources/line_shape_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -35,7 +35,7 @@
bool LineShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
- Vector2 point = get_d() * get_normal();
+ Vector2 point = get_distance() * get_normal();
Vector2 l[2][2] = { { point - get_normal().tangent() * 100, point + get_normal().tangent() * 100 }, { point, point + get_normal() * 30 } };
for (int i = 0; i < 2; i++) {
@@ -51,7 +51,7 @@ void LineShape2D::_update_shape() {
Array arr;
arr.push_back(normal);
- arr.push_back(d);
+ arr.push_back(distance);
PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), arr);
emit_changed();
}
@@ -62,9 +62,9 @@ void LineShape2D::set_normal(const Vector2 &p_normal) {
_update_shape();
}
-void LineShape2D::set_d(real_t p_d) {
+void LineShape2D::set_distance(real_t p_distance) {
- d = p_d;
+ distance = p_distance;
_update_shape();
}
@@ -72,14 +72,14 @@ Vector2 LineShape2D::get_normal() const {
return normal;
}
-real_t LineShape2D::get_d() const {
+real_t LineShape2D::get_distance() const {
- return d;
+ return distance;
}
void LineShape2D::draw(const RID &p_to_rid, const Color &p_color) {
- Vector2 point = get_d() * get_normal();
+ Vector2 point = get_distance() * get_normal();
Vector2 l1[2] = { point - get_normal().tangent() * 100, point + get_normal().tangent() * 100 };
RS::get_singleton()->canvas_item_add_line(p_to_rid, l1[0], l1[1], p_color, 3);
@@ -88,7 +88,7 @@ void LineShape2D::draw(const RID &p_to_rid, const Color &p_color) {
}
Rect2 LineShape2D::get_rect() const {
- Vector2 point = get_d() * get_normal();
+ Vector2 point = get_distance() * get_normal();
Vector2 l1[2] = { point - get_normal().tangent() * 100, point + get_normal().tangent() * 100 };
Vector2 l2[2] = { point, point + get_normal() * 30 };
@@ -101,7 +101,7 @@ Rect2 LineShape2D::get_rect() const {
}
real_t LineShape2D::get_enclosing_radius() const {
- return d;
+ return distance;
}
void LineShape2D::_bind_methods() {
@@ -109,17 +109,17 @@ void LineShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_normal", "normal"), &LineShape2D::set_normal);
ClassDB::bind_method(D_METHOD("get_normal"), &LineShape2D::get_normal);
- ClassDB::bind_method(D_METHOD("set_d", "d"), &LineShape2D::set_d);
- ClassDB::bind_method(D_METHOD("get_d"), &LineShape2D::get_d);
+ ClassDB::bind_method(D_METHOD("set_distance", "distance"), &LineShape2D::set_distance);
+ ClassDB::bind_method(D_METHOD("get_distance"), &LineShape2D::get_distance);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "normal"), "set_normal", "get_normal");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "d"), "set_d", "get_d");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance"), "set_distance", "get_distance");
}
LineShape2D::LineShape2D() :
Shape2D(PhysicsServer2D::get_singleton()->line_shape_create()) {
normal = Vector2(0, 1);
- d = 0;
+ distance = 0;
_update_shape();
}
diff --git a/scene/resources/line_shape_2d.h b/scene/resources/line_shape_2d.h
index 5bf9e85bb9..74e8d57d03 100644
--- a/scene/resources/line_shape_2d.h
+++ b/scene/resources/line_shape_2d.h
@@ -37,7 +37,7 @@ class LineShape2D : public Shape2D {
GDCLASS(LineShape2D, Shape2D);
Vector2 normal;
- real_t d;
+ real_t distance;
void _update_shape();
@@ -48,10 +48,10 @@ public:
virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
void set_normal(const Vector2 &p_normal);
- void set_d(real_t p_d);
+ void set_distance(real_t p_distance);
Vector2 get_normal() const;
- real_t get_d() const;
+ real_t get_distance() const;
virtual void draw(const RID &p_to_rid, const Color &p_color);
virtual Rect2 get_rect() const;
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 401b689145..adecf5cf8f 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -1522,7 +1522,7 @@ Error ArrayMesh::lightmap_unwrap_cached(int *&r_cache_data, unsigned int &r_cach
if (lightmap_surfaces[surface].format & ARRAY_FORMAT_TANGENT) {
Plane t;
t.normal = v.tangent;
- t.d = v.binormal.dot(v.normal.cross(v.tangent)) < 0 ? -1 : 1;
+ t.distance = v.binormal.dot(v.normal.cross(v.tangent)) < 0 ? -1 : 1;
surfaces_tools.write[surface]->add_tangent(t);
}
if (lightmap_surfaces[surface].format & ARRAY_FORMAT_BONES) {
diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp
index 76d96786bc..e4d402479f 100644
--- a/scene/resources/mesh_data_tool.cpp
+++ b/scene/resources/mesh_data_tool.cpp
@@ -255,7 +255,7 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) {
ta[i * 4 + 0] = vtx.tangent.normal.x;
ta[i * 4 + 1] = vtx.tangent.normal.y;
ta[i * 4 + 2] = vtx.tangent.normal.z;
- ta[i * 4 + 3] = vtx.tangent.d;
+ ta[i * 4 + 3] = vtx.tangent.distance;
}
if (uv)
uv[i] = vtx.uv;
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 4b392e23b7..c5e1aa7c80 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -107,7 +107,7 @@ void SurfaceTool::add_vertex(const Vector3 &p_vertex) {
vtx.weights = last_weights;
vtx.bones = last_bones;
vtx.tangent = last_tangent.normal;
- vtx.binormal = last_normal.cross(last_tangent.normal).normalized() * last_tangent.d;
+ vtx.binormal = last_normal.cross(last_tangent.normal).normalized() * last_tangent.distance;
const int expected_vertices = 4;
@@ -575,7 +575,7 @@ Vector<SurfaceTool::Vertex> SurfaceTool::create_vertex_array_from_triangle_array
if (lformat & RS::ARRAY_FORMAT_TANGENT) {
Plane p(tarr[i * 4 + 0], tarr[i * 4 + 1], tarr[i * 4 + 2], tarr[i * 4 + 3]);
v.tangent = p.normal;
- v.binormal = p.normal.cross(v.tangent).normalized() * p.d;
+ v.binormal = p.normal.cross(v.tangent).normalized() * p.distance;
}
if (lformat & RS::ARRAY_FORMAT_COLOR)
v.color = carr[i];
@@ -658,7 +658,7 @@ void SurfaceTool::_create_list_from_arrays(Array arr, List<Vertex> *r_vertex, Li
if (lformat & RS::ARRAY_FORMAT_TANGENT) {
Plane p(tarr[i * 4 + 0], tarr[i * 4 + 1], tarr[i * 4 + 2], tarr[i * 4 + 3]);
v.tangent = p.normal;
- v.binormal = p.normal.cross(v.tangent).normalized() * p.d;
+ v.binormal = p.normal.cross(v.tangent).normalized() * p.distance;
}
if (lformat & RS::ARRAY_FORMAT_COLOR)
v.color = carr[i];
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index 310a7ef4e4..3b245f908a 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -1630,9 +1630,11 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = {
{ Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "light_vec", "vec3(LIGHT_VEC, 0.0)" },
{ Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "light_height", "LIGHT_HEIGHT" },
{ Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "light_color", "LIGHT_COLOR.rgb" },
- { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "light_alpha", "LIGHT_COLOR.a" },
+ { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "light_alpha", "LIGHT_COLOR.a" },
{ Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "light_uv", "vec3(LIGHT_UV, 0.0)" },
{ Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "shadow_color", "SHADOW_COLOR.rgb" },
+ { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "shadow_alpha", "SHADOW_COLOR.a" },
+ { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "shadow_vec", "vec3(SHADOW_VEC, 0.0)" },
{ Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "screen_uv", "vec3(SCREEN_UV, 0.0)" },
{ Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "texture_pixel_size", "vec3(TEXTURE_PIXEL_SIZE, 1.0)" },
{ Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "point_coord", "vec3(POINT_COORD, 0.0)" },
@@ -2156,12 +2158,43 @@ String VisualShaderNodeUniform::get_uniform_name() const {
return uniform_name;
}
+void VisualShaderNodeUniform::set_qualifier(VisualShaderNodeUniform::Qualifier p_qual) {
+ qualifier = p_qual;
+ emit_changed();
+}
+
+VisualShaderNodeUniform::Qualifier VisualShaderNodeUniform::get_qualifier() const {
+ return qualifier;
+}
+
void VisualShaderNodeUniform::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_uniform_name", "name"), &VisualShaderNodeUniform::set_uniform_name);
ClassDB::bind_method(D_METHOD("get_uniform_name"), &VisualShaderNodeUniform::get_uniform_name);
+ ClassDB::bind_method(D_METHOD("set_qualifier", "qualifier"), &VisualShaderNodeUniform::set_qualifier);
+ ClassDB::bind_method(D_METHOD("get_qualifier"), &VisualShaderNodeUniform::get_qualifier);
+
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "uniform_name"), "set_uniform_name", "get_uniform_name");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "qualifier", PROPERTY_HINT_ENUM, "None,Global,Instance"), "set_qualifier", "get_qualifier");
+
+ BIND_ENUM_CONSTANT(QUAL_NONE);
+ BIND_ENUM_CONSTANT(QUAL_GLOBAL);
+ BIND_ENUM_CONSTANT(QUAL_INSTANCE);
+}
+
+String VisualShaderNodeUniform::_get_qual_str() const {
+ if (is_qualifier_supported(qualifier)) {
+ switch (qualifier) {
+ case QUAL_NONE:
+ break;
+ case QUAL_GLOBAL:
+ return "global ";
+ case QUAL_INSTANCE:
+ return "instance ";
+ }
+ }
+ return String();
}
String VisualShaderNodeUniform::get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const {
@@ -2171,11 +2204,21 @@ String VisualShaderNodeUniform::get_warning(Shader::Mode p_mode, VisualShader::T
if (keyword_list.find(uniform_name)) {
return TTR("Uniform name cannot be equal to a shader keyword. Choose another name.");
}
+ if (!is_qualifier_supported(qualifier)) {
+ return "This uniform type does not support that qualifier.";
+ }
return String();
}
+Vector<StringName> VisualShaderNodeUniform::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("qualifier");
+ return props;
+}
+
VisualShaderNodeUniform::VisualShaderNodeUniform() {
+ qualifier = QUAL_NONE;
}
////////////// GroupBase
diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h
index ecf3f93fbb..56f8e74d2b 100644
--- a/scene/resources/visual_shader.h
+++ b/scene/resources/visual_shader.h
@@ -369,21 +369,38 @@ public:
class VisualShaderNodeUniform : public VisualShaderNode {
GDCLASS(VisualShaderNodeUniform, VisualShaderNode);
+public:
+ enum Qualifier {
+ QUAL_NONE,
+ QUAL_GLOBAL,
+ QUAL_INSTANCE,
+ };
+
private:
String uniform_name;
+ Qualifier qualifier;
protected:
static void _bind_methods();
+ String _get_qual_str() const;
public:
void set_uniform_name(const String &p_name);
String get_uniform_name() const;
+ void set_qualifier(Qualifier p_qual);
+ Qualifier get_qualifier() const;
+
+ virtual bool is_qualifier_supported(Qualifier p_qual) const = 0;
+
+ virtual Vector<StringName> get_editable_properties() const;
virtual String get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const;
VisualShaderNodeUniform();
};
+VARIANT_ENUM_CAST(VisualShaderNodeUniform::Qualifier)
+
class VisualShaderNodeGroupBase : public VisualShaderNode {
GDCLASS(VisualShaderNodeGroupBase, VisualShaderNode);
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp
index 2064ca10f3..7b9953a90f 100644
--- a/scene/resources/visual_shader_nodes.cpp
+++ b/scene/resources/visual_shader_nodes.cpp
@@ -3283,11 +3283,11 @@ String VisualShaderNodeFloatUniform::get_output_port_name(int p_port) const {
String VisualShaderNodeFloatUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
if (hint == HINT_RANGE) {
- return "uniform float " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n";
+ return _get_qual_str() + "uniform float " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n";
} else if (hint == HINT_RANGE_STEP) {
- return "uniform float " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ", " + rtos(hint_range_step) + ");\n";
+ return _get_qual_str() + "uniform float " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ", " + rtos(hint_range_step) + ");\n";
}
- return "uniform float " + get_uniform_name() + ";\n";
+ return _get_qual_str() + "uniform float " + get_uniform_name() + ";\n";
}
String VisualShaderNodeFloatUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
@@ -3353,8 +3353,12 @@ void VisualShaderNodeFloatUniform::_bind_methods() {
BIND_ENUM_CONSTANT(HINT_RANGE_STEP);
}
+bool VisualShaderNodeFloatUniform::is_qualifier_supported(Qualifier p_qual) const {
+ return true; // all qualifiers are supported
+}
+
Vector<StringName> VisualShaderNodeFloatUniform::get_editable_properties() const {
- Vector<StringName> props;
+ Vector<StringName> props = VisualShaderNodeUniform::get_editable_properties();
props.push_back("hint");
if (hint == HINT_RANGE || hint == HINT_RANGE_STEP) {
props.push_back("min");
@@ -3405,11 +3409,11 @@ String VisualShaderNodeIntUniform::get_output_port_name(int p_port) const {
String VisualShaderNodeIntUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
if (hint == HINT_RANGE) {
- return "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n";
+ return _get_qual_str() + "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n";
} else if (hint == HINT_RANGE_STEP) {
- return "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ", " + rtos(hint_range_step) + ");\n";
+ return _get_qual_str() + "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ", " + rtos(hint_range_step) + ");\n";
}
- return "uniform int " + get_uniform_name() + ";\n";
+ return _get_qual_str() + "uniform int " + get_uniform_name() + ";\n";
}
String VisualShaderNodeIntUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
@@ -3475,8 +3479,12 @@ void VisualShaderNodeIntUniform::_bind_methods() {
BIND_ENUM_CONSTANT(HINT_RANGE_STEP);
}
+bool VisualShaderNodeIntUniform::is_qualifier_supported(Qualifier p_qual) const {
+ return true; // all qualifiers are supported
+}
+
Vector<StringName> VisualShaderNodeIntUniform::get_editable_properties() const {
- Vector<StringName> props;
+ Vector<StringName> props = VisualShaderNodeUniform::get_editable_properties();
props.push_back("hint");
if (hint == HINT_RANGE || hint == HINT_RANGE_STEP) {
props.push_back("min");
@@ -3526,13 +3534,17 @@ String VisualShaderNodeBooleanUniform::get_output_port_name(int p_port) const {
}
String VisualShaderNodeBooleanUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
- return "uniform bool " + get_uniform_name() + ";\n";
+ return _get_qual_str() + "uniform bool " + get_uniform_name() + ";\n";
}
String VisualShaderNodeBooleanUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n";
}
+bool VisualShaderNodeBooleanUniform::is_qualifier_supported(Qualifier p_qual) const {
+ return true; // all qualifiers are supported
+}
+
VisualShaderNodeBooleanUniform::VisualShaderNodeBooleanUniform() {
}
@@ -3568,7 +3580,7 @@ String VisualShaderNodeColorUniform::get_output_port_name(int p_port) const {
String VisualShaderNodeColorUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
- return "uniform vec4 " + get_uniform_name() + " : hint_color;\n";
+ return _get_qual_str() + "uniform vec4 " + get_uniform_name() + " : hint_color;\n";
}
String VisualShaderNodeColorUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
@@ -3577,6 +3589,10 @@ String VisualShaderNodeColorUniform::generate_code(Shader::Mode p_mode, VisualSh
return code;
}
+bool VisualShaderNodeColorUniform::is_qualifier_supported(Qualifier p_qual) const {
+ return true; // all qualifiers are supported
+}
+
VisualShaderNodeColorUniform::VisualShaderNodeColorUniform() {
}
@@ -3611,13 +3627,17 @@ String VisualShaderNodeVec3Uniform::get_output_port_name(int p_port) const {
}
String VisualShaderNodeVec3Uniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
- return "uniform vec3 " + get_uniform_name() + ";\n";
+ return _get_qual_str() + "uniform vec3 " + get_uniform_name() + ";\n";
}
String VisualShaderNodeVec3Uniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n";
}
+bool VisualShaderNodeVec3Uniform::is_qualifier_supported(Qualifier p_qual) const {
+ return true; // all qualifiers are supported
+}
+
VisualShaderNodeVec3Uniform::VisualShaderNodeVec3Uniform() {
}
@@ -3652,13 +3672,17 @@ String VisualShaderNodeTransformUniform::get_output_port_name(int p_port) const
}
String VisualShaderNodeTransformUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
- return "uniform mat4 " + get_uniform_name() + ";\n";
+ return _get_qual_str() + "uniform mat4 " + get_uniform_name() + ";\n";
}
String VisualShaderNodeTransformUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n";
}
+bool VisualShaderNodeTransformUniform::is_qualifier_supported(Qualifier p_qual) const {
+ return true; // all qualifiers are supported
+}
+
VisualShaderNodeTransformUniform::VisualShaderNodeTransformUniform() {
}
@@ -3713,7 +3737,7 @@ String VisualShaderNodeTextureUniform::get_output_port_name(int p_port) const {
}
String VisualShaderNodeTextureUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
- String code = "uniform sampler2D " + get_uniform_name();
+ String code = _get_qual_str() + "uniform sampler2D " + get_uniform_name();
switch (texture_type) {
case TYPE_DATA:
@@ -3778,7 +3802,7 @@ VisualShaderNodeTextureUniform::ColorDefault VisualShaderNodeTextureUniform::get
}
Vector<StringName> VisualShaderNodeTextureUniform::get_editable_properties() const {
- Vector<StringName> props;
+ Vector<StringName> props = VisualShaderNodeUniform::get_editable_properties();
props.push_back("texture_type");
props.push_back("color_default");
return props;
@@ -3810,6 +3834,18 @@ String VisualShaderNodeTextureUniform::get_input_port_default_hint(int p_port) c
return "";
}
+bool VisualShaderNodeTextureUniform::is_qualifier_supported(Qualifier p_qual) const {
+ switch (p_qual) {
+ case Qualifier::QUAL_NONE:
+ return true;
+ case Qualifier::QUAL_GLOBAL:
+ return true;
+ case Qualifier::QUAL_INSTANCE:
+ return false;
+ }
+ return false;
+}
+
VisualShaderNodeTextureUniform::VisualShaderNodeTextureUniform() {
texture_type = TYPE_DATA;
color_default = COLOR_DEFAULT_WHITE;
@@ -3952,7 +3988,7 @@ String VisualShaderNodeCubemapUniform::get_input_port_default_hint(int p_port) c
}
String VisualShaderNodeCubemapUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
- String code = "uniform samplerCube " + get_uniform_name();
+ String code = _get_qual_str() + "uniform samplerCube " + get_uniform_name();
switch (texture_type) {
case TYPE_DATA:
diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h
index 035e39230c..69f42f621a 100644
--- a/scene/resources/visual_shader_nodes.h
+++ b/scene/resources/visual_shader_nodes.h
@@ -1457,6 +1457,8 @@ public:
void set_step(float p_value);
float get_step() const;
+ bool is_qualifier_supported(Qualifier p_qual) const;
+
virtual Vector<StringName> get_editable_properties() const;
VisualShaderNodeFloatUniform();
@@ -1509,6 +1511,8 @@ public:
void set_step(int p_value);
int get_step() const;
+ bool is_qualifier_supported(Qualifier p_qual) const;
+
virtual Vector<StringName> get_editable_properties() const;
VisualShaderNodeIntUniform();
@@ -1535,6 +1539,8 @@ public:
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+ bool is_qualifier_supported(Qualifier p_qual) const;
+
VisualShaderNodeBooleanUniform();
};
@@ -1557,6 +1563,8 @@ public:
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+ bool is_qualifier_supported(Qualifier p_qual) const;
+
VisualShaderNodeColorUniform();
};
@@ -1579,6 +1587,8 @@ public:
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+ bool is_qualifier_supported(Qualifier p_qual) const;
+
VisualShaderNodeVec3Uniform();
};
@@ -1601,6 +1611,8 @@ public:
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+ bool is_qualifier_supported(Qualifier p_qual) const;
+
VisualShaderNodeTransformUniform();
};
@@ -1652,6 +1664,8 @@ public:
void set_color_default(ColorDefault p_default);
ColorDefault get_color_default() const;
+ bool is_qualifier_supported(Qualifier p_qual) const;
+
VisualShaderNodeTextureUniform();
};
diff --git a/scene/resources/world_margin_shape_3d.cpp b/scene/resources/world_margin_shape_3d.cpp
index aa96f8aa68..833e7725ae 100644
--- a/scene/resources/world_margin_shape_3d.cpp
+++ b/scene/resources/world_margin_shape_3d.cpp
@@ -41,10 +41,10 @@ Vector<Vector3> WorldMarginShape3D::get_debug_mesh_lines() {
Vector3 n2 = p.normal.cross(n1).normalized();
Vector3 pface[4] = {
- p.normal * p.d + n1 * 10.0 + n2 * 10.0,
- p.normal * p.d + n1 * 10.0 + n2 * -10.0,
- p.normal * p.d + n1 * -10.0 + n2 * -10.0,
- p.normal * p.d + n1 * -10.0 + n2 * 10.0,
+ p.normal * p.distance + n1 * 10.0 + n2 * 10.0,
+ p.normal * p.distance + n1 * 10.0 + n2 * -10.0,
+ p.normal * p.distance + n1 * -10.0 + n2 * -10.0,
+ p.normal * p.distance + n1 * -10.0 + n2 * 10.0,
};
points.push_back(pface[0]);
@@ -55,8 +55,8 @@ Vector<Vector3> WorldMarginShape3D::get_debug_mesh_lines() {
points.push_back(pface[3]);
points.push_back(pface[3]);
points.push_back(pface[0]);
- points.push_back(p.normal * p.d);
- points.push_back(p.normal * p.d + p.normal * 3);
+ points.push_back(p.normal * p.distance);
+ points.push_back(p.normal * p.distance + p.normal * 3);
return points;
}
diff --git a/servers/physics_3d/collision_solver_3d_sat.cpp b/servers/physics_3d/collision_solver_3d_sat.cpp
index 5096b080ab..d663209f6d 100644
--- a/servers/physics_3d/collision_solver_3d_sat.cpp
+++ b/servers/physics_3d/collision_solver_3d_sat.cpp
@@ -194,7 +194,7 @@ static void _generate_contacts_face_face(const Vector3 *p_points_A, int p_point_
// calculate intersection
Vector3 rel = edge1_A - edge0_A;
real_t den = clip.normal.dot(rel);
- real_t dist = -(clip.normal.dot(edge0_A) - clip.d) / den;
+ real_t dist = -(clip.normal.dot(edge0_A) - clip.distance) / den;
Vector3 inters = edge0_A + rel * dist;
ERR_FAIL_COND(dst_idx >= max_clip);
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index eb92cf55e3..60217002fb 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -218,7 +218,6 @@ void register_server_singletons() {
Engine::get_singleton()->add_singleton(Engine::Singleton("DisplayServer", DisplayServer::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("RenderingServer", RenderingServer::get_singleton()));
- Engine::get_singleton()->add_singleton(Engine::Singleton("RenderingDevice", RenderingDevice::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("AudioServer", AudioServer::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer2D", PhysicsServer2D::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer3D", PhysicsServer3D::get_singleton()));
diff --git a/servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp
index d469dd97ca..afd1296002 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp
@@ -558,7 +558,7 @@ void RasterizerEffectsRD::sub_surface_scattering(RID p_diffuse, RID p_diffuse2,
int32_t y_groups = (p_screen_size.height - 1) / 8 + 1;
Plane p = p_camera.xform4(Plane(1, 0, -1, 1));
- p.normal /= p.d;
+ p.normal /= p.distance;
float unit_size = p.normal.x;
{ //scale color and depth to half
diff --git a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
index c2bd41a746..8ca8446c23 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
@@ -1368,7 +1368,7 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
gui[0] = v.normal.x;
gui[1] = v.normal.y;
gui[2] = v.normal.z;
- gui[3] = v.d;
+ gui[3] = v.distance;
}
} break;
case ShaderLanguage::TYPE_MAT2: {
@@ -4929,7 +4929,7 @@ void RasterizerStorageRD::_global_variable_store_in_buffer(int32_t p_index, RS::
bv.x = v.normal.x;
bv.y = v.normal.y;
bv.z = v.normal.z;
- bv.w = v.d;
+ bv.w = v.distance;
} break;
case RS::GLOBAL_VAR_TYPE_COLOR: {
GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
@@ -5833,14 +5833,14 @@ RasterizerStorageRD::RasterizerStorageRD() {
sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.use_anisotropy = true;
- sampler_state.anisotropy_max = GLOBAL_GET("rendering/quality/texture_filters/max_anisotropy");
+ sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/quality/texture_filters/anisotropic_filtering_level"));
} break;
case RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: {
sampler_state.mag_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.use_anisotropy = true;
- sampler_state.anisotropy_max = GLOBAL_GET("rendering/quality/texture_filters/max_anisotropy");
+ sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/quality/texture_filters/anisotropic_filtering_level"));
} break;
default: {
diff --git a/servers/rendering/rendering_server_scene.h b/servers/rendering/rendering_server_scene.h
index db2fbd6707..eb66cea3aa 100644
--- a/servers/rendering/rendering_server_scene.h
+++ b/servers/rendering/rendering_server_scene.h
@@ -82,7 +82,7 @@ public:
Camera() {
visible_layers = 0xFFFFFFFF;
- fov = 70;
+ fov = 75;
type = PERSPECTIVE;
znear = 0.05;
zfar = 100;
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 908f05702c..dace935e89 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -2451,7 +2451,8 @@ RenderingServer::RenderingServer() {
GLOBAL_DEF("rendering/quality/depth_prepass/disable_for_vendors", "PowerVR,Mali,Adreno,Apple");
GLOBAL_DEF("rendering/quality/texture_filters/use_nearest_mipmap_filter", false);
- GLOBAL_DEF("rendering/quality/texture_filters/max_anisotropy", 4);
+ GLOBAL_DEF("rendering/quality/texture_filters/anisotropic_filtering_level", 2);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/texture_filters/anisotropic_filtering_level", PropertyInfo(Variant::INT, "rendering/quality/texture_filters/anisotropic_filtering_level", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Faster),4x (Fast),8x (Average),16x (Slow)"));
GLOBAL_DEF("rendering/quality/depth_of_field/depth_of_field_bokeh_shape", 1);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/depth_of_field/depth_of_field_bokeh_shape", PropertyInfo(Variant::INT, "rendering/quality/depth_of_field/depth_of_field_bokeh_shape", PROPERTY_HINT_ENUM, "Box (Fast),Hexagon (Average),Circle (Slow)"));
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 1a3588e0e0..e51e7d7f24 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -140,7 +140,7 @@ Use UI font variant if available, because it has tight vertical metrics and good
## freetype
- Upstream: https://www.freetype.org
-- Version: 2.10.1 (2019)
+- Version: 2.10.2 (2020)
- License: FreeType License (BSD-like)
Files extracted from upstream source:
diff --git a/thirdparty/freetype/include/freetype/config/ftconfig.h b/thirdparty/freetype/include/freetype/config/ftconfig.h
index 9466603377..14eecefc2a 100644
--- a/thirdparty/freetype/include/freetype/config/ftconfig.h
+++ b/thirdparty/freetype/include/freetype/config/ftconfig.h
@@ -4,7 +4,7 @@
*
* ANSI-specific configuration file (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/config/ftheader.h b/thirdparty/freetype/include/freetype/config/ftheader.h
index 696d6ba906..e91598e207 100644
--- a/thirdparty/freetype/include/freetype/config/ftheader.h
+++ b/thirdparty/freetype/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
*
* Build macros of the FreeType 2 library.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/config/ftoption.h b/thirdparty/freetype/include/freetype/config/ftoption.h
index 12f47a82e8..426806d2e4 100644
--- a/thirdparty/freetype/include/freetype/config/ftoption.h
+++ b/thirdparty/freetype/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
*
* User-selectable configuration macros (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -294,6 +294,22 @@ FT_BEGIN_HEADER
/**************************************************************************
*
+ * Brotli support.
+ *
+ * FreeType uses the Brotli library to provide support for decompressing
+ * WOFF2 streams.
+ *
+ * Define this macro if you want to enable this 'feature'.
+ *
+ * If you use a build system like cmake or the `configure` script,
+ * options set by those programs have precedence, overwriting the value
+ * here with the configured one.
+ */
+/* #define FT_CONFIG_OPTION_USE_BROTLI */
+
+
+ /**************************************************************************
+ *
* Glyph Postscript Names handling
*
* By default, FreeType 2 is compiled with the 'psnames' module. This
@@ -871,9 +887,11 @@ FT_BEGIN_HEADER
*
* Compile 'autofit' module with fallback Indic script support, covering
* some scripts that the 'latin' submodule of the 'autofit' module doesn't
- * (yet) handle.
+ * (yet) handle. Currently, this needs option `AF_CONFIG_OPTION_CJK`.
*/
+#ifdef AF_CONFIG_OPTION_CJK
#define AF_CONFIG_OPTION_INDIC
+#endif
/**************************************************************************
diff --git a/thirdparty/freetype/include/freetype/config/ftstdlib.h b/thirdparty/freetype/include/freetype/config/ftstdlib.h
index 438b6145d5..d6091f8b3d 100644
--- a/thirdparty/freetype/include/freetype/config/ftstdlib.h
+++ b/thirdparty/freetype/include/freetype/config/ftstdlib.h
@@ -5,7 +5,7 @@
* ANSI-specific library and header configuration file (specification
* only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/freetype.h b/thirdparty/freetype/include/freetype/freetype.h
index a6bb667e3a..973264b125 100644
--- a/thirdparty/freetype/include/freetype/freetype.h
+++ b/thirdparty/freetype/include/freetype/freetype.h
@@ -4,7 +4,7 @@
*
* FreeType high-level API and common types (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -1239,7 +1239,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_HORIZONTAL( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) )
/**************************************************************************
@@ -1253,7 +1253,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_VERTICAL( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_VERTICAL )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) )
/**************************************************************************
@@ -1267,7 +1267,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_KERNING( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_KERNING )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_KERNING ) )
/**************************************************************************
@@ -1282,7 +1282,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_SCALABLE( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_SCALABLE )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) )
/**************************************************************************
@@ -1301,7 +1301,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_SFNT( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_SFNT )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_SFNT ) )
/**************************************************************************
@@ -1316,7 +1316,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_FIXED_WIDTH( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) )
/**************************************************************************
@@ -1331,7 +1331,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_FIXED_SIZES( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) )
/**************************************************************************
@@ -1357,7 +1357,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_GLYPH_NAMES( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) )
/**************************************************************************
@@ -1372,7 +1372,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_MULTIPLE_MASTERS( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) )
/**************************************************************************
@@ -1394,7 +1394,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_NAMED_INSTANCE( face ) \
- ( (face)->face_index & 0x7FFF0000L )
+ ( !!( (face)->face_index & 0x7FFF0000L ) )
/**************************************************************************
@@ -1412,7 +1412,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_VARIATION( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_VARIATION )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_VARIATION ) )
/**************************************************************************
@@ -1429,7 +1429,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_CID_KEYED( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_CID_KEYED )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) )
/**************************************************************************
@@ -1443,7 +1443,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_TRICKY( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_TRICKY )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_TRICKY ) )
/**************************************************************************
@@ -1460,7 +1460,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_COLOR( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_COLOR )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )
/**************************************************************************
@@ -2078,7 +2078,8 @@ FT_BEGIN_HEADER
* The size in bytes of the file in memory.
*
* pathname ::
- * A pointer to an 8-bit file pathname.
+ * A pointer to an 8-bit file pathname. The pointer is not owned by
+ * FreeType.
*
* stream ::
* A handle to a source stream object.
@@ -4781,7 +4782,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 10
-#define FREETYPE_PATCH 1
+#define FREETYPE_PATCH 2
/**************************************************************************
diff --git a/thirdparty/freetype/include/freetype/ftadvanc.h b/thirdparty/freetype/include/freetype/ftadvanc.h
index 95c38f92bd..c30472bfdb 100644
--- a/thirdparty/freetype/include/freetype/ftadvanc.h
+++ b/thirdparty/freetype/include/freetype/ftadvanc.h
@@ -4,7 +4,7 @@
*
* Quick computation of advance widths (specification only).
*
- * Copyright (C) 2008-2019 by
+ * Copyright (C) 2008-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftbbox.h b/thirdparty/freetype/include/freetype/ftbbox.h
index 22da70c0dc..294f996976 100644
--- a/thirdparty/freetype/include/freetype/ftbbox.h
+++ b/thirdparty/freetype/include/freetype/ftbbox.h
@@ -4,7 +4,7 @@
*
* FreeType exact bbox computation (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftbdf.h b/thirdparty/freetype/include/freetype/ftbdf.h
index 1c46da5985..61db27c8f8 100644
--- a/thirdparty/freetype/include/freetype/ftbdf.h
+++ b/thirdparty/freetype/include/freetype/ftbdf.h
@@ -4,7 +4,7 @@
*
* FreeType API for accessing BDF-specific strings (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftbitmap.h b/thirdparty/freetype/include/freetype/ftbitmap.h
index a6acdb9690..6c55455767 100644
--- a/thirdparty/freetype/include/freetype/ftbitmap.h
+++ b/thirdparty/freetype/include/freetype/ftbitmap.h
@@ -4,7 +4,7 @@
*
* FreeType utility functions for bitmaps (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftbzip2.h b/thirdparty/freetype/include/freetype/ftbzip2.h
index ae88cfdbdb..cb8e8458ef 100644
--- a/thirdparty/freetype/include/freetype/ftbzip2.h
+++ b/thirdparty/freetype/include/freetype/ftbzip2.h
@@ -4,7 +4,7 @@
*
* Bzip2-compressed stream support.
*
- * Copyright (C) 2010-2019 by
+ * Copyright (C) 2010-2020 by
* Joel Klinghed.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftcache.h b/thirdparty/freetype/include/freetype/ftcache.h
index 0d589d0b34..d82c4815cf 100644
--- a/thirdparty/freetype/include/freetype/ftcache.h
+++ b/thirdparty/freetype/include/freetype/ftcache.h
@@ -4,7 +4,7 @@
*
* FreeType Cache subsystem (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftcid.h b/thirdparty/freetype/include/freetype/ftcid.h
index 8eafc1c78f..85b74e0047 100644
--- a/thirdparty/freetype/include/freetype/ftcid.h
+++ b/thirdparty/freetype/include/freetype/ftcid.h
@@ -4,7 +4,7 @@
*
* FreeType API for accessing CID font information (specification).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* Dereg Clegg and Michael Toftdal.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftcolor.h b/thirdparty/freetype/include/freetype/ftcolor.h
index cf18021953..b744939dd8 100644
--- a/thirdparty/freetype/include/freetype/ftcolor.h
+++ b/thirdparty/freetype/include/freetype/ftcolor.h
@@ -4,7 +4,7 @@
*
* FreeType's glyph color management (specification).
*
- * Copyright (C) 2018-2019 by
+ * Copyright (C) 2018-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -125,9 +125,9 @@ FT_BEGIN_HEADER
* The number of palettes.
*
* palette_name_ids ::
- * A read-only array of palette name IDs with `num_palettes` elements,
- * corresponding to entries like 'dark' or 'light' in the font's 'name'
- * table.
+ * An optional read-only array of palette name IDs with `num_palettes`
+ * elements, corresponding to entries like 'dark' or 'light' in the
+ * font's 'name' table.
*
* An empty name ID in the 'CPAL' table gets represented as value
* 0xFFFF.
@@ -135,8 +135,8 @@ FT_BEGIN_HEADER
* `NULL` if the font's 'CPAL' table doesn't contain appropriate data.
*
* palette_flags ::
- * A read-only array of palette flags with `num_palettes` elements.
- * Possible values are an ORed combination of
+ * An optional read-only array of palette flags with `num_palettes`
+ * elements. Possible values are an ORed combination of
* @FT_PALETTE_FOR_LIGHT_BACKGROUND and
* @FT_PALETTE_FOR_DARK_BACKGROUND.
*
@@ -147,7 +147,7 @@ FT_BEGIN_HEADER
* same size.
*
* palette_entry_name_ids ::
- * A read-only array of palette entry name IDs with
+ * An optional read-only array of palette entry name IDs with
* `num_palette_entries`. In each palette, entries with the same index
* have the same function. For example, index~0 might correspond to
* string 'outline' in the font's 'name' table to indicate that this
@@ -163,6 +163,9 @@ FT_BEGIN_HEADER
* Use function @FT_Get_Sfnt_Name to map name IDs and entry name IDs to
* name strings.
*
+ * Use function @FT_Palette_Select to get the colors associated with a
+ * palette entry.
+ *
* @since:
* 2.10
*/
diff --git a/thirdparty/freetype/include/freetype/ftdriver.h b/thirdparty/freetype/include/freetype/ftdriver.h
index 497bde9f6e..19b666ecb0 100644
--- a/thirdparty/freetype/include/freetype/ftdriver.h
+++ b/thirdparty/freetype/include/freetype/ftdriver.h
@@ -4,7 +4,7 @@
*
* FreeType API for controlling driver modules (specification only).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/fterrdef.h b/thirdparty/freetype/include/freetype/fterrdef.h
index 9bc7dc65e3..895d2d4dc8 100644
--- a/thirdparty/freetype/include/freetype/fterrdef.h
+++ b/thirdparty/freetype/include/freetype/fterrdef.h
@@ -4,7 +4,7 @@
*
* FreeType error codes (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/fterrors.h b/thirdparty/freetype/include/freetype/fterrors.h
index 2b47eb2096..771bc5db52 100644
--- a/thirdparty/freetype/include/freetype/fterrors.h
+++ b/thirdparty/freetype/include/freetype/fterrors.h
@@ -4,7 +4,7 @@
*
* FreeType error code handling (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftfntfmt.h b/thirdparty/freetype/include/freetype/ftfntfmt.h
index aae0b13264..ad5a1d4162 100644
--- a/thirdparty/freetype/include/freetype/ftfntfmt.h
+++ b/thirdparty/freetype/include/freetype/ftfntfmt.h
@@ -4,7 +4,7 @@
*
* Support functions for font formats.
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftgasp.h b/thirdparty/freetype/include/freetype/ftgasp.h
index 24673d8ce1..aca1a1329d 100644
--- a/thirdparty/freetype/include/freetype/ftgasp.h
+++ b/thirdparty/freetype/include/freetype/ftgasp.h
@@ -4,7 +4,7 @@
*
* Access of TrueType's 'gasp' table (specification).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftglyph.h b/thirdparty/freetype/include/freetype/ftglyph.h
index fedab8491e..ec515a3694 100644
--- a/thirdparty/freetype/include/freetype/ftglyph.h
+++ b/thirdparty/freetype/include/freetype/ftglyph.h
@@ -4,7 +4,7 @@
*
* FreeType convenience functions to handle glyphs (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftgxval.h b/thirdparty/freetype/include/freetype/ftgxval.h
index b14f637c56..691a73b94a 100644
--- a/thirdparty/freetype/include/freetype/ftgxval.h
+++ b/thirdparty/freetype/include/freetype/ftgxval.h
@@ -4,7 +4,7 @@
*
* FreeType API for validating TrueTypeGX/AAT tables (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* Masatake YAMATO, Redhat K.K,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/include/freetype/ftgzip.h b/thirdparty/freetype/include/freetype/ftgzip.h
index 418c61228e..f588c8503b 100644
--- a/thirdparty/freetype/include/freetype/ftgzip.h
+++ b/thirdparty/freetype/include/freetype/ftgzip.h
@@ -4,7 +4,7 @@
*
* Gzip-compressed stream support.
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftimage.h b/thirdparty/freetype/include/freetype/ftimage.h
index face34fe49..185967c1b8 100644
--- a/thirdparty/freetype/include/freetype/ftimage.h
+++ b/thirdparty/freetype/include/freetype/ftimage.h
@@ -5,7 +5,7 @@
* FreeType glyph image formats and default raster interface
* (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftincrem.h b/thirdparty/freetype/include/freetype/ftincrem.h
index a4db02b585..8c00cfe41c 100644
--- a/thirdparty/freetype/include/freetype/ftincrem.h
+++ b/thirdparty/freetype/include/freetype/ftincrem.h
@@ -4,7 +4,7 @@
*
* FreeType incremental loading (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftlcdfil.h b/thirdparty/freetype/include/freetype/ftlcdfil.h
index 3a19d043bb..c5516d0e0d 100644
--- a/thirdparty/freetype/include/freetype/ftlcdfil.h
+++ b/thirdparty/freetype/include/freetype/ftlcdfil.h
@@ -5,7 +5,7 @@
* FreeType API for color filtering of subpixel bitmap glyphs
* (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftlist.h b/thirdparty/freetype/include/freetype/ftlist.h
index 4782892d1a..3f6079f243 100644
--- a/thirdparty/freetype/include/freetype/ftlist.h
+++ b/thirdparty/freetype/include/freetype/ftlist.h
@@ -4,7 +4,7 @@
*
* Generic list support for FreeType (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftlzw.h b/thirdparty/freetype/include/freetype/ftlzw.h
index fd22968f5a..37a53c1b3e 100644
--- a/thirdparty/freetype/include/freetype/ftlzw.h
+++ b/thirdparty/freetype/include/freetype/ftlzw.h
@@ -4,7 +4,7 @@
*
* LZW-compressed stream support.
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftmac.h b/thirdparty/freetype/include/freetype/ftmac.h
index 92b9f3dc0f..c1a0aa373e 100644
--- a/thirdparty/freetype/include/freetype/ftmac.h
+++ b/thirdparty/freetype/include/freetype/ftmac.h
@@ -4,7 +4,7 @@
*
* Additional Mac-specific API.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftmm.h b/thirdparty/freetype/include/freetype/ftmm.h
index f2e16b6408..0d839942b9 100644
--- a/thirdparty/freetype/include/freetype/ftmm.h
+++ b/thirdparty/freetype/include/freetype/ftmm.h
@@ -4,7 +4,7 @@
*
* FreeType Multiple Master font interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftmodapi.h b/thirdparty/freetype/include/freetype/ftmodapi.h
index 8d039c4f3a..01cb5fba88 100644
--- a/thirdparty/freetype/include/freetype/ftmodapi.h
+++ b/thirdparty/freetype/include/freetype/ftmodapi.h
@@ -4,7 +4,7 @@
*
* FreeType modules public interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftmoderr.h b/thirdparty/freetype/include/freetype/ftmoderr.h
index e16993572c..5e6aeeb43e 100644
--- a/thirdparty/freetype/include/freetype/ftmoderr.h
+++ b/thirdparty/freetype/include/freetype/ftmoderr.h
@@ -4,7 +4,7 @@
*
* FreeType module error offsets (specification).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftotval.h b/thirdparty/freetype/include/freetype/ftotval.h
index c034f48959..6f46c414bd 100644
--- a/thirdparty/freetype/include/freetype/ftotval.h
+++ b/thirdparty/freetype/include/freetype/ftotval.h
@@ -4,7 +4,7 @@
*
* FreeType API for validating OpenType tables (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftoutln.h b/thirdparty/freetype/include/freetype/ftoutln.h
index b72327b703..fa295b0ab6 100644
--- a/thirdparty/freetype/include/freetype/ftoutln.h
+++ b/thirdparty/freetype/include/freetype/ftoutln.h
@@ -5,7 +5,7 @@
* Support for the FT_Outline type used to store glyph shapes of
* most scalable font formats (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftparams.h b/thirdparty/freetype/include/freetype/ftparams.h
index c374ee2f2f..255c6bb160 100644
--- a/thirdparty/freetype/include/freetype/ftparams.h
+++ b/thirdparty/freetype/include/freetype/ftparams.h
@@ -4,7 +4,7 @@
*
* FreeType API for possible FT_Parameter tags (specification only).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftpfr.h b/thirdparty/freetype/include/freetype/ftpfr.h
index b4eca76eb7..58fbbb78d3 100644
--- a/thirdparty/freetype/include/freetype/ftpfr.h
+++ b/thirdparty/freetype/include/freetype/ftpfr.h
@@ -4,7 +4,7 @@
*
* FreeType API for accessing PFR-specific data (specification only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftrender.h b/thirdparty/freetype/include/freetype/ftrender.h
index a01c774272..6845111901 100644
--- a/thirdparty/freetype/include/freetype/ftrender.h
+++ b/thirdparty/freetype/include/freetype/ftrender.h
@@ -4,7 +4,7 @@
*
* FreeType renderer modules public interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftsizes.h b/thirdparty/freetype/include/freetype/ftsizes.h
index 6c63cef2bf..7dc9295211 100644
--- a/thirdparty/freetype/include/freetype/ftsizes.h
+++ b/thirdparty/freetype/include/freetype/ftsizes.h
@@ -4,7 +4,7 @@
*
* FreeType size objects management (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftsnames.h b/thirdparty/freetype/include/freetype/ftsnames.h
index 4d43602a42..2982760635 100644
--- a/thirdparty/freetype/include/freetype/ftsnames.h
+++ b/thirdparty/freetype/include/freetype/ftsnames.h
@@ -7,7 +7,7 @@
*
* This is _not_ used to retrieve glyph names!
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftstroke.h b/thirdparty/freetype/include/freetype/ftstroke.h
index 01a9c1811c..141af7d0ba 100644
--- a/thirdparty/freetype/include/freetype/ftstroke.h
+++ b/thirdparty/freetype/include/freetype/ftstroke.h
@@ -4,7 +4,7 @@
*
* FreeType path stroker (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -114,22 +114,19 @@ FT_BEGIN_HEADER
* FT_STROKER_LINEJOIN_MITER_FIXED ::
* Used to render mitered line joins, with fixed bevels if the miter
* limit is exceeded. The outer edges of the strokes for the two
- * segments are extended until they meet at an angle. If the segments
- * meet at too sharp an angle (such that the miter would extend from
- * the intersection of the segments a distance greater than the product
- * of the miter limit value and the border radius), then a bevel join
- * (see above) is used instead. This prevents long spikes being
- * created. `FT_STROKER_LINEJOIN_MITER_FIXED` generates a miter line
- * join as used in PostScript and PDF.
+ * segments are extended until they meet at an angle. A bevel join
+ * (see above) is used if the segments meet at too sharp an angle and
+ * the outer edges meet beyond a distance corresponding to the meter
+ * limit. This prevents long spikes being created.
+ * `FT_STROKER_LINEJOIN_MITER_FIXED` generates a miter line join as
+ * used in PostScript and PDF.
*
* FT_STROKER_LINEJOIN_MITER_VARIABLE ::
* FT_STROKER_LINEJOIN_MITER ::
* Used to render mitered line joins, with variable bevels if the miter
- * limit is exceeded. The intersection of the strokes is clipped at a
- * line perpendicular to the bisector of the angle between the strokes,
- * at the distance from the intersection of the segments equal to the
- * product of the miter limit value and the border radius. This
- * prevents long spikes being created.
+ * limit is exceeded. The intersection of the strokes is clipped
+ * perpendicularly to the bisector, at a distance corresponding to
+ * the miter limit. This prevents long spikes being created.
* `FT_STROKER_LINEJOIN_MITER_VARIABLE` generates a mitered line join
* as used in XPS. `FT_STROKER_LINEJOIN_MITER` is an alias for
* `FT_STROKER_LINEJOIN_MITER_VARIABLE`, retained for backward
@@ -296,12 +293,17 @@ FT_BEGIN_HEADER
* The line join style.
*
* miter_limit ::
- * The miter limit for the `FT_STROKER_LINEJOIN_MITER_FIXED` and
- * `FT_STROKER_LINEJOIN_MITER_VARIABLE` line join styles, expressed as
- * 16.16 fixed-point value.
+ * The maximum reciprocal sine of half-angle at the miter join,
+ * expressed as 16.16 fixed point value.
*
* @note:
- * The radius is expressed in the same units as the outline coordinates.
+ * The `radius` is expressed in the same units as the outline
+ * coordinates.
+ *
+ * The `miter_limit` multiplied by the `radius` gives the maximum size
+ * of a miter spike, at which it is clipped for
+ * @FT_STROKER_LINEJOIN_MITER_VARIABLE or replaced with a bevel join for
+ * @FT_STROKER_LINEJOIN_MITER_FIXED.
*
* This function calls @FT_Stroker_Rewind automatically.
*/
diff --git a/thirdparty/freetype/include/freetype/ftsynth.h b/thirdparty/freetype/include/freetype/ftsynth.h
index 8754f97cee..3882e69e61 100644
--- a/thirdparty/freetype/include/freetype/ftsynth.h
+++ b/thirdparty/freetype/include/freetype/ftsynth.h
@@ -5,7 +5,7 @@
* FreeType synthesizing code for emboldening and slanting
* (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftsystem.h b/thirdparty/freetype/include/freetype/ftsystem.h
index 889a6ba172..f7fecb53f3 100644
--- a/thirdparty/freetype/include/freetype/ftsystem.h
+++ b/thirdparty/freetype/include/freetype/ftsystem.h
@@ -4,7 +4,7 @@
*
* FreeType low-level system interface definition (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/fttrigon.h b/thirdparty/freetype/include/freetype/fttrigon.h
index 37e1412fdf..968df1fbfd 100644
--- a/thirdparty/freetype/include/freetype/fttrigon.h
+++ b/thirdparty/freetype/include/freetype/fttrigon.h
@@ -4,7 +4,7 @@
*
* FreeType trigonometric functions (specification).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/fttypes.h b/thirdparty/freetype/include/freetype/fttypes.h
index 10571505a5..cb785d98b2 100644
--- a/thirdparty/freetype/include/freetype/fttypes.h
+++ b/thirdparty/freetype/include/freetype/fttypes.h
@@ -4,7 +4,7 @@
*
* FreeType simple types definitions (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ftwinfnt.h b/thirdparty/freetype/include/freetype/ftwinfnt.h
index a2fba903d2..bacb8aa373 100644
--- a/thirdparty/freetype/include/freetype/ftwinfnt.h
+++ b/thirdparty/freetype/include/freetype/ftwinfnt.h
@@ -4,7 +4,7 @@
*
* FreeType API for accessing Windows fnt-specific data.
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/autohint.h b/thirdparty/freetype/include/freetype/internal/autohint.h
index f64c28bb2c..438f9c175e 100644
--- a/thirdparty/freetype/include/freetype/internal/autohint.h
+++ b/thirdparty/freetype/include/freetype/internal/autohint.h
@@ -4,7 +4,7 @@
*
* High-level 'autohint' module-specific interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/cffotypes.h b/thirdparty/freetype/include/freetype/internal/cffotypes.h
index b26893eab3..207eeda5ff 100644
--- a/thirdparty/freetype/include/freetype/internal/cffotypes.h
+++ b/thirdparty/freetype/include/freetype/internal/cffotypes.h
@@ -4,7 +4,7 @@
*
* Basic OpenType/CFF object type definitions (specification).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/cfftypes.h b/thirdparty/freetype/include/freetype/internal/cfftypes.h
index 2fc905ec79..40b0fc73c9 100644
--- a/thirdparty/freetype/include/freetype/internal/cfftypes.h
+++ b/thirdparty/freetype/include/freetype/internal/cfftypes.h
@@ -5,7 +5,7 @@
* Basic OpenType/CFF type definitions and interface (specification
* only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftcalc.h b/thirdparty/freetype/include/freetype/internal/ftcalc.h
index 1811fcd1ea..3054a4c497 100644
--- a/thirdparty/freetype/include/freetype/internal/ftcalc.h
+++ b/thirdparty/freetype/include/freetype/internal/ftcalc.h
@@ -4,7 +4,7 @@
*
* Arithmetic computations (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftdebug.h b/thirdparty/freetype/include/freetype/internal/ftdebug.h
index 54a9673afa..00d258e642 100644
--- a/thirdparty/freetype/include/freetype/internal/ftdebug.h
+++ b/thirdparty/freetype/include/freetype/internal/ftdebug.h
@@ -4,7 +4,7 @@
*
* Debugging and logging component (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftdrv.h b/thirdparty/freetype/include/freetype/internal/ftdrv.h
index 09e846e1c7..1dd9206c87 100644
--- a/thirdparty/freetype/include/freetype/internal/ftdrv.h
+++ b/thirdparty/freetype/include/freetype/internal/ftdrv.h
@@ -4,7 +4,7 @@
*
* FreeType internal font driver interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftgloadr.h b/thirdparty/freetype/include/freetype/internal/ftgloadr.h
index 770871d81b..6f3793b1c0 100644
--- a/thirdparty/freetype/include/freetype/internal/ftgloadr.h
+++ b/thirdparty/freetype/include/freetype/internal/ftgloadr.h
@@ -4,7 +4,7 @@
*
* The FreeType glyph loader (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftmemory.h b/thirdparty/freetype/include/freetype/internal/ftmemory.h
index 78bd3bc229..e0758c127a 100644
--- a/thirdparty/freetype/include/freetype/internal/ftmemory.h
+++ b/thirdparty/freetype/include/freetype/internal/ftmemory.h
@@ -4,7 +4,7 @@
*
* The FreeType memory management macros (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg
*
* This file is part of the FreeType project, and may only be used,
@@ -57,6 +57,14 @@ FT_BEGIN_HEADER
/*************************************************************************/
+ /* The calculation `NULL + n' is undefined in C. Even if the resulting */
+ /* pointer doesn't get dereferenced, this causes warnings with */
+ /* sanitizers. */
+ /* */
+ /* We thus provide a macro that should be used if `base' can be NULL. */
+#define FT_OFFSET( base, count ) ( (base) ? (base) + (count) : NULL )
+
+
/*
* C++ refuses to handle statements like p = (void*)anything, with `p' a
* typed pointer. Since we don't have a `typeof' operator in standard C++,
@@ -153,10 +161,10 @@ extern "C++"
(FT_Long)(size), \
&error ) )
-#define FT_MEM_FREE( ptr ) \
- FT_BEGIN_STMNT \
- ft_mem_free( memory, (ptr) ); \
- (ptr) = NULL; \
+#define FT_MEM_FREE( ptr ) \
+ FT_BEGIN_STMNT \
+ FT_DEBUG_INNER( ft_mem_free( memory, (ptr) ) ); \
+ (ptr) = NULL; \
FT_END_STMNT
#define FT_MEM_NEW( ptr ) \
diff --git a/thirdparty/freetype/include/freetype/internal/ftobjs.h b/thirdparty/freetype/include/freetype/internal/ftobjs.h
index 0c1d3e5bf2..140eebc7c6 100644
--- a/thirdparty/freetype/include/freetype/internal/ftobjs.h
+++ b/thirdparty/freetype/include/freetype/internal/ftobjs.h
@@ -4,7 +4,7 @@
*
* The FreeType private base classes (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftpsprop.h b/thirdparty/freetype/include/freetype/internal/ftpsprop.h
index 574837f6d4..72907c4c3a 100644
--- a/thirdparty/freetype/include/freetype/internal/ftpsprop.h
+++ b/thirdparty/freetype/include/freetype/internal/ftpsprop.h
@@ -4,7 +4,7 @@
*
* Get and set properties of PostScript drivers (specification).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftrfork.h b/thirdparty/freetype/include/freetype/internal/ftrfork.h
index 75b3e531bb..9a275a5155 100644
--- a/thirdparty/freetype/include/freetype/internal/ftrfork.h
+++ b/thirdparty/freetype/include/freetype/internal/ftrfork.h
@@ -4,7 +4,7 @@
*
* Embedded resource forks accessor (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* Masatake YAMATO and Redhat K.K.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftserv.h b/thirdparty/freetype/include/freetype/internal/ftserv.h
index 8836cf3f18..bcaf4720d5 100644
--- a/thirdparty/freetype/include/freetype/internal/ftserv.h
+++ b/thirdparty/freetype/include/freetype/internal/ftserv.h
@@ -4,7 +4,7 @@
*
* The FreeType services (specification only).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/ftstream.h b/thirdparty/freetype/include/freetype/internal/ftstream.h
index a579a039b9..f3b3ef0d02 100644
--- a/thirdparty/freetype/include/freetype/internal/ftstream.h
+++ b/thirdparty/freetype/include/freetype/internal/ftstream.h
@@ -4,7 +4,7 @@
*
* Stream handling (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/fttrace.h b/thirdparty/freetype/include/freetype/internal/fttrace.h
index f5f9598046..58bd77413c 100644
--- a/thirdparty/freetype/include/freetype/internal/fttrace.h
+++ b/thirdparty/freetype/include/freetype/internal/fttrace.h
@@ -4,7 +4,7 @@
*
* Tracing handling (specification only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -49,6 +49,7 @@ FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */
FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
FT_TRACE_DEF( sfwoff ) /* WOFF format handler (sfwoff.c) */
+FT_TRACE_DEF( sfwoff2 ) /* WOFF2 format handler (sfwoff2.c) */
FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */
FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
FT_TRACE_DEF( ttcolr ) /* glyph layer table (ttcolr.c) */
diff --git a/thirdparty/freetype/include/freetype/internal/ftvalid.h b/thirdparty/freetype/include/freetype/internal/ftvalid.h
index 38aa06cc4e..62aea4dc68 100644
--- a/thirdparty/freetype/include/freetype/internal/ftvalid.h
+++ b/thirdparty/freetype/include/freetype/internal/ftvalid.h
@@ -4,7 +4,7 @@
*
* FreeType validation support (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/internal.h b/thirdparty/freetype/include/freetype/internal/internal.h
index 3c8830f7e4..766bf64c23 100644
--- a/thirdparty/freetype/include/freetype/internal/internal.h
+++ b/thirdparty/freetype/include/freetype/internal/internal.h
@@ -4,7 +4,7 @@
*
* Internal header files (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/psaux.h b/thirdparty/freetype/include/freetype/internal/psaux.h
index f962a973de..8248a0ecdb 100644
--- a/thirdparty/freetype/include/freetype/internal/psaux.h
+++ b/thirdparty/freetype/include/freetype/internal/psaux.h
@@ -5,7 +5,7 @@
* Auxiliary functions and data structures related to PostScript fonts
* (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/pshints.h b/thirdparty/freetype/include/freetype/internal/pshints.h
index 699acea6f5..cf0c65298c 100644
--- a/thirdparty/freetype/include/freetype/internal/pshints.h
+++ b/thirdparty/freetype/include/freetype/internal/pshints.h
@@ -6,7 +6,7 @@
* recorders (specification only). These are used to support native
* T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers.
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svbdf.h b/thirdparty/freetype/include/freetype/internal/services/svbdf.h
index e4786ed038..0ec9c7ccb0 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svbdf.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svbdf.h
@@ -4,7 +4,7 @@
*
* The FreeType BDF services (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svcfftl.h b/thirdparty/freetype/include/freetype/internal/services/svcfftl.h
index 6c621732da..c2f42c1d17 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svcfftl.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svcfftl.h
@@ -4,7 +4,7 @@
*
* The FreeType CFF tables loader service (specification).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svcid.h b/thirdparty/freetype/include/freetype/internal/services/svcid.h
index 555a5af5b9..b8efd8147b 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svcid.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svcid.h
@@ -4,7 +4,7 @@
*
* The FreeType CID font services (specification).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* Derek Clegg and Michael Toftdal.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h b/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h
index 6f4285ea8c..5ec84c933c 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h
@@ -4,7 +4,7 @@
*
* The FreeType font format service (specification only).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svgldict.h b/thirdparty/freetype/include/freetype/internal/services/svgldict.h
index 0949621835..5a63883c90 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svgldict.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svgldict.h
@@ -4,7 +4,7 @@
*
* The FreeType glyph dictionary services (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svgxval.h b/thirdparty/freetype/include/freetype/internal/services/svgxval.h
index 0bb76f3144..d0cb10a423 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svgxval.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svgxval.h
@@ -4,7 +4,7 @@
*
* FreeType API for validating TrueTypeGX/AAT tables (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/include/freetype/internal/services/svkern.h b/thirdparty/freetype/include/freetype/internal/services/svkern.h
index f992a327c1..891c61a755 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svkern.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svkern.h
@@ -4,7 +4,7 @@
*
* The FreeType Kerning service (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svmetric.h b/thirdparty/freetype/include/freetype/internal/services/svmetric.h
index d688bc7c60..06faa4b4f8 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svmetric.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svmetric.h
@@ -4,7 +4,7 @@
*
* The FreeType services for metrics variations (specification).
*
- * Copyright (C) 2016-2019 by
+ * Copyright (C) 2016-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svmm.h b/thirdparty/freetype/include/freetype/internal/services/svmm.h
index 3652f2050a..fa044c92dd 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svmm.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svmm.h
@@ -4,7 +4,7 @@
*
* The FreeType Multiple Masters and GX var services (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svotval.h b/thirdparty/freetype/include/freetype/internal/services/svotval.h
index cab4c6efbb..34ad7ca9f1 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svotval.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svotval.h
@@ -4,7 +4,7 @@
*
* The FreeType OpenType validation service (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svpfr.h b/thirdparty/freetype/include/freetype/internal/services/svpfr.h
index fd01d614dd..2dd075c5da 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svpfr.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svpfr.h
@@ -4,7 +4,7 @@
*
* Internal PFR service functions (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svpostnm.h b/thirdparty/freetype/include/freetype/internal/services/svpostnm.h
index 18e3843cbe..86ab611382 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svpostnm.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svpostnm.h
@@ -4,7 +4,7 @@
*
* The FreeType PostScript name services (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svprop.h b/thirdparty/freetype/include/freetype/internal/services/svprop.h
index e48d0151ec..8f755436a1 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svprop.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svprop.h
@@ -4,7 +4,7 @@
*
* The FreeType property service (specification).
*
- * Copyright (C) 2012-2019 by
+ * Copyright (C) 2012-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svpscmap.h b/thirdparty/freetype/include/freetype/internal/services/svpscmap.h
index dfac3bafa9..6c2ffe2e2a 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svpscmap.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svpscmap.h
@@ -4,7 +4,7 @@
*
* The FreeType PostScript charmap service (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h b/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h
index fb4e0e3fa9..ade24dc2ba 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h
@@ -4,7 +4,7 @@
*
* The FreeType PostScript info service (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svsfnt.h b/thirdparty/freetype/include/freetype/internal/services/svsfnt.h
index 464aa209f7..f3e81ca84e 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svsfnt.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svsfnt.h
@@ -4,7 +4,7 @@
*
* The FreeType SFNT table loading service (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svttcmap.h b/thirdparty/freetype/include/freetype/internal/services/svttcmap.h
index 0fcb81371d..fbb3115ed4 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svttcmap.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svttcmap.h
@@ -4,7 +4,7 @@
*
* The FreeType TrueType/sfnt cmap extra information service.
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* Masatake YAMATO, Redhat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/include/freetype/internal/services/svtteng.h b/thirdparty/freetype/include/freetype/internal/services/svtteng.h
index a852f5c6fb..6218d9efe0 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svtteng.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svtteng.h
@@ -4,7 +4,7 @@
*
* The FreeType TrueType engine query service (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svttglyf.h b/thirdparty/freetype/include/freetype/internal/services/svttglyf.h
index c8798771fb..d9894e362d 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svttglyf.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svttglyf.h
@@ -4,7 +4,7 @@
*
* The FreeType TrueType glyph service.
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* David Turner.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h b/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h
index 38ee020965..377f73d450 100644
--- a/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h
+++ b/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h
@@ -4,7 +4,7 @@
*
* The FreeType Windows FNT/FONT service (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/sfnt.h b/thirdparty/freetype/include/freetype/internal/sfnt.h
index b19241c306..b9c81a8f37 100644
--- a/thirdparty/freetype/include/freetype/internal/sfnt.h
+++ b/thirdparty/freetype/include/freetype/internal/sfnt.h
@@ -4,7 +4,7 @@
*
* High-level 'sfnt' driver interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/t1types.h b/thirdparty/freetype/include/freetype/internal/t1types.h
index d94c8c1284..799c2939fa 100644
--- a/thirdparty/freetype/include/freetype/internal/t1types.h
+++ b/thirdparty/freetype/include/freetype/internal/t1types.h
@@ -5,7 +5,7 @@
* Basic Type1/Type2 type definitions and interface (specification
* only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/tttypes.h b/thirdparty/freetype/include/freetype/internal/tttypes.h
index 23db240e7c..1bddf102be 100644
--- a/thirdparty/freetype/include/freetype/internal/tttypes.h
+++ b/thirdparty/freetype/include/freetype/internal/tttypes.h
@@ -5,7 +5,7 @@
* Basic SFNT/TrueType type definitions and interface (specification
* only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/internal/wofftypes.h b/thirdparty/freetype/include/freetype/internal/wofftypes.h
index ba55bf883e..26159b9d3e 100644
--- a/thirdparty/freetype/include/freetype/internal/wofftypes.h
+++ b/thirdparty/freetype/include/freetype/internal/wofftypes.h
@@ -5,7 +5,7 @@
* Basic WOFF/WOFF2 type definitions and interface (specification
* only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -104,6 +104,207 @@ FT_BEGIN_HEADER
} WOFF_TableRec, *WOFF_Table;
+ /**************************************************************************
+ *
+ * @struct:
+ * WOFF2_TtcFontRec
+ *
+ * @description:
+ * Metadata for a TTC font entry in WOFF2.
+ *
+ * @fields:
+ * flavor ::
+ * TTC font flavor.
+ *
+ * num_tables ::
+ * Number of tables in TTC, indicating number of elements in
+ * `table_indices`.
+ *
+ * table_indices ::
+ * Array of table indices for each TTC font.
+ */
+ typedef struct WOFF2_TtcFontRec_
+ {
+ FT_ULong flavor;
+ FT_UShort num_tables;
+ FT_UShort* table_indices;
+
+ } WOFF2_TtcFontRec, *WOFF2_TtcFont;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * WOFF2_HeaderRec
+ *
+ * @description:
+ * WOFF2 file format header.
+ *
+ * @fields:
+ * See
+ *
+ * https://www.w3.org/TR/WOFF2/#woff20Header
+ *
+ * @note:
+ * We don't care about the fields `reserved`, `majorVersion` and
+ * `minorVersion`, so they are not included. The `totalSfntSize` field
+ * does not necessarily represent the actual size of the uncompressed
+ * SFNT font stream, so that is used as a reference value instead.
+ */
+ typedef struct WOFF2_HeaderRec_
+ {
+ FT_ULong signature;
+ FT_ULong flavor;
+ FT_ULong length;
+ FT_UShort num_tables;
+ FT_ULong totalSfntSize;
+ FT_ULong totalCompressedSize;
+ FT_ULong metaOffset;
+ FT_ULong metaLength;
+ FT_ULong metaOrigLength;
+ FT_ULong privOffset;
+ FT_ULong privLength;
+
+ FT_ULong uncompressed_size; /* uncompressed brotli stream size */
+ FT_ULong compressed_offset; /* compressed stream offset */
+ FT_ULong header_version; /* version of original TTC Header */
+ FT_UShort num_fonts; /* number of fonts in TTC */
+ FT_ULong actual_sfnt_size; /* actual size of sfnt stream */
+
+ WOFF2_TtcFont ttc_fonts; /* metadata for fonts in a TTC */
+
+ } WOFF2_HeaderRec, *WOFF2_Header;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * WOFF2_TableRec
+ *
+ * @description:
+ * This structure describes a given table of a WOFF2 font.
+ *
+ * @fields:
+ * See
+ *
+ * https://www.w3.org/TR/WOFF2/#table_dir_format
+ */
+ typedef struct WOFF2_TableRec_
+ {
+ FT_Byte FlagByte; /* table type and flags */
+ FT_ULong Tag; /* table file offset */
+ FT_ULong dst_length; /* uncompressed table length */
+ FT_ULong TransformLength; /* transformed length */
+
+ FT_ULong flags; /* calculated flags */
+ FT_ULong src_offset; /* compressed table offset */
+ FT_ULong src_length; /* compressed table length */
+ FT_ULong dst_offset; /* uncompressed table offset */
+
+ } WOFF2_TableRec, *WOFF2_Table;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * WOFF2_InfoRec
+ *
+ * @description:
+ * Metadata for WOFF2 font that may be required for reconstruction of
+ * sfnt tables.
+ *
+ * @fields:
+ * header_checksum ::
+ * Checksum of SFNT offset table.
+ *
+ * num_glyphs ::
+ * Number of glyphs in the font.
+ *
+ * num_hmetrics ::
+ * `numberOfHMetrics` field in the 'hhea' table.
+ *
+ * x_mins ::
+ * `xMin` values of glyph bounding box.
+ *
+ * glyf_table ::
+ * A pointer to the `glyf' table record.
+ *
+ * loca_table ::
+ * A pointer to the `loca' table record.
+ *
+ * head_table ::
+ * A pointer to the `head' table record.
+ */
+ typedef struct WOFF2_InfoRec_
+ {
+ FT_ULong header_checksum;
+ FT_UShort num_glyphs;
+ FT_UShort num_hmetrics;
+ FT_Short* x_mins;
+
+ WOFF2_Table glyf_table;
+ WOFF2_Table loca_table;
+ WOFF2_Table head_table;
+
+ } WOFF2_InfoRec, *WOFF2_Info;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * WOFF2_SubstreamRec
+ *
+ * @description:
+ * This structure stores information about a substream in the transformed
+ * 'glyf' table in a WOFF2 stream.
+ *
+ * @fields:
+ * start ::
+ * Beginning of the substream relative to uncompressed table stream.
+ *
+ * offset ::
+ * Offset of the substream relative to uncompressed table stream.
+ *
+ * size ::
+ * Size of the substream.
+ */
+ typedef struct WOFF2_SubstreamRec_
+ {
+ FT_ULong start;
+ FT_ULong offset;
+ FT_ULong size;
+
+ } WOFF2_SubstreamRec, *WOFF2_Substream;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * WOFF2_PointRec
+ *
+ * @description:
+ * This structure stores information about a point in the transformed
+ * 'glyf' table in a WOFF2 stream.
+ *
+ * @fields:
+ * x ::
+ * x-coordinate of point.
+ *
+ * y ::
+ * y-coordinate of point.
+ *
+ * on_curve ::
+ * Set if point is on-curve.
+ */
+ typedef struct WOFF2_PointRec_
+ {
+ FT_Int x;
+ FT_Int y;
+ FT_Bool on_curve;
+
+ } WOFF2_PointRec, *WOFF2_Point;
+
+
FT_END_HEADER
#endif /* WOFFTYPES_H_ */
diff --git a/thirdparty/freetype/include/freetype/t1tables.h b/thirdparty/freetype/include/freetype/t1tables.h
index 645e645720..522d6ae6aa 100644
--- a/thirdparty/freetype/include/freetype/t1tables.h
+++ b/thirdparty/freetype/include/freetype/t1tables.h
@@ -5,7 +5,7 @@
* Basic Type 1/Type 2 tables definitions and interface (specification
* only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/ttnameid.h b/thirdparty/freetype/include/freetype/ttnameid.h
index cc677de75a..9a00913ee7 100644
--- a/thirdparty/freetype/include/freetype/ttnameid.h
+++ b/thirdparty/freetype/include/freetype/ttnameid.h
@@ -4,7 +4,7 @@
*
* TrueType name ID definitions (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/tttables.h b/thirdparty/freetype/include/freetype/tttables.h
index d04f810218..8108db7173 100644
--- a/thirdparty/freetype/include/freetype/tttables.h
+++ b/thirdparty/freetype/include/freetype/tttables.h
@@ -5,7 +5,7 @@
* Basic SFNT/TrueType tables definitions and interface
* (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/include/freetype/tttags.h b/thirdparty/freetype/include/freetype/tttags.h
index bd0986eff0..f2b2a45266 100644
--- a/thirdparty/freetype/include/freetype/tttags.h
+++ b/thirdparty/freetype/include/freetype/tttags.h
@@ -4,7 +4,7 @@
*
* Tags for TrueType and OpenType tables (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -107,6 +107,7 @@ FT_BEGIN_HEADER
#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' )
#define TTAG_VVAR FT_MAKE_TAG( 'V', 'V', 'A', 'R' )
#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' )
+#define TTAG_wOF2 FT_MAKE_TAG( 'w', 'O', 'F', '2' )
/* used by "Keyboard.dfont" on legacy Mac OS X */
#define TTAG_0xA5kbd FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' )
diff --git a/thirdparty/freetype/include/ft2build.h b/thirdparty/freetype/include/ft2build.h
index e3f4887943..195e918335 100644
--- a/thirdparty/freetype/include/ft2build.h
+++ b/thirdparty/freetype/include/ft2build.h
@@ -4,7 +4,7 @@
*
* FreeType 2 build and setup macros.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afangles.c b/thirdparty/freetype/src/autofit/afangles.c
index 9e1f7a21ff..a2d45eb72c 100644
--- a/thirdparty/freetype/src/autofit/afangles.c
+++ b/thirdparty/freetype/src/autofit/afangles.c
@@ -5,7 +5,7 @@
* Routines used to compute vector angles with limited accuracy
* and very high speed. It also contains sorting routines (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afblue.c b/thirdparty/freetype/src/autofit/afblue.c
index b99dbeb19c..63f9ed4589 100644
--- a/thirdparty/freetype/src/autofit/afblue.c
+++ b/thirdparty/freetype/src/autofit/afblue.c
@@ -7,7 +7,7 @@
*
* Auto-fitter data for blue strings (body).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -340,6 +340,12 @@
'\0',
'\xF0', '\x90', '\x92', '\x80', ' ', '\xF0', '\x90', '\x92', '\x82', ' ', '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x88', ' ', '\xF0', '\x90', '\x92', '\x8A', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA9', /* ð’€ ð’‚ ð’† ð’ˆ ð’Š ð’’ ð’  ð’© */
'\0',
+ '\xF0', '\x90', '\xB4', '\x83', ' ', '\xF0', '\x90', '\xB4', '\x80', ' ', '\xF0', '\x90', '\xB4', '\x86', ' ', '\xF0', '\x90', '\xB4', '\x96', ' ', '\xF0', '\x90', '\xB4', '\x95', /* ð´ƒ ð´€ ð´† ð´– ð´• */
+ '\0',
+ '\xF0', '\x90', '\xB4', '\x94', ' ', '\xF0', '\x90', '\xB4', '\x96', ' ', '\xF0', '\x90', '\xB4', '\x95', ' ', '\xF0', '\x90', '\xB4', '\x91', ' ', '\xF0', '\x90', '\xB4', '\x90', /* ð´” ð´– ð´• ð´‘ ð´ */
+ '\0',
+ '\xD9', '\x80', /* Ù€ */
+ '\0',
'\xEA', '\xA2', '\x9C', ' ', '\xEA', '\xA2', '\x9E', ' ', '\xEA', '\xA2', '\xB3', ' ', '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\x96', ' ', '\xEA', '\xA2', '\x92', ' ', '\xEA', '\xA2', '\x9D', ' ', '\xEA', '\xA2', '\x9B', /* ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ê¢ ê¢› */
'\0',
'\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\xA8', ' ', '\xEA', '\xA2', '\xBA', ' ', '\xEA', '\xA2', '\xA4', ' ', '\xEA', '\xA2', '\x8E', /* ꢂ ꢨ ꢺ ꢤ ꢎ */
@@ -687,6 +693,10 @@
{ AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_OSMANYA_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_ROHINGYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_ROHINGYA_BOTTOM, 0 },
+ { AF_BLUE_STRING_ROHINGYA_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
diff --git a/thirdparty/freetype/src/autofit/afblue.cin b/thirdparty/freetype/src/autofit/afblue.cin
index 6545d1fd43..c6a697fee0 100644
--- a/thirdparty/freetype/src/autofit/afblue.cin
+++ b/thirdparty/freetype/src/autofit/afblue.cin
@@ -4,7 +4,7 @@
*
* Auto-fitter data for blue strings (body).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afblue.dat b/thirdparty/freetype/src/autofit/afblue.dat
index 46db43fe22..f8356ba3a1 100644
--- a/thirdparty/freetype/src/autofit/afblue.dat
+++ b/thirdparty/freetype/src/autofit/afblue.dat
@@ -2,7 +2,7 @@
//
// Auto-fitter data for blue strings.
//
-// Copyright (C) 2013-2019 by
+// Copyright (C) 2013-2020 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used,
@@ -443,6 +443,13 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_OSMANYA_BOTTOM
"ð’€ ð’‚ ð’† ð’ˆ ð’Š ð’’ ð’  ð’©"
+ AF_BLUE_STRING_ROHINGYA_TOP
+ "ð´ƒ ð´€ ð´† ð´– ð´•"
+ AF_BLUE_STRING_ROHINGYA_BOTTOM
+ "ð´” ð´– ð´• ð´‘ ð´"
+ AF_BLUE_STRING_ROHINGYA_JOIN
+ "Ù€"
+
AF_BLUE_STRING_SAURASHTRA_TOP
"ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ê¢ ê¢›"
AF_BLUE_STRING_SAURASHTRA_BOTTOM
@@ -1002,6 +1009,12 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_OSMANYA_BOTTOM, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_ROHG
+ { AF_BLUE_STRING_ROHINGYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_ROHINGYA_BOTTOM, 0 }
+ { AF_BLUE_STRING_ROHINGYA_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_SAUR
{ AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 }
diff --git a/thirdparty/freetype/src/autofit/afblue.h b/thirdparty/freetype/src/autofit/afblue.h
index b69b1df521..2b6a5cdda4 100644
--- a/thirdparty/freetype/src/autofit/afblue.h
+++ b/thirdparty/freetype/src/autofit/afblue.h
@@ -7,7 +7,7 @@
*
* Auto-fitter data for blue strings (specification).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -234,36 +234,39 @@ FT_BEGIN_HEADER
AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 4095,
AF_BLUE_STRING_OSMANYA_TOP = 4110,
AF_BLUE_STRING_OSMANYA_BOTTOM = 4150,
- AF_BLUE_STRING_SAURASHTRA_TOP = 4190,
- AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4222,
- AF_BLUE_STRING_SHAVIAN_TOP = 4242,
- AF_BLUE_STRING_SHAVIAN_BOTTOM = 4252,
- AF_BLUE_STRING_SHAVIAN_DESCENDER = 4277,
- AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4287,
- AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4322,
- AF_BLUE_STRING_SINHALA_TOP = 4337,
- AF_BLUE_STRING_SINHALA_BOTTOM = 4369,
- AF_BLUE_STRING_SINHALA_DESCENDER = 4401,
- AF_BLUE_STRING_SUNDANESE_TOP = 4445,
- AF_BLUE_STRING_SUNDANESE_BOTTOM = 4469,
- AF_BLUE_STRING_SUNDANESE_DESCENDER = 4501,
- AF_BLUE_STRING_TAI_VIET_TOP = 4509,
- AF_BLUE_STRING_TAI_VIET_BOTTOM = 4529,
- AF_BLUE_STRING_TAMIL_TOP = 4541,
- AF_BLUE_STRING_TAMIL_BOTTOM = 4573,
- AF_BLUE_STRING_TELUGU_TOP = 4605,
- AF_BLUE_STRING_TELUGU_BOTTOM = 4633,
- AF_BLUE_STRING_THAI_TOP = 4661,
- AF_BLUE_STRING_THAI_BOTTOM = 4685,
- AF_BLUE_STRING_THAI_ASCENDER = 4713,
- AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4725,
- AF_BLUE_STRING_THAI_DESCENDER = 4737,
- AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4753,
- AF_BLUE_STRING_THAI_DIGIT_TOP = 4761,
- AF_BLUE_STRING_TIFINAGH = 4773,
- AF_BLUE_STRING_VAI_TOP = 4805,
- AF_BLUE_STRING_VAI_BOTTOM = 4837,
- af_blue_1_1 = 4868,
+ AF_BLUE_STRING_ROHINGYA_TOP = 4190,
+ AF_BLUE_STRING_ROHINGYA_BOTTOM = 4215,
+ AF_BLUE_STRING_ROHINGYA_JOIN = 4240,
+ AF_BLUE_STRING_SAURASHTRA_TOP = 4243,
+ AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4275,
+ AF_BLUE_STRING_SHAVIAN_TOP = 4295,
+ AF_BLUE_STRING_SHAVIAN_BOTTOM = 4305,
+ AF_BLUE_STRING_SHAVIAN_DESCENDER = 4330,
+ AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4340,
+ AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4375,
+ AF_BLUE_STRING_SINHALA_TOP = 4390,
+ AF_BLUE_STRING_SINHALA_BOTTOM = 4422,
+ AF_BLUE_STRING_SINHALA_DESCENDER = 4454,
+ AF_BLUE_STRING_SUNDANESE_TOP = 4498,
+ AF_BLUE_STRING_SUNDANESE_BOTTOM = 4522,
+ AF_BLUE_STRING_SUNDANESE_DESCENDER = 4554,
+ AF_BLUE_STRING_TAI_VIET_TOP = 4562,
+ AF_BLUE_STRING_TAI_VIET_BOTTOM = 4582,
+ AF_BLUE_STRING_TAMIL_TOP = 4594,
+ AF_BLUE_STRING_TAMIL_BOTTOM = 4626,
+ AF_BLUE_STRING_TELUGU_TOP = 4658,
+ AF_BLUE_STRING_TELUGU_BOTTOM = 4686,
+ AF_BLUE_STRING_THAI_TOP = 4714,
+ AF_BLUE_STRING_THAI_BOTTOM = 4738,
+ AF_BLUE_STRING_THAI_ASCENDER = 4766,
+ AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4778,
+ AF_BLUE_STRING_THAI_DESCENDER = 4790,
+ AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4806,
+ AF_BLUE_STRING_THAI_DIGIT_TOP = 4814,
+ AF_BLUE_STRING_TIFINAGH = 4826,
+ AF_BLUE_STRING_VAI_TOP = 4858,
+ AF_BLUE_STRING_VAI_BOTTOM = 4890,
+ af_blue_1_1 = 4921,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
@@ -365,17 +368,18 @@ FT_BEGIN_HEADER
AF_BLUE_STRINGSET_ORKH = 196,
AF_BLUE_STRINGSET_OSGE = 199,
AF_BLUE_STRINGSET_OSMA = 207,
- AF_BLUE_STRINGSET_SAUR = 210,
- AF_BLUE_STRINGSET_SHAW = 213,
- AF_BLUE_STRINGSET_SINH = 219,
- AF_BLUE_STRINGSET_SUND = 223,
- AF_BLUE_STRINGSET_TAML = 227,
- AF_BLUE_STRINGSET_TAVT = 230,
- AF_BLUE_STRINGSET_TELU = 233,
- AF_BLUE_STRINGSET_TFNG = 236,
- AF_BLUE_STRINGSET_THAI = 239,
- AF_BLUE_STRINGSET_VAII = 247,
- af_blue_2_1 = 250,
+ AF_BLUE_STRINGSET_ROHG = 210,
+ AF_BLUE_STRINGSET_SAUR = 214,
+ AF_BLUE_STRINGSET_SHAW = 217,
+ AF_BLUE_STRINGSET_SINH = 223,
+ AF_BLUE_STRINGSET_SUND = 227,
+ AF_BLUE_STRINGSET_TAML = 231,
+ AF_BLUE_STRINGSET_TAVT = 234,
+ AF_BLUE_STRINGSET_TELU = 237,
+ AF_BLUE_STRINGSET_TFNG = 240,
+ AF_BLUE_STRINGSET_THAI = 243,
+ AF_BLUE_STRINGSET_VAII = 251,
+ af_blue_2_1 = 254,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
af_blue_2_1_1 = af_blue_2_1 + 2,
diff --git a/thirdparty/freetype/src/autofit/afblue.hin b/thirdparty/freetype/src/autofit/afblue.hin
index 30a28dafa5..3957027091 100644
--- a/thirdparty/freetype/src/autofit/afblue.hin
+++ b/thirdparty/freetype/src/autofit/afblue.hin
@@ -4,7 +4,7 @@
*
* Auto-fitter data for blue strings (specification).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afcjk.c b/thirdparty/freetype/src/autofit/afcjk.c
index a61689bee3..ca6ce0c60c 100644
--- a/thirdparty/freetype/src/autofit/afcjk.c
+++ b/thirdparty/freetype/src/autofit/afcjk.c
@@ -4,7 +4,7 @@
*
* Auto-fitter hinting routines for CJK writing system (body).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -806,7 +806,7 @@
{
AF_AxisHints axis = &hints->axis[dim];
AF_Segment segments = axis->segments;
- AF_Segment segment_limit = segments + axis->num_segments;
+ AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments );
FT_Error error;
AF_Segment seg;
diff --git a/thirdparty/freetype/src/autofit/afcjk.h b/thirdparty/freetype/src/autofit/afcjk.h
index 59acae5342..fd0f451aa8 100644
--- a/thirdparty/freetype/src/autofit/afcjk.h
+++ b/thirdparty/freetype/src/autofit/afcjk.h
@@ -4,7 +4,7 @@
*
* Auto-fitter hinting routines for CJK writing system (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afcover.h b/thirdparty/freetype/src/autofit/afcover.h
index ff207a97e0..03085ad07e 100644
--- a/thirdparty/freetype/src/autofit/afcover.h
+++ b/thirdparty/freetype/src/autofit/afcover.h
@@ -4,7 +4,7 @@
*
* Auto-fitter coverages (specification only).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afdummy.c b/thirdparty/freetype/src/autofit/afdummy.c
index 7e07a41e7d..77d31df974 100644
--- a/thirdparty/freetype/src/autofit/afdummy.c
+++ b/thirdparty/freetype/src/autofit/afdummy.c
@@ -5,7 +5,7 @@
* Auto-fitter dummy routines to be used if no hinting should be
* performed (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afdummy.h b/thirdparty/freetype/src/autofit/afdummy.h
index ab9227d35d..efd799e84b 100644
--- a/thirdparty/freetype/src/autofit/afdummy.h
+++ b/thirdparty/freetype/src/autofit/afdummy.h
@@ -5,7 +5,7 @@
* Auto-fitter dummy routines to be used if no hinting should be
* performed (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/aferrors.h b/thirdparty/freetype/src/autofit/aferrors.h
index 2ec336f72c..6c7d0e1d70 100644
--- a/thirdparty/freetype/src/autofit/aferrors.h
+++ b/thirdparty/freetype/src/autofit/aferrors.h
@@ -4,7 +4,7 @@
*
* Autofitter error codes (specification only).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afglobal.c b/thirdparty/freetype/src/autofit/afglobal.c
index 6a9a1e5aaa..5ad4ea9211 100644
--- a/thirdparty/freetype/src/autofit/afglobal.c
+++ b/thirdparty/freetype/src/autofit/afglobal.c
@@ -4,7 +4,7 @@
*
* Auto-fitter routines to compute global hinting values (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afglobal.h b/thirdparty/freetype/src/autofit/afglobal.h
index 52f38350db..fecf7af977 100644
--- a/thirdparty/freetype/src/autofit/afglobal.h
+++ b/thirdparty/freetype/src/autofit/afglobal.h
@@ -5,7 +5,7 @@
* Auto-fitter routines to compute global hinting values
* (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afhints.c b/thirdparty/freetype/src/autofit/afhints.c
index ed111c4117..5a123b2ba3 100644
--- a/thirdparty/freetype/src/autofit/afhints.c
+++ b/thirdparty/freetype/src/autofit/afhints.c
@@ -4,7 +4,7 @@
*
* Auto-fitter hinting routines (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afhints.h b/thirdparty/freetype/src/autofit/afhints.h
index e0cf612f0c..6397f098f0 100644
--- a/thirdparty/freetype/src/autofit/afhints.h
+++ b/thirdparty/freetype/src/autofit/afhints.h
@@ -4,7 +4,7 @@
*
* Auto-fitter hinting routines (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afindic.c b/thirdparty/freetype/src/autofit/afindic.c
index a17117c712..bc2837a26d 100644
--- a/thirdparty/freetype/src/autofit/afindic.c
+++ b/thirdparty/freetype/src/autofit/afindic.c
@@ -4,7 +4,7 @@
*
* Auto-fitter hinting routines for Indic writing system (body).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afindic.h b/thirdparty/freetype/src/autofit/afindic.h
index bc5bc59fa5..088b88b19d 100644
--- a/thirdparty/freetype/src/autofit/afindic.h
+++ b/thirdparty/freetype/src/autofit/afindic.h
@@ -5,7 +5,7 @@
* Auto-fitter hinting routines for Indic writing system
* (specification).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/aflatin.c b/thirdparty/freetype/src/autofit/aflatin.c
index 27d4024882..b453fcdf69 100644
--- a/thirdparty/freetype/src/autofit/aflatin.c
+++ b/thirdparty/freetype/src/autofit/aflatin.c
@@ -4,7 +4,7 @@
*
* Auto-fitter hinting routines for latin writing system (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -1910,7 +1910,7 @@
/* sense -- this is used to better detect and ignore serifs */
{
AF_Segment segments = axis->segments;
- AF_Segment segments_end = segments + axis->num_segments;
+ AF_Segment segments_end = FT_OFFSET( segments, axis->num_segments );
for ( segment = segments; segment < segments_end; segment++ )
@@ -2314,7 +2314,7 @@
*/
{
AF_Edge edges = axis->edges;
- AF_Edge edge_limit = edges + axis->num_edges;
+ AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges );
AF_Edge edge;
diff --git a/thirdparty/freetype/src/autofit/aflatin.h b/thirdparty/freetype/src/autofit/aflatin.h
index 40479538c2..62bc4c8d44 100644
--- a/thirdparty/freetype/src/autofit/aflatin.h
+++ b/thirdparty/freetype/src/autofit/aflatin.h
@@ -5,7 +5,7 @@
* Auto-fitter hinting routines for latin writing system
* (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/aflatin2.c b/thirdparty/freetype/src/autofit/aflatin2.c
index c601ab8d9a..7bd4156a0f 100644
--- a/thirdparty/freetype/src/autofit/aflatin2.c
+++ b/thirdparty/freetype/src/autofit/aflatin2.c
@@ -9,7 +9,7 @@
*
* Auto-fitter hinting routines for latin writing system (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -21,6 +21,7 @@
*/
+#include <ft2build.h>
#include FT_ADVANCES_H
diff --git a/thirdparty/freetype/src/autofit/aflatin2.h b/thirdparty/freetype/src/autofit/aflatin2.h
index 507cef3df2..c2aebc49ac 100644
--- a/thirdparty/freetype/src/autofit/aflatin2.h
+++ b/thirdparty/freetype/src/autofit/aflatin2.h
@@ -10,7 +10,7 @@
* Auto-fitter hinting routines for latin writing system
* (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afloader.c b/thirdparty/freetype/src/autofit/afloader.c
index 83743b7be1..a53fbf2d21 100644
--- a/thirdparty/freetype/src/autofit/afloader.c
+++ b/thirdparty/freetype/src/autofit/afloader.c
@@ -4,7 +4,7 @@
*
* Auto-fitter glyph loading routines (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afloader.h b/thirdparty/freetype/src/autofit/afloader.h
index d1e0f3c093..97282371cd 100644
--- a/thirdparty/freetype/src/autofit/afloader.h
+++ b/thirdparty/freetype/src/autofit/afloader.h
@@ -4,7 +4,7 @@
*
* Auto-fitter glyph loading routines (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afmodule.c b/thirdparty/freetype/src/autofit/afmodule.c
index 3e46a3655a..0bcae4cc25 100644
--- a/thirdparty/freetype/src/autofit/afmodule.c
+++ b/thirdparty/freetype/src/autofit/afmodule.c
@@ -4,7 +4,7 @@
*
* Auto-fitter module implementation (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afmodule.h b/thirdparty/freetype/src/autofit/afmodule.h
index b410809aa8..efa0240b4b 100644
--- a/thirdparty/freetype/src/autofit/afmodule.h
+++ b/thirdparty/freetype/src/autofit/afmodule.h
@@ -4,7 +4,7 @@
*
* Auto-fitter module implementation (specification).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afranges.c b/thirdparty/freetype/src/autofit/afranges.c
index 45c8bbfc95..d6ecf88910 100644
--- a/thirdparty/freetype/src/autofit/afranges.c
+++ b/thirdparty/freetype/src/autofit/afranges.c
@@ -4,7 +4,7 @@
*
* Auto-fitter Unicode script ranges (body).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -778,6 +778,18 @@
};
+ const AF_Script_UniRangeRec af_rohg_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10D00, 0x10D3F ), /* Hanifi Rohingya */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_rohg_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_saur_uniranges[] =
{
AF_UNIRANGE_REC( 0xA880, 0xA8DF ), /* Saurashtra */
diff --git a/thirdparty/freetype/src/autofit/afranges.h b/thirdparty/freetype/src/autofit/afranges.h
index d5917aefed..c2ffda4b0f 100644
--- a/thirdparty/freetype/src/autofit/afranges.h
+++ b/thirdparty/freetype/src/autofit/afranges.h
@@ -4,7 +4,7 @@
*
* Auto-fitter Unicode script ranges (specification).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afscript.h b/thirdparty/freetype/src/autofit/afscript.h
index 2da8c70183..36caaddc56 100644
--- a/thirdparty/freetype/src/autofit/afscript.h
+++ b/thirdparty/freetype/src/autofit/afscript.h
@@ -4,7 +4,7 @@
*
* Auto-fitter scripts (specification only).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -291,6 +291,12 @@
HINTING_BOTTOM_TO_TOP,
"\xF0\x90\x92\x86 \xF0\x90\x92\xA0" ) /* ð’† ð’  */
+ SCRIPT( rohg, ROHG,
+ "Hanifi Rohingya",
+ HB_SCRIPT_HANIFI_ROHINGYA,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\xB4\xB0" ) /* ð´° */
+
SCRIPT( saur, SAUR,
"Saurashtra",
HB_SCRIPT_SAURASHTRA,
diff --git a/thirdparty/freetype/src/autofit/afshaper.c b/thirdparty/freetype/src/autofit/afshaper.c
index a5191c6915..d3902db2ed 100644
--- a/thirdparty/freetype/src/autofit/afshaper.c
+++ b/thirdparty/freetype/src/autofit/afshaper.c
@@ -4,7 +4,7 @@
*
* HarfBuzz interface for accessing OpenType features (body).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afshaper.h b/thirdparty/freetype/src/autofit/afshaper.h
index 06a1e06616..a7dbf34f1a 100644
--- a/thirdparty/freetype/src/autofit/afshaper.h
+++ b/thirdparty/freetype/src/autofit/afshaper.h
@@ -4,7 +4,7 @@
*
* HarfBuzz interface for accessing OpenType features (specification).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afstyles.h b/thirdparty/freetype/src/autofit/afstyles.h
index 8d1d70812f..8d411ab0d7 100644
--- a/thirdparty/freetype/src/autofit/afstyles.h
+++ b/thirdparty/freetype/src/autofit/afstyles.h
@@ -4,7 +4,7 @@
*
* Auto-fitter styles (specification only).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -378,6 +378,13 @@
AF_BLUE_STRINGSET_OSMA,
AF_COVERAGE_DEFAULT )
+ STYLE( rohg_dflt, ROHG_DFLT,
+ "Hanifi Rohingya default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_ROHG,
+ AF_BLUE_STRINGSET_ROHG,
+ AF_COVERAGE_DEFAULT )
+
STYLE( saur_dflt, SAUR_DFLT,
"Saurashtra default style",
AF_WRITING_SYSTEM_LATIN,
diff --git a/thirdparty/freetype/src/autofit/aftypes.h b/thirdparty/freetype/src/autofit/aftypes.h
index 579003d27d..7ca0b59e32 100644
--- a/thirdparty/freetype/src/autofit/aftypes.h
+++ b/thirdparty/freetype/src/autofit/aftypes.h
@@ -4,7 +4,7 @@
*
* Auto-fitter types (specification only).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afwarp.c b/thirdparty/freetype/src/autofit/afwarp.c
index 84e9753ad9..808280df5d 100644
--- a/thirdparty/freetype/src/autofit/afwarp.c
+++ b/thirdparty/freetype/src/autofit/afwarp.c
@@ -4,7 +4,7 @@
*
* Auto-fitter warping algorithm (body).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afwarp.h b/thirdparty/freetype/src/autofit/afwarp.h
index 9a2c9a42c1..cdea23e7de 100644
--- a/thirdparty/freetype/src/autofit/afwarp.h
+++ b/thirdparty/freetype/src/autofit/afwarp.h
@@ -4,7 +4,7 @@
*
* Auto-fitter warping algorithm (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/afwrtsys.h b/thirdparty/freetype/src/autofit/afwrtsys.h
index 5611cf441a..3990633d2d 100644
--- a/thirdparty/freetype/src/autofit/afwrtsys.h
+++ b/thirdparty/freetype/src/autofit/afwrtsys.h
@@ -4,7 +4,7 @@
*
* Auto-fitter writing systems (specification only).
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/autofit.c b/thirdparty/freetype/src/autofit/autofit.c
index facfec1744..88be8bf2bc 100644
--- a/thirdparty/freetype/src/autofit/autofit.c
+++ b/thirdparty/freetype/src/autofit/autofit.c
@@ -4,7 +4,7 @@
*
* Auto-fitter module (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/autofit/module.mk b/thirdparty/freetype/src/autofit/module.mk
index cf77b169f7..c32781f478 100644
--- a/thirdparty/freetype/src/autofit/module.mk
+++ b/thirdparty/freetype/src/autofit/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2003-2019 by
+# Copyright (C) 2003-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/autofit/rules.mk b/thirdparty/freetype/src/autofit/rules.mk
index c59da33a55..553ddce6b7 100644
--- a/thirdparty/freetype/src/autofit/rules.mk
+++ b/thirdparty/freetype/src/autofit/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2003-2019 by
+# Copyright (C) 2003-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/base/ftadvanc.c b/thirdparty/freetype/src/base/ftadvanc.c
index 0dfba57036..310bbba41e 100644
--- a/thirdparty/freetype/src/base/ftadvanc.c
+++ b/thirdparty/freetype/src/base/ftadvanc.c
@@ -4,7 +4,7 @@
*
* Quick computation of advance widths (body).
*
- * Copyright (C) 2008-2019 by
+ * Copyright (C) 2008-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftbase.c b/thirdparty/freetype/src/base/ftbase.c
index fb8cbfcc27..b8242bb960 100644
--- a/thirdparty/freetype/src/base/ftbase.c
+++ b/thirdparty/freetype/src/base/ftbase.c
@@ -4,7 +4,7 @@
*
* Single object library component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftbase.h b/thirdparty/freetype/src/base/ftbase.h
index 35b1c47fd9..472713addf 100644
--- a/thirdparty/freetype/src/base/ftbase.h
+++ b/thirdparty/freetype/src/base/ftbase.h
@@ -4,7 +4,7 @@
*
* Private functions used in the `base' module (specification).
*
- * Copyright (C) 2008-2019 by
+ * Copyright (C) 2008-2020 by
* David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftbbox.c b/thirdparty/freetype/src/base/ftbbox.c
index a0b2c46f7b..9d9f9c4015 100644
--- a/thirdparty/freetype/src/base/ftbbox.c
+++ b/thirdparty/freetype/src/base/ftbbox.c
@@ -4,7 +4,7 @@
*
* FreeType bbox computation (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used
@@ -294,10 +294,10 @@
if ( shift > 2 )
shift = 2;
- q1 <<= shift;
- q2 <<= shift;
- q3 <<= shift;
- q4 <<= shift;
+ q1 *= 1 << shift;
+ q2 *= 1 << shift;
+ q3 *= 1 << shift;
+ q4 *= 1 << shift;
}
else
{
diff --git a/thirdparty/freetype/src/base/ftbdf.c b/thirdparty/freetype/src/base/ftbdf.c
index c0fccd7b7c..a239e5f873 100644
--- a/thirdparty/freetype/src/base/ftbdf.c
+++ b/thirdparty/freetype/src/base/ftbdf.c
@@ -4,7 +4,7 @@
*
* FreeType API for accessing BDF-specific strings (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftbitmap.c b/thirdparty/freetype/src/base/ftbitmap.c
index 0e0a76fe40..18ac4c5f34 100644
--- a/thirdparty/freetype/src/base/ftbitmap.c
+++ b/thirdparty/freetype/src/base/ftbitmap.c
@@ -4,7 +4,7 @@
*
* FreeType utility functions for bitmaps (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftcalc.c b/thirdparty/freetype/src/base/ftcalc.c
index 315dc44185..53550057b1 100644
--- a/thirdparty/freetype/src/base/ftcalc.c
+++ b/thirdparty/freetype/src/base/ftcalc.c
@@ -4,7 +4,7 @@
*
* Arithmetic computations (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftcid.c b/thirdparty/freetype/src/base/ftcid.c
index 190b23f357..17c25730e7 100644
--- a/thirdparty/freetype/src/base/ftcid.c
+++ b/thirdparty/freetype/src/base/ftcid.c
@@ -4,7 +4,7 @@
*
* FreeType API for accessing CID font information.
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* Derek Clegg and Michael Toftdal.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftcolor.c b/thirdparty/freetype/src/base/ftcolor.c
index 8cb057a365..986e9924a6 100644
--- a/thirdparty/freetype/src/base/ftcolor.c
+++ b/thirdparty/freetype/src/base/ftcolor.c
@@ -4,7 +4,7 @@
*
* FreeType's glyph color management (body).
*
- * Copyright (C) 2018-2019 by
+ * Copyright (C) 2018-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftdbgmem.c b/thirdparty/freetype/src/base/ftdbgmem.c
index 55cd269e1f..7f06c86006 100644
--- a/thirdparty/freetype/src/base/ftdbgmem.c
+++ b/thirdparty/freetype/src/base/ftdbgmem.c
@@ -4,7 +4,7 @@
*
* Memory debugger (body).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -621,8 +621,10 @@
if ( node->size < 0 )
ft_mem_debug_panic(
- "freeing memory block at %p more than once at (%s:%ld)\n"
- "block allocated at (%s:%ld) and released at (%s:%ld)",
+ "freeing memory block at %p more than once\n"
+ " at (%s:%ld)!\n"
+ " Block was allocated at (%s:%ld)\n"
+ " and released at (%s:%ld).",
address,
FT_FILENAME( _ft_debug_file ), _ft_debug_lineno,
FT_FILENAME( node->source->file_name ), node->source->line_no,
diff --git a/thirdparty/freetype/src/base/ftdebug.c b/thirdparty/freetype/src/base/ftdebug.c
index ec72337873..da1c1265e3 100644
--- a/thirdparty/freetype/src/base/ftdebug.c
+++ b/thirdparty/freetype/src/base/ftdebug.c
@@ -4,7 +4,7 @@
*
* Debugging and logging component (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/fterrors.c b/thirdparty/freetype/src/base/fterrors.c
index 84fe590289..8aa688fbe2 100644
--- a/thirdparty/freetype/src/base/fterrors.c
+++ b/thirdparty/freetype/src/base/fterrors.c
@@ -4,7 +4,7 @@
*
* FreeType API for error code handling.
*
- * Copyright (C) 2018-2019 by
+ * Copyright (C) 2018-2020 by
* Armin Hasitzka, David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftfntfmt.c b/thirdparty/freetype/src/base/ftfntfmt.c
index 54ba537416..95e9b6e4c1 100644
--- a/thirdparty/freetype/src/base/ftfntfmt.c
+++ b/thirdparty/freetype/src/base/ftfntfmt.c
@@ -4,7 +4,7 @@
*
* FreeType utility file for font formats (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftfstype.c b/thirdparty/freetype/src/base/ftfstype.c
index 45e2d8089b..461d857077 100644
--- a/thirdparty/freetype/src/base/ftfstype.c
+++ b/thirdparty/freetype/src/base/ftfstype.c
@@ -4,7 +4,7 @@
*
* FreeType utility file to access FSType data (body).
*
- * Copyright (C) 2008-2019 by
+ * Copyright (C) 2008-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftgasp.c b/thirdparty/freetype/src/base/ftgasp.c
index 720fb113ca..0fd80b9cd6 100644
--- a/thirdparty/freetype/src/base/ftgasp.c
+++ b/thirdparty/freetype/src/base/ftgasp.c
@@ -4,7 +4,7 @@
*
* Access of TrueType's `gasp' table (body).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftgloadr.c b/thirdparty/freetype/src/base/ftgloadr.c
index bfeed461a8..6032885c6b 100644
--- a/thirdparty/freetype/src/base/ftgloadr.c
+++ b/thirdparty/freetype/src/base/ftgloadr.c
@@ -4,7 +4,7 @@
*
* The FreeType glyph loader (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg
*
* This file is part of the FreeType project, and may only be used,
@@ -146,9 +146,9 @@
FT_Outline* current = &loader->current.outline;
- current->points = base->points + base->n_points;
- current->tags = base->tags + base->n_points;
- current->contours = base->contours + base->n_contours;
+ current->points = FT_OFFSET( base->points, base->n_points );
+ current->tags = FT_OFFSET( base->tags, base->n_points );
+ current->contours = FT_OFFSET( base->contours, base->n_contours );
/* handle extra points table - if any */
if ( loader->use_extra )
@@ -169,6 +169,10 @@
FT_Memory memory = loader->memory;
+ if ( loader->max_points == 0 ||
+ loader->base.extra_points != NULL )
+ return FT_Err_Ok;
+
if ( !FT_NEW_ARRAY( loader->base.extra_points, 2 * loader->max_points ) )
{
loader->use_extra = 1;
@@ -189,7 +193,7 @@
FT_GlyphLoad current = &loader->current;
- current->subglyphs = base->subglyphs + base->num_subglyphs;
+ current->subglyphs = FT_OFFSET( base->subglyphs, base->num_subglyphs );
}
@@ -211,6 +215,10 @@
FT_UInt new_max, old_max;
+ error = FT_GlyphLoader_CreateExtra( loader );
+ if ( error )
+ return error;
+
/* check points & tags */
new_max = (FT_UInt)base->n_points + (FT_UInt)current->n_points +
n_points;
@@ -244,6 +252,10 @@
loader->max_points = new_max;
}
+ error = FT_GlyphLoader_CreateExtra( loader );
+ if ( error )
+ return error;
+
/* check contours */
old_max = loader->max_contours;
new_max = (FT_UInt)base->n_contours + (FT_UInt)current->n_contours +
diff --git a/thirdparty/freetype/src/base/ftglyph.c b/thirdparty/freetype/src/base/ftglyph.c
index e6b1327901..44654be780 100644
--- a/thirdparty/freetype/src/base/ftglyph.c
+++ b/thirdparty/freetype/src/base/ftglyph.c
@@ -4,7 +4,7 @@
*
* FreeType convenience functions to handle glyphs (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftgxval.c b/thirdparty/freetype/src/base/ftgxval.c
index 0677d26faa..fa32c5f6ca 100644
--- a/thirdparty/freetype/src/base/ftgxval.c
+++ b/thirdparty/freetype/src/base/ftgxval.c
@@ -4,7 +4,7 @@
*
* FreeType API for validating TrueTypeGX/AAT tables (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* Masatake YAMATO, Redhat K.K,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/base/ftinit.c b/thirdparty/freetype/src/base/ftinit.c
index c73cd78b83..1aab09a771 100644
--- a/thirdparty/freetype/src/base/ftinit.c
+++ b/thirdparty/freetype/src/base/ftinit.c
@@ -4,7 +4,7 @@
*
* FreeType initialization layer (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftlcdfil.c b/thirdparty/freetype/src/base/ftlcdfil.c
index d9f4af4293..d4ef93a518 100644
--- a/thirdparty/freetype/src/base/ftlcdfil.c
+++ b/thirdparty/freetype/src/base/ftlcdfil.c
@@ -4,7 +4,7 @@
*
* FreeType API for color filtering of subpixel bitmap glyphs (body).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftmac.c b/thirdparty/freetype/src/base/ftmac.c
index 5f23ceea9f..2de43a0146 100644
--- a/thirdparty/freetype/src/base/ftmac.c
+++ b/thirdparty/freetype/src/base/ftmac.c
@@ -8,7 +8,7 @@
* This file is for Mac OS X only; see builds/mac/ftoldmac.c for
* classic platforms built by MPW.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftmm.c b/thirdparty/freetype/src/base/ftmm.c
index ba9e67f008..ef2e3d9588 100644
--- a/thirdparty/freetype/src/base/ftmm.c
+++ b/thirdparty/freetype/src/base/ftmm.c
@@ -4,7 +4,7 @@
*
* Multiple Master font support (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftobjs.c b/thirdparty/freetype/src/base/ftobjs.c
index e301f8f11a..1b042614d2 100644
--- a/thirdparty/freetype/src/base/ftobjs.c
+++ b/thirdparty/freetype/src/base/ftobjs.c
@@ -4,7 +4,7 @@
*
* The FreeType private base classes (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftotval.c b/thirdparty/freetype/src/base/ftotval.c
index 007576ce6e..9f69e0c1fd 100644
--- a/thirdparty/freetype/src/base/ftotval.c
+++ b/thirdparty/freetype/src/base/ftotval.c
@@ -4,7 +4,7 @@
*
* FreeType API for validating OpenType tables (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftoutln.c b/thirdparty/freetype/src/base/ftoutln.c
index 0e2ba3475d..faaae83294 100644
--- a/thirdparty/freetype/src/base/ftoutln.c
+++ b/thirdparty/freetype/src/base/ftoutln.c
@@ -4,7 +4,7 @@
*
* FreeType outline management (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -711,7 +711,7 @@
FT_Vector* limit;
- if ( !outline || !matrix )
+ if ( !outline || !matrix || !outline->points )
return;
vec = outline->points;
diff --git a/thirdparty/freetype/src/base/ftpatent.c b/thirdparty/freetype/src/base/ftpatent.c
index 020f4646eb..077a9b03fa 100644
--- a/thirdparty/freetype/src/base/ftpatent.c
+++ b/thirdparty/freetype/src/base/ftpatent.c
@@ -5,7 +5,7 @@
* FreeType API for checking patented TrueType bytecode instructions
* (body). Obsolete, retained for backward compatibility.
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* David Turner.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftpfr.c b/thirdparty/freetype/src/base/ftpfr.c
index aeff1db8bd..57e65665ff 100644
--- a/thirdparty/freetype/src/base/ftpfr.c
+++ b/thirdparty/freetype/src/base/ftpfr.c
@@ -4,7 +4,7 @@
*
* FreeType API for accessing PFR-specific data (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftpsprop.c b/thirdparty/freetype/src/base/ftpsprop.c
index 52b9d453ad..c63f864c1a 100644
--- a/thirdparty/freetype/src/base/ftpsprop.c
+++ b/thirdparty/freetype/src/base/ftpsprop.c
@@ -5,7 +5,7 @@
* Get and set properties of PostScript drivers (body).
* See `ftdriver.h' for available properties.
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -165,9 +165,9 @@
driver->hinting_engine = *hinting_engine;
else
error = FT_ERR( Unimplemented_Feature );
-
- return error;
}
+
+ return error;
}
else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
diff --git a/thirdparty/freetype/src/base/ftrfork.c b/thirdparty/freetype/src/base/ftrfork.c
index 73b7eb0ded..1bf7800f17 100644
--- a/thirdparty/freetype/src/base/ftrfork.c
+++ b/thirdparty/freetype/src/base/ftrfork.c
@@ -4,7 +4,7 @@
*
* Embedded resource forks accessor (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* Masatake YAMATO and Redhat K.K.
*
* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are
diff --git a/thirdparty/freetype/src/base/ftsnames.c b/thirdparty/freetype/src/base/ftsnames.c
index 7ab3fe3cfa..25f5d45be5 100644
--- a/thirdparty/freetype/src/base/ftsnames.c
+++ b/thirdparty/freetype/src/base/ftsnames.c
@@ -7,7 +7,7 @@
*
* This is _not_ used to retrieve glyph names!
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftstream.c b/thirdparty/freetype/src/base/ftstream.c
index 4b0890d7fd..7dbf9b55fc 100644
--- a/thirdparty/freetype/src/base/ftstream.c
+++ b/thirdparty/freetype/src/base/ftstream.c
@@ -4,7 +4,7 @@
*
* I/O stream support (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -286,7 +286,7 @@
}
stream->cursor = stream->base;
- stream->limit = stream->cursor + count;
+ stream->limit = FT_OFFSET( stream->cursor, count );
stream->pos += read_bytes;
}
else
diff --git a/thirdparty/freetype/src/base/ftstroke.c b/thirdparty/freetype/src/base/ftstroke.c
index 1b2c0f657c..3369dc24b1 100644
--- a/thirdparty/freetype/src/base/ftstroke.c
+++ b/thirdparty/freetype/src/base/ftstroke.c
@@ -4,7 +4,7 @@
*
* FreeType path stroker (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -540,63 +540,52 @@
FT_Angle angle_start,
FT_Angle angle_diff )
{
- FT_Angle total, angle, step, rotate, next, theta;
- FT_Vector a, b, a2, b2;
- FT_Fixed length;
+ FT_Fixed coef;
+ FT_Vector a0, a1, a2, a3;
+ FT_Int i, arcs = 1;
FT_Error error = FT_Err_Ok;
- /* compute start point */
- FT_Vector_From_Polar( &a, radius, angle_start );
- a.x += center->x;
- a.y += center->y;
+ /* number of cubic arcs to draw */
+ while ( angle_diff > FT_ARC_CUBIC_ANGLE * arcs ||
+ -angle_diff > FT_ARC_CUBIC_ANGLE * arcs )
+ arcs++;
- total = angle_diff;
- angle = angle_start;
- rotate = ( angle_diff >= 0 ) ? FT_ANGLE_PI2 : -FT_ANGLE_PI2;
+ /* control tangents */
+ coef = FT_Tan( angle_diff / ( 4 * arcs ) );
+ coef += coef / 3;
- while ( total != 0 )
- {
- step = total;
- if ( step > FT_ARC_CUBIC_ANGLE )
- step = FT_ARC_CUBIC_ANGLE;
-
- else if ( step < -FT_ARC_CUBIC_ANGLE )
- step = -FT_ARC_CUBIC_ANGLE;
-
- next = angle + step;
- theta = step;
- if ( theta < 0 )
- theta = -theta;
+ /* compute start and first control point */
+ FT_Vector_From_Polar( &a0, radius, angle_start );
+ a1.x = FT_MulFix( -a0.y, coef );
+ a1.y = FT_MulFix( a0.x, coef );
- theta >>= 1;
+ a0.x += center->x;
+ a0.y += center->y;
+ a1.x += a0.x;
+ a1.y += a0.y;
- /* compute end point */
- FT_Vector_From_Polar( &b, radius, next );
- b.x += center->x;
- b.y += center->y;
-
- /* compute first and second control points */
- length = FT_MulDiv( radius, FT_Sin( theta ) * 4,
- ( 0x10000L + FT_Cos( theta ) ) * 3 );
-
- FT_Vector_From_Polar( &a2, length, angle + rotate );
- a2.x += a.x;
- a2.y += a.y;
+ for ( i = 1; i <= arcs; i++ )
+ {
+ /* compute end and second control point */
+ FT_Vector_From_Polar( &a3, radius,
+ angle_start + i * angle_diff / arcs );
+ a2.x = FT_MulFix( a3.y, coef );
+ a2.y = FT_MulFix( -a3.x, coef );
- FT_Vector_From_Polar( &b2, length, next - rotate );
- b2.x += b.x;
- b2.y += b.y;
+ a3.x += center->x;
+ a3.y += center->y;
+ a2.x += a3.x;
+ a2.y += a3.y;
/* add cubic arc */
- error = ft_stroke_border_cubicto( border, &a2, &b2, &b );
+ error = ft_stroke_border_cubicto( border, &a1, &a2, &a3 );
if ( error )
break;
- /* process the rest of the arc ?? */
- a = b;
- total -= step;
- angle = next;
+ /* a0 = a3; */
+ a1.x = a3.x - a2.x + a3.x;
+ a1.y = a3.y - a2.y + a3.y;
}
return error;
@@ -934,55 +923,40 @@
error = ft_stroker_arcto( stroker, side );
}
- else if ( stroker->line_cap == FT_STROKER_LINECAP_SQUARE )
+ else
{
- /* add a square cap */
- FT_Vector delta, delta2;
- FT_Angle rotate = FT_SIDE_TO_ROTATE( side );
+ /* add a square or butt cap */
+ FT_Vector middle, delta;
FT_Fixed radius = stroker->radius;
FT_StrokeBorder border = stroker->borders + side;
- FT_Vector_From_Polar( &delta2, radius, angle + rotate );
- FT_Vector_From_Polar( &delta, radius, angle );
-
- delta.x += stroker->center.x + delta2.x;
- delta.y += stroker->center.y + delta2.y;
-
- error = ft_stroke_border_lineto( border, &delta, FALSE );
- if ( error )
- goto Exit;
-
- FT_Vector_From_Polar( &delta2, radius, angle - rotate );
- FT_Vector_From_Polar( &delta, radius, angle );
-
- delta.x += delta2.x + stroker->center.x;
- delta.y += delta2.y + stroker->center.y;
+ /* compute middle point and first angle point */
+ FT_Vector_From_Polar( &middle, radius, angle );
+ delta.x = side ? middle.y : -middle.y;
+ delta.y = side ? -middle.x : middle.x;
- error = ft_stroke_border_lineto( border, &delta, FALSE );
- }
- else if ( stroker->line_cap == FT_STROKER_LINECAP_BUTT )
- {
- /* add a butt ending */
- FT_Vector delta;
- FT_Angle rotate = FT_SIDE_TO_ROTATE( side );
- FT_Fixed radius = stroker->radius;
- FT_StrokeBorder border = stroker->borders + side;
-
-
- FT_Vector_From_Polar( &delta, radius, angle + rotate );
+ if ( stroker->line_cap == FT_STROKER_LINECAP_SQUARE )
+ {
+ middle.x += stroker->center.x;
+ middle.y += stroker->center.y;
+ }
+ else /* FT_STROKER_LINECAP_BUTT */
+ {
+ middle.x = stroker->center.x;
+ middle.y = stroker->center.y;
+ }
- delta.x += stroker->center.x;
- delta.y += stroker->center.y;
+ delta.x += middle.x;
+ delta.y += middle.y;
error = ft_stroke_border_lineto( border, &delta, FALSE );
if ( error )
goto Exit;
- FT_Vector_From_Polar( &delta, radius, angle - rotate );
-
- delta.x += stroker->center.x;
- delta.y += stroker->center.y;
+ /* compute second angle point */
+ delta.x = middle.x - delta.x + middle.x;
+ delta.y = middle.y - delta.y + middle.y;
error = ft_stroke_border_lineto( border, &delta, FALSE );
}
@@ -1000,8 +974,8 @@
{
FT_StrokeBorder border = stroker->borders + side;
FT_Angle phi, theta, rotate;
- FT_Fixed length, thcos;
- FT_Vector delta;
+ FT_Fixed length;
+ FT_Vector sigma, delta;
FT_Error error = FT_Err_Ok;
FT_Bool intersect; /* use intersection of lines? */
@@ -1019,10 +993,13 @@
else
{
/* compute minimum required length of lines */
- FT_Fixed min_length = ft_pos_abs( FT_MulFix( stroker->radius,
- FT_Tan( theta ) ) );
+ FT_Fixed min_length;
+ FT_Vector_Unit( &sigma, theta );
+ min_length =
+ ft_pos_abs( FT_MulDiv( stroker->radius, sigma.y, sigma.x ) );
+
intersect = FT_BOOL( min_length &&
stroker->line_length >= min_length &&
line_length >= min_length );
@@ -1040,13 +1017,11 @@
else
{
/* compute median angle */
- phi = stroker->angle_in + theta;
-
- thcos = FT_Cos( theta );
+ phi = stroker->angle_in + theta + rotate;
- length = FT_DivFix( stroker->radius, thcos );
+ length = FT_DivFix( stroker->radius, sigma.x );
- FT_Vector_From_Polar( &delta, length, phi + rotate );
+ FT_Vector_From_Polar( &delta, length, phi );
delta.x += stroker->center.x;
delta.y += stroker->center.y;
}
@@ -1073,10 +1048,10 @@
else
{
/* this is a mitered (pointed) or beveled (truncated) corner */
- FT_Fixed sigma = 0, radius = stroker->radius;
- FT_Angle theta = 0, phi = 0;
- FT_Fixed thcos = 0;
- FT_Bool bevel, fixed_bevel;
+ FT_Fixed radius = stroker->radius;
+ FT_Vector sigma;
+ FT_Angle theta = 0, phi = 0;
+ FT_Bool bevel, fixed_bevel;
rotate = FT_SIDE_TO_ROTATE( side );
@@ -1087,26 +1062,20 @@
fixed_bevel =
FT_BOOL( stroker->line_join != FT_STROKER_LINEJOIN_MITER_VARIABLE );
+ /* check miter limit first */
if ( !bevel )
{
- theta = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );
+ theta = FT_Angle_Diff( stroker->angle_in, stroker->angle_out ) / 2;
- if ( theta == FT_ANGLE_PI )
- {
- theta = rotate;
- phi = stroker->angle_in;
- }
- else
- {
- theta /= 2;
- phi = stroker->angle_in + theta + rotate;
- }
+ if ( theta == FT_ANGLE_PI2 )
+ theta = -rotate;
- thcos = FT_Cos( theta );
- sigma = FT_MulFix( stroker->miter_limit, thcos );
+ phi = stroker->angle_in + theta + rotate;
+
+ FT_Vector_From_Polar( &sigma, stroker->miter_limit, theta );
/* is miter limit exceeded? */
- if ( sigma < 0x10000L )
+ if ( sigma.x < 0x10000L )
{
/* don't create variable bevels for very small deviations; */
/* FT_Sin(x) = 0 for x <= 57 */
@@ -1133,36 +1102,34 @@
border->movable = FALSE;
error = ft_stroke_border_lineto( border, &delta, FALSE );
}
- else /* variable bevel */
+ else /* variable bevel or clipped miter */
{
/* the miter is truncated */
FT_Vector middle, delta;
- FT_Fixed length;
+ FT_Fixed coef;
- /* compute middle point */
+ /* compute middle point and first angle point */
FT_Vector_From_Polar( &middle,
FT_MulFix( radius, stroker->miter_limit ),
phi );
- middle.x += stroker->center.x;
- middle.y += stroker->center.y;
- /* compute first angle point */
- length = FT_MulDiv( radius, 0x10000L - sigma,
- ft_pos_abs( FT_Sin( theta ) ) );
+ coef = FT_DivFix( 0x10000L - sigma.x, sigma.y );
+ delta.x = FT_MulFix( middle.y, coef );
+ delta.y = FT_MulFix( -middle.x, coef );
- FT_Vector_From_Polar( &delta, length, phi + rotate );
- delta.x += middle.x;
- delta.y += middle.y;
+ middle.x += stroker->center.x;
+ middle.y += stroker->center.y;
+ delta.x += middle.x;
+ delta.y += middle.y;
error = ft_stroke_border_lineto( border, &delta, FALSE );
if ( error )
goto Exit;
/* compute second angle point */
- FT_Vector_From_Polar( &delta, length, phi - rotate );
- delta.x += middle.x;
- delta.y += middle.y;
+ delta.x = middle.x - delta.x + middle.x;
+ delta.y = middle.y - delta.y + middle.y;
error = ft_stroke_border_lineto( border, &delta, FALSE );
if ( error )
@@ -1189,7 +1156,7 @@
FT_Vector delta;
- length = FT_DivFix( stroker->radius, thcos );
+ length = FT_MulDiv( stroker->radius, stroker->miter_limit, sigma.x );
FT_Vector_From_Polar( &delta, length, phi );
delta.x += stroker->center.x;
diff --git a/thirdparty/freetype/src/base/ftsynth.c b/thirdparty/freetype/src/base/ftsynth.c
index f87ed65e75..eee6b952b4 100644
--- a/thirdparty/freetype/src/base/ftsynth.c
+++ b/thirdparty/freetype/src/base/ftsynth.c
@@ -4,7 +4,7 @@
*
* FreeType synthesizing code for emboldening and slanting (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftsystem.c b/thirdparty/freetype/src/base/ftsystem.c
index f92b3a03d5..290100613f 100644
--- a/thirdparty/freetype/src/base/ftsystem.c
+++ b/thirdparty/freetype/src/base/ftsystem.c
@@ -4,7 +4,7 @@
*
* ANSI-specific FreeType low-level system interface (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/fttrigon.c b/thirdparty/freetype/src/base/fttrigon.c
index 38721977c7..dbe11107bd 100644
--- a/thirdparty/freetype/src/base/fttrigon.c
+++ b/thirdparty/freetype/src/base/fttrigon.c
@@ -4,7 +4,7 @@
*
* FreeType trigonometric functions (body).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/fttype1.c b/thirdparty/freetype/src/base/fttype1.c
index 26d4f1c3a8..61778faa70 100644
--- a/thirdparty/freetype/src/base/fttype1.c
+++ b/thirdparty/freetype/src/base/fttype1.c
@@ -4,7 +4,7 @@
*
* FreeType utility file for PS names support (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftutil.c b/thirdparty/freetype/src/base/ftutil.c
index 92bd857e92..629af174b1 100644
--- a/thirdparty/freetype/src/base/ftutil.c
+++ b/thirdparty/freetype/src/base/ftutil.c
@@ -4,7 +4,7 @@
*
* FreeType utility file for memory and list management (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/ftver.rc b/thirdparty/freetype/src/base/ftver.rc
index 1354497423..fcbd9eff5f 100644
--- a/thirdparty/freetype/src/base/ftver.rc
+++ b/thirdparty/freetype/src/base/ftver.rc
@@ -4,7 +4,7 @@
/* */
/* FreeType VERSIONINFO resource for Windows DLLs. */
/* */
-/* Copyright (C) 2018-2019 by */
+/* Copyright (C) 2018-2020 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,8 +18,8 @@
#include<windows.h>
-#define FT_VERSION 2,10,1,0
-#define FT_VERSION_STR "2.10.1"
+#define FT_VERSION 2,10,2,0
+#define FT_VERSION_STR "2.10.2"
VS_VERSION_INFO VERSIONINFO
FILEVERSION FT_VERSION
@@ -45,7 +45,7 @@ BEGIN
VALUE "FileVersion", FT_VERSION_STR
VALUE "ProductName", "FreeType"
VALUE "ProductVersion", FT_VERSION_STR
- VALUE "LegalCopyright", "\251 2018-2019 The FreeType Project www.freetype.org. All rights reserved."
+ VALUE "LegalCopyright", "\251 2000-2020 The FreeType Project www.freetype.org. All rights reserved."
VALUE "InternalName", "freetype"
VALUE "OriginalFilename", FT_FILENAME
END
diff --git a/thirdparty/freetype/src/base/ftwinfnt.c b/thirdparty/freetype/src/base/ftwinfnt.c
index 59daa77031..77527277c2 100644
--- a/thirdparty/freetype/src/base/ftwinfnt.c
+++ b/thirdparty/freetype/src/base/ftwinfnt.c
@@ -4,7 +4,7 @@
*
* FreeType API for accessing Windows FNT specific info (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/base/rules.mk b/thirdparty/freetype/src/base/rules.mk
index 4b24c6dce7..411c4c821f 100644
--- a/thirdparty/freetype/src/base/rules.mk
+++ b/thirdparty/freetype/src/base/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/bzip2/ftbzip2.c b/thirdparty/freetype/src/bzip2/ftbzip2.c
index 1fda59b60c..e4d7a4901a 100644
--- a/thirdparty/freetype/src/bzip2/ftbzip2.c
+++ b/thirdparty/freetype/src/bzip2/ftbzip2.c
@@ -8,7 +8,7 @@
* parse compressed PCF fonts, as found with many X11 server
* distributions.
*
- * Copyright (C) 2010-2019 by
+ * Copyright (C) 2010-2020 by
* Joel Klinghed.
*
* based on `src/gzip/ftgzip.c'
diff --git a/thirdparty/freetype/src/bzip2/rules.mk b/thirdparty/freetype/src/bzip2/rules.mk
index f365c1f76d..eed0f4baa4 100644
--- a/thirdparty/freetype/src/bzip2/rules.mk
+++ b/thirdparty/freetype/src/bzip2/rules.mk
@@ -2,7 +2,7 @@
# FreeType 2 BZIP2 support configuration rules
#
-# Copyright (C) 2010-2019 by
+# Copyright (C) 2010-2020 by
# Joel Klinghed.
#
# based on `src/lzw/rules.mk'
diff --git a/thirdparty/freetype/src/cache/ftcache.c b/thirdparty/freetype/src/cache/ftcache.c
index a6a3e63ef0..4137f68690 100644
--- a/thirdparty/freetype/src/cache/ftcache.c
+++ b/thirdparty/freetype/src/cache/ftcache.c
@@ -4,7 +4,7 @@
*
* The FreeType Caching sub-system (body only).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcbasic.c b/thirdparty/freetype/src/cache/ftcbasic.c
index a473585ebc..a65a90e867 100644
--- a/thirdparty/freetype/src/cache/ftcbasic.c
+++ b/thirdparty/freetype/src/cache/ftcbasic.c
@@ -4,7 +4,7 @@
*
* The FreeType basic cache interface (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftccache.c b/thirdparty/freetype/src/cache/ftccache.c
index f38ca44ddd..1d406c4200 100644
--- a/thirdparty/freetype/src/cache/ftccache.c
+++ b/thirdparty/freetype/src/cache/ftccache.c
@@ -4,7 +4,7 @@
*
* The FreeType internal cache interface (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftccache.h b/thirdparty/freetype/src/cache/ftccache.h
index 140ceadb11..2996ee8080 100644
--- a/thirdparty/freetype/src/cache/ftccache.h
+++ b/thirdparty/freetype/src/cache/ftccache.h
@@ -4,7 +4,7 @@
*
* FreeType internal cache interface (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftccback.h b/thirdparty/freetype/src/cache/ftccback.h
index 9321bc3d4e..252be7c2b5 100644
--- a/thirdparty/freetype/src/cache/ftccback.h
+++ b/thirdparty/freetype/src/cache/ftccback.h
@@ -4,7 +4,7 @@
*
* Callback functions of the caching sub-system (specification only).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftccmap.c b/thirdparty/freetype/src/cache/ftccmap.c
index 76ba10e3e9..a5da694d56 100644
--- a/thirdparty/freetype/src/cache/ftccmap.c
+++ b/thirdparty/freetype/src/cache/ftccmap.c
@@ -4,7 +4,7 @@
*
* FreeType CharMap cache (body)
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcerror.h b/thirdparty/freetype/src/cache/ftcerror.h
index e2d6417180..15e416ed21 100644
--- a/thirdparty/freetype/src/cache/ftcerror.h
+++ b/thirdparty/freetype/src/cache/ftcerror.h
@@ -4,7 +4,7 @@
*
* Caching sub-system error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcglyph.c b/thirdparty/freetype/src/cache/ftcglyph.c
index 2a0e97d4af..559a2fb4c8 100644
--- a/thirdparty/freetype/src/cache/ftcglyph.c
+++ b/thirdparty/freetype/src/cache/ftcglyph.c
@@ -4,7 +4,7 @@
*
* FreeType Glyph Image (FT_Glyph) cache (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcglyph.h b/thirdparty/freetype/src/cache/ftcglyph.h
index 5a1f0e2a74..ef689f9947 100644
--- a/thirdparty/freetype/src/cache/ftcglyph.h
+++ b/thirdparty/freetype/src/cache/ftcglyph.h
@@ -4,7 +4,7 @@
*
* FreeType abstract glyph cache (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcimage.c b/thirdparty/freetype/src/cache/ftcimage.c
index 9e64d51a22..7696b2e52d 100644
--- a/thirdparty/freetype/src/cache/ftcimage.c
+++ b/thirdparty/freetype/src/cache/ftcimage.c
@@ -4,7 +4,7 @@
*
* FreeType Image cache (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcimage.h b/thirdparty/freetype/src/cache/ftcimage.h
index dcb101fabc..f99c5074cf 100644
--- a/thirdparty/freetype/src/cache/ftcimage.h
+++ b/thirdparty/freetype/src/cache/ftcimage.h
@@ -4,7 +4,7 @@
*
* FreeType Generic Image cache (specification)
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcmanag.c b/thirdparty/freetype/src/cache/ftcmanag.c
index bd585968e3..a6f1733f64 100644
--- a/thirdparty/freetype/src/cache/ftcmanag.c
+++ b/thirdparty/freetype/src/cache/ftcmanag.c
@@ -4,7 +4,7 @@
*
* FreeType Cache Manager (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcmanag.h b/thirdparty/freetype/src/cache/ftcmanag.h
index 60c66c8fc8..17ade7175f 100644
--- a/thirdparty/freetype/src/cache/ftcmanag.h
+++ b/thirdparty/freetype/src/cache/ftcmanag.h
@@ -4,7 +4,7 @@
*
* FreeType Cache Manager (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcmru.c b/thirdparty/freetype/src/cache/ftcmru.c
index 18a7b80054..370ae3be04 100644
--- a/thirdparty/freetype/src/cache/ftcmru.c
+++ b/thirdparty/freetype/src/cache/ftcmru.c
@@ -4,7 +4,7 @@
*
* FreeType MRU support (body).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcmru.h b/thirdparty/freetype/src/cache/ftcmru.h
index 58721ed340..1591c20807 100644
--- a/thirdparty/freetype/src/cache/ftcmru.h
+++ b/thirdparty/freetype/src/cache/ftcmru.h
@@ -4,7 +4,7 @@
*
* Simple MRU list-cache (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcsbits.c b/thirdparty/freetype/src/cache/ftcsbits.c
index 06b46c896e..24e4aa1316 100644
--- a/thirdparty/freetype/src/cache/ftcsbits.c
+++ b/thirdparty/freetype/src/cache/ftcsbits.c
@@ -4,7 +4,7 @@
*
* FreeType sbits manager (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/ftcsbits.h b/thirdparty/freetype/src/cache/ftcsbits.h
index f1b71c2835..2517d15552 100644
--- a/thirdparty/freetype/src/cache/ftcsbits.h
+++ b/thirdparty/freetype/src/cache/ftcsbits.h
@@ -4,7 +4,7 @@
*
* A small-bitmap cache (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cache/rules.mk b/thirdparty/freetype/src/cache/rules.mk
index 1618d98303..4738b5153a 100644
--- a/thirdparty/freetype/src/cache/rules.mk
+++ b/thirdparty/freetype/src/cache/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2000-2019 by
+# Copyright (C) 2000-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/cff/cff.c b/thirdparty/freetype/src/cff/cff.c
index a34ba9b710..755228bb6c 100644
--- a/thirdparty/freetype/src/cff/cff.c
+++ b/thirdparty/freetype/src/cff/cff.c
@@ -4,7 +4,7 @@
*
* FreeType OpenType driver component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffcmap.c b/thirdparty/freetype/src/cff/cffcmap.c
index 15cc94cafb..1a045765de 100644
--- a/thirdparty/freetype/src/cff/cffcmap.c
+++ b/thirdparty/freetype/src/cff/cffcmap.c
@@ -4,7 +4,7 @@
*
* CFF character mapping table (cmap) support (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffcmap.h b/thirdparty/freetype/src/cff/cffcmap.h
index 07366bc748..319be88241 100644
--- a/thirdparty/freetype/src/cff/cffcmap.h
+++ b/thirdparty/freetype/src/cff/cffcmap.h
@@ -4,7 +4,7 @@
*
* CFF character mapping table (cmap) support (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffdrivr.c b/thirdparty/freetype/src/cff/cffdrivr.c
index 2324989811..6d0dcd09d2 100644
--- a/thirdparty/freetype/src/cff/cffdrivr.c
+++ b/thirdparty/freetype/src/cff/cffdrivr.c
@@ -4,7 +4,7 @@
*
* OpenType font driver implementation (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffdrivr.h b/thirdparty/freetype/src/cff/cffdrivr.h
index f2bbcfe4f1..25471d511b 100644
--- a/thirdparty/freetype/src/cff/cffdrivr.h
+++ b/thirdparty/freetype/src/cff/cffdrivr.h
@@ -4,7 +4,7 @@
*
* High-level OpenType driver interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cfferrs.h b/thirdparty/freetype/src/cff/cfferrs.h
index 78d47a156d..32be8a7637 100644
--- a/thirdparty/freetype/src/cff/cfferrs.h
+++ b/thirdparty/freetype/src/cff/cfferrs.h
@@ -4,7 +4,7 @@
*
* CFF error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffgload.c b/thirdparty/freetype/src/cff/cffgload.c
index 36aa7d1b9c..1c4e1979c4 100644
--- a/thirdparty/freetype/src/cff/cffgload.c
+++ b/thirdparty/freetype/src/cff/cffgload.c
@@ -4,7 +4,7 @@
*
* OpenType Glyph Loader (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffgload.h b/thirdparty/freetype/src/cff/cffgload.h
index 754c55acf9..b4ad61a564 100644
--- a/thirdparty/freetype/src/cff/cffgload.h
+++ b/thirdparty/freetype/src/cff/cffgload.h
@@ -4,7 +4,7 @@
*
* OpenType Glyph Loader (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffload.c b/thirdparty/freetype/src/cff/cffload.c
index 12efd18dc4..9f1d0e2e64 100644
--- a/thirdparty/freetype/src/cff/cffload.c
+++ b/thirdparty/freetype/src/cff/cffload.c
@@ -4,7 +4,7 @@
*
* OpenType and CFF data/program tables loader (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -2057,7 +2057,7 @@
if ( !error )
{
FT_TRACE4(( " top dictionary:\n" ));
- error = cff_parser_run( &parser, dict, dict + dict_len );
+ error = cff_parser_run( &parser, dict, FT_OFFSET( dict, dict_len ) );
}
/* clean up regardless of error */
diff --git a/thirdparty/freetype/src/cff/cffload.h b/thirdparty/freetype/src/cff/cffload.h
index 42d2696f33..1b7971293b 100644
--- a/thirdparty/freetype/src/cff/cffload.h
+++ b/thirdparty/freetype/src/cff/cffload.h
@@ -4,7 +4,7 @@
*
* OpenType & CFF data/program tables loader (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffobjs.c b/thirdparty/freetype/src/cff/cffobjs.c
index f76245f30b..78c3cb3c2d 100644
--- a/thirdparty/freetype/src/cff/cffobjs.c
+++ b/thirdparty/freetype/src/cff/cffobjs.c
@@ -4,7 +4,7 @@
*
* OpenType objects manager (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -1018,9 +1018,9 @@
}
#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
- /* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */
- /* has unset this flag because of the 3.0 `post' table. */
- if ( dict->cid_registry == 0xFFFFU )
+ /* CID-keyed CFF or CFF2 fonts don't have glyph names -- the SFNT */
+ /* loader has unset this flag because of the 3.0 `post' table. */
+ if ( dict->cid_registry == 0xFFFFU && !cff2 )
cffface->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
#endif
diff --git a/thirdparty/freetype/src/cff/cffobjs.h b/thirdparty/freetype/src/cff/cffobjs.h
index 03bc78a67f..6f12b95db6 100644
--- a/thirdparty/freetype/src/cff/cffobjs.h
+++ b/thirdparty/freetype/src/cff/cffobjs.h
@@ -4,7 +4,7 @@
*
* OpenType objects manager (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffparse.c b/thirdparty/freetype/src/cff/cffparse.c
index 008752c3ae..0d3bf34592 100644
--- a/thirdparty/freetype/src/cff/cffparse.c
+++ b/thirdparty/freetype/src/cff/cffparse.c
@@ -4,7 +4,7 @@
*
* CFF token stream parser (body)
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cffparse.h b/thirdparty/freetype/src/cff/cffparse.h
index 4e74709a2d..887110a748 100644
--- a/thirdparty/freetype/src/cff/cffparse.h
+++ b/thirdparty/freetype/src/cff/cffparse.h
@@ -4,7 +4,7 @@
*
* CFF token stream parser (specification)
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/cfftoken.h b/thirdparty/freetype/src/cff/cfftoken.h
index 063a7b3be0..4c6a53eec1 100644
--- a/thirdparty/freetype/src/cff/cfftoken.h
+++ b/thirdparty/freetype/src/cff/cfftoken.h
@@ -4,7 +4,7 @@
*
* CFF token definitions (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cff/module.mk b/thirdparty/freetype/src/cff/module.mk
index 8c610959d3..bd728c6a34 100644
--- a/thirdparty/freetype/src/cff/module.mk
+++ b/thirdparty/freetype/src/cff/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/cff/rules.mk b/thirdparty/freetype/src/cff/rules.mk
index 6e2dc476ef..70bb92d506 100644
--- a/thirdparty/freetype/src/cff/rules.mk
+++ b/thirdparty/freetype/src/cff/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/cid/ciderrs.h b/thirdparty/freetype/src/cid/ciderrs.h
index be80bed3be..52ab55d684 100644
--- a/thirdparty/freetype/src/cid/ciderrs.h
+++ b/thirdparty/freetype/src/cid/ciderrs.h
@@ -4,7 +4,7 @@
*
* CID error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidgload.c b/thirdparty/freetype/src/cid/cidgload.c
index f59f2880f0..daa0bddc2a 100644
--- a/thirdparty/freetype/src/cid/cidgload.c
+++ b/thirdparty/freetype/src/cid/cidgload.c
@@ -4,7 +4,7 @@
*
* CID-keyed Type1 Glyph Loader (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidgload.h b/thirdparty/freetype/src/cid/cidgload.h
index 37eba7ca7b..251c93c9f2 100644
--- a/thirdparty/freetype/src/cid/cidgload.h
+++ b/thirdparty/freetype/src/cid/cidgload.h
@@ -4,7 +4,7 @@
*
* OpenType Glyph Loader (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidload.c b/thirdparty/freetype/src/cid/cidload.c
index fce3e37da7..4723966024 100644
--- a/thirdparty/freetype/src/cid/cidload.c
+++ b/thirdparty/freetype/src/cid/cidload.c
@@ -4,7 +4,7 @@
*
* CID-keyed Type1 font loader (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -715,7 +715,7 @@
if ( ft_isdigit( *p ) )
val = (FT_Byte)( *p - '0' );
else if ( *p >= 'a' && *p <= 'f' )
- val = (FT_Byte)( *p - 'a' );
+ val = (FT_Byte)( *p - 'a' + 10 );
else if ( *p >= 'A' && *p <= 'F' )
val = (FT_Byte)( *p - 'A' + 10 );
else if ( *p == ' ' ||
diff --git a/thirdparty/freetype/src/cid/cidload.h b/thirdparty/freetype/src/cid/cidload.h
index fb9d46216d..e639f6ffef 100644
--- a/thirdparty/freetype/src/cid/cidload.h
+++ b/thirdparty/freetype/src/cid/cidload.h
@@ -4,7 +4,7 @@
*
* CID-keyed Type1 font loader (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidobjs.c b/thirdparty/freetype/src/cid/cidobjs.c
index 4e9728719b..34f72b588d 100644
--- a/thirdparty/freetype/src/cid/cidobjs.c
+++ b/thirdparty/freetype/src/cid/cidobjs.c
@@ -4,7 +4,7 @@
*
* CID objects manager (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidobjs.h b/thirdparty/freetype/src/cid/cidobjs.h
index 89c9aa74ab..efe812fd11 100644
--- a/thirdparty/freetype/src/cid/cidobjs.h
+++ b/thirdparty/freetype/src/cid/cidobjs.h
@@ -4,7 +4,7 @@
*
* CID objects manager (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidparse.c b/thirdparty/freetype/src/cid/cidparse.c
index 1be46ec328..94a36e22f5 100644
--- a/thirdparty/freetype/src/cid/cidparse.c
+++ b/thirdparty/freetype/src/cid/cidparse.c
@@ -4,7 +4,7 @@
*
* CID-keyed Type1 parser (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidparse.h b/thirdparty/freetype/src/cid/cidparse.h
index ec1f6a346d..6b2944ff57 100644
--- a/thirdparty/freetype/src/cid/cidparse.h
+++ b/thirdparty/freetype/src/cid/cidparse.h
@@ -4,7 +4,7 @@
*
* CID-keyed Type1 parser (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidriver.c b/thirdparty/freetype/src/cid/cidriver.c
index 4d91e87529..ad2f7b5cf5 100644
--- a/thirdparty/freetype/src/cid/cidriver.c
+++ b/thirdparty/freetype/src/cid/cidriver.c
@@ -4,7 +4,7 @@
*
* CID driver interface (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidriver.h b/thirdparty/freetype/src/cid/cidriver.h
index 3402fd7e99..400c2ae295 100644
--- a/thirdparty/freetype/src/cid/cidriver.h
+++ b/thirdparty/freetype/src/cid/cidriver.h
@@ -4,7 +4,7 @@
*
* High-level CID driver interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/cidtoken.h b/thirdparty/freetype/src/cid/cidtoken.h
index f505c9e166..e9f068bb50 100644
--- a/thirdparty/freetype/src/cid/cidtoken.h
+++ b/thirdparty/freetype/src/cid/cidtoken.h
@@ -4,7 +4,7 @@
*
* CID token definitions (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/cid/module.mk b/thirdparty/freetype/src/cid/module.mk
index 875c683c72..9fb02235e6 100644
--- a/thirdparty/freetype/src/cid/module.mk
+++ b/thirdparty/freetype/src/cid/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/cid/rules.mk b/thirdparty/freetype/src/cid/rules.mk
index 2b68dd48a0..94f663c80e 100644
--- a/thirdparty/freetype/src/cid/rules.mk
+++ b/thirdparty/freetype/src/cid/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/cid/type1cid.c b/thirdparty/freetype/src/cid/type1cid.c
index d21801cec1..ba9141075f 100644
--- a/thirdparty/freetype/src/cid/type1cid.c
+++ b/thirdparty/freetype/src/cid/type1cid.c
@@ -4,7 +4,7 @@
*
* FreeType OpenType driver component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/gxvalid/README b/thirdparty/freetype/src/gxvalid/README
index d493587842..2a32bab204 100644
--- a/thirdparty/freetype/src/gxvalid/README
+++ b/thirdparty/freetype/src/gxvalid/README
@@ -518,7 +518,7 @@ gxvalid: TrueType GX validator
------------------------------------------------------------------------
-Copyright (C) 2004-2019 by
+Copyright (C) 2004-2020 by
suzuki toshiya, Masatake YAMATO, Red hat K.K.,
David Turner, Robert Wilhelm, and Werner Lemberg.
diff --git a/thirdparty/freetype/src/gxvalid/gxvalid.c b/thirdparty/freetype/src/gxvalid/gxvalid.c
index 462e461bf2..cb655aeb9d 100644
--- a/thirdparty/freetype/src/gxvalid/gxvalid.c
+++ b/thirdparty/freetype/src/gxvalid/gxvalid.c
@@ -4,7 +4,7 @@
*
* FreeType validator for TrueTypeGX/AAT tables (body only).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvalid.h b/thirdparty/freetype/src/gxvalid/gxvalid.h
index 969cd0927a..cdf1986324 100644
--- a/thirdparty/freetype/src/gxvalid/gxvalid.h
+++ b/thirdparty/freetype/src/gxvalid/gxvalid.h
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT table validation (specification only).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvbsln.c b/thirdparty/freetype/src/gxvalid/gxvbsln.c
index f22f2545fa..ac58d4615c 100644
--- a/thirdparty/freetype/src/gxvalid/gxvbsln.c
+++ b/thirdparty/freetype/src/gxvalid/gxvbsln.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT bsln table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvcommn.c b/thirdparty/freetype/src/gxvalid/gxvcommn.c
index c5cb8ebe8b..ead0f24cd3 100644
--- a/thirdparty/freetype/src/gxvalid/gxvcommn.c
+++ b/thirdparty/freetype/src/gxvalid/gxvcommn.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT common tables validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvcommn.h b/thirdparty/freetype/src/gxvalid/gxvcommn.h
index 334dc9dfb3..2372fc86fa 100644
--- a/thirdparty/freetype/src/gxvalid/gxvcommn.h
+++ b/thirdparty/freetype/src/gxvalid/gxvcommn.h
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT common tables validation (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxverror.h b/thirdparty/freetype/src/gxvalid/gxverror.h
index da0edb35f9..475b9f7778 100644
--- a/thirdparty/freetype/src/gxvalid/gxverror.h
+++ b/thirdparty/freetype/src/gxvalid/gxverror.h
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT validation module error codes (specification only).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvfeat.c b/thirdparty/freetype/src/gxvalid/gxvfeat.c
index e1a12a18ed..400ec8a3fb 100644
--- a/thirdparty/freetype/src/gxvalid/gxvfeat.c
+++ b/thirdparty/freetype/src/gxvalid/gxvfeat.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT feat table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvfeat.h b/thirdparty/freetype/src/gxvalid/gxvfeat.h
index 6c9892910c..435dcefb09 100644
--- a/thirdparty/freetype/src/gxvalid/gxvfeat.h
+++ b/thirdparty/freetype/src/gxvalid/gxvfeat.h
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT feat table validation (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvfgen.c b/thirdparty/freetype/src/gxvalid/gxvfgen.c
index 5ecb9443c3..fe05a6f3a1 100644
--- a/thirdparty/freetype/src/gxvalid/gxvfgen.c
+++ b/thirdparty/freetype/src/gxvalid/gxvfgen.c
@@ -5,7 +5,7 @@
* Generate feature registry data for gxv `feat' validator.
* This program is derived from gxfeatreg.c in gxlayout.
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* Masatake YAMATO and Redhat K.K.
*
* This file may only be used,
diff --git a/thirdparty/freetype/src/gxvalid/gxvjust.c b/thirdparty/freetype/src/gxvalid/gxvjust.c
index a582377859..d8875b4111 100644
--- a/thirdparty/freetype/src/gxvalid/gxvjust.c
+++ b/thirdparty/freetype/src/gxvalid/gxvjust.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT just table validation (body).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvkern.c b/thirdparty/freetype/src/gxvalid/gxvkern.c
index a7532335a5..ab5643eb83 100644
--- a/thirdparty/freetype/src/gxvalid/gxvkern.c
+++ b/thirdparty/freetype/src/gxvalid/gxvkern.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT kern table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvlcar.c b/thirdparty/freetype/src/gxvalid/gxvlcar.c
index 13b3de3eaa..82ac1907ab 100644
--- a/thirdparty/freetype/src/gxvalid/gxvlcar.c
+++ b/thirdparty/freetype/src/gxvalid/gxvlcar.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT lcar table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmod.c b/thirdparty/freetype/src/gxvalid/gxvmod.c
index eeadeb3e1d..2b8f45d1c2 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmod.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmod.c
@@ -4,7 +4,7 @@
*
* FreeType's TrueTypeGX/AAT validation module implementation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmod.h b/thirdparty/freetype/src/gxvalid/gxvmod.h
index 6ecd7312c9..bdf465f4f0 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmod.h
+++ b/thirdparty/freetype/src/gxvalid/gxvmod.h
@@ -5,7 +5,7 @@
* FreeType's TrueTypeGX/AAT validation module implementation
* (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmort.c b/thirdparty/freetype/src/gxvalid/gxvmort.c
index 288ef6988b..aae7f01a89 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmort.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmort.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT mort table validation (body).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmort.h b/thirdparty/freetype/src/gxvalid/gxvmort.h
index 0619e24fb9..35a18e76a6 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmort.h
+++ b/thirdparty/freetype/src/gxvalid/gxvmort.h
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT common definition for mort table (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmort0.c b/thirdparty/freetype/src/gxvalid/gxvmort0.c
index 2c01bf95ec..d452c1ccaa 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmort0.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmort0.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT mort table validation
* body for type0 (Indic Script Rearrangement) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmort1.c b/thirdparty/freetype/src/gxvalid/gxvmort1.c
index c71ba13351..d743f89f6e 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmort1.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmort1.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT mort table validation
* body for type1 (Contextual Substitution) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmort2.c b/thirdparty/freetype/src/gxvalid/gxvmort2.c
index 889d3bd582..9e69e1269d 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmort2.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmort2.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT mort table validation
* body for type2 (Ligature Substitution) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmort4.c b/thirdparty/freetype/src/gxvalid/gxvmort4.c
index f8ce6cf789..4584d204cf 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmort4.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmort4.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT mort table validation
* body for type4 (Non-Contextual Glyph Substitution) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmort5.c b/thirdparty/freetype/src/gxvalid/gxvmort5.c
index 1ba1e5ded0..a15a24fe65 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmort5.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmort5.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT mort table validation
* body for type5 (Contextual Glyph Insertion) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx.c b/thirdparty/freetype/src/gxvalid/gxvmorx.c
index 8bd45c27e6..754d9f8bf1 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmorx.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmorx.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT morx table validation (body).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx.h b/thirdparty/freetype/src/gxvalid/gxvmorx.h
index e257270342..99be181067 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmorx.h
+++ b/thirdparty/freetype/src/gxvalid/gxvmorx.h
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT common definition for morx table (specification).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx0.c b/thirdparty/freetype/src/gxvalid/gxvmorx0.c
index d7764a0ae8..5a42e552e2 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmorx0.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmorx0.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT morx table validation
* body for type0 (Indic Script Rearrangement) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx1.c b/thirdparty/freetype/src/gxvalid/gxvmorx1.c
index 5b41b3605f..9f8b69067e 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmorx1.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmorx1.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT morx table validation
* body for type1 (Contextual Substitution) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx2.c b/thirdparty/freetype/src/gxvalid/gxvmorx2.c
index ec4c81299d..98b5c49c26 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmorx2.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmorx2.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT morx table validation
* body for type2 (Ligature Substitution) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx4.c b/thirdparty/freetype/src/gxvalid/gxvmorx4.c
index 7b041534c0..857e4d4eb8 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmorx4.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmorx4.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT morx table validation
* body for "morx" type4 (Non-Contextual Glyph Substitution) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx5.c b/thirdparty/freetype/src/gxvalid/gxvmorx5.c
index 70a4623656..7ceba077af 100644
--- a/thirdparty/freetype/src/gxvalid/gxvmorx5.c
+++ b/thirdparty/freetype/src/gxvalid/gxvmorx5.c
@@ -5,7 +5,7 @@
* TrueTypeGX/AAT morx table validation
* body for type5 (Contextual Glyph Insertion) subtable.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvopbd.c b/thirdparty/freetype/src/gxvalid/gxvopbd.c
index f055a22054..a398fe0977 100644
--- a/thirdparty/freetype/src/gxvalid/gxvopbd.c
+++ b/thirdparty/freetype/src/gxvalid/gxvopbd.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT opbd table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvprop.c b/thirdparty/freetype/src/gxvalid/gxvprop.c
index e1911edd48..bee8bab97b 100644
--- a/thirdparty/freetype/src/gxvalid/gxvprop.c
+++ b/thirdparty/freetype/src/gxvalid/gxvprop.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT prop table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/gxvtrak.c b/thirdparty/freetype/src/gxvalid/gxvtrak.c
index b7794b7af4..58a631c9e5 100644
--- a/thirdparty/freetype/src/gxvalid/gxvtrak.c
+++ b/thirdparty/freetype/src/gxvalid/gxvtrak.c
@@ -4,7 +4,7 @@
*
* TrueTypeGX/AAT trak table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
diff --git a/thirdparty/freetype/src/gxvalid/module.mk b/thirdparty/freetype/src/gxvalid/module.mk
index 04067ce617..e7d408df9d 100644
--- a/thirdparty/freetype/src/gxvalid/module.mk
+++ b/thirdparty/freetype/src/gxvalid/module.mk
@@ -2,7 +2,7 @@
# FreeType 2 gxvalid module definition
#
-# Copyright (C) 2004-2019 by
+# Copyright (C) 2004-2020 by
# suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
diff --git a/thirdparty/freetype/src/gxvalid/rules.mk b/thirdparty/freetype/src/gxvalid/rules.mk
index 4ef463bc21..d55a4935e2 100644
--- a/thirdparty/freetype/src/gxvalid/rules.mk
+++ b/thirdparty/freetype/src/gxvalid/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2004-2019 by
+# Copyright (C) 2004-2020 by
# suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
diff --git a/thirdparty/freetype/src/gzip/ftgzip.c b/thirdparty/freetype/src/gzip/ftgzip.c
index 5e78bc6f8d..6b1df3a4a7 100644
--- a/thirdparty/freetype/src/gzip/ftgzip.c
+++ b/thirdparty/freetype/src/gzip/ftgzip.c
@@ -8,7 +8,7 @@
* parse compressed PCF fonts, as found with many X11 server
* distributions.
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -746,7 +746,17 @@
stream.zfree = (free_func) ft_gzip_free;
stream.opaque = memory;
+ /* This is a temporary fix and will be removed once the internal
+ * copy of zlib is updated to the newest version. The `|32' flag
+ * is only supported in the new versions of zlib to enable gzip
+ * encoded header.
+ */
+#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB
err = inflateInit2( &stream, MAX_WBITS|32 );
+#else
+ err = inflateInit2( &stream, MAX_WBITS );
+#endif
+
if ( err != Z_OK )
return FT_THROW( Invalid_Argument );
diff --git a/thirdparty/freetype/src/gzip/infutil.h b/thirdparty/freetype/src/gzip/infutil.h
index 7174b6dd0f..cdf18b4f90 100644
--- a/thirdparty/freetype/src/gzip/infutil.h
+++ b/thirdparty/freetype/src/gzip/infutil.h
@@ -86,7 +86,7 @@ struct inflate_blocks_state {
/* masks for lower bits (size given to avoid silly warnings with Visual C++) */
#ifndef NO_INFLATE_MASK
-local uInt inflate_mask[17];
+local const uInt inflate_mask[17];
#endif
/* copy as much as possible from the sliding window to the output area */
diff --git a/thirdparty/freetype/src/gzip/rules.mk b/thirdparty/freetype/src/gzip/rules.mk
index 44206a1dae..4ea823f8d3 100644
--- a/thirdparty/freetype/src/gzip/rules.mk
+++ b/thirdparty/freetype/src/gzip/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2002-2019 by
+# Copyright (C) 2002-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/lzw/ftlzw.c b/thirdparty/freetype/src/lzw/ftlzw.c
index 9805a1e3bd..7d3f3e3f55 100644
--- a/thirdparty/freetype/src/lzw/ftlzw.c
+++ b/thirdparty/freetype/src/lzw/ftlzw.c
@@ -8,7 +8,7 @@
* be used to parse compressed PCF fonts, as found with many X11 server
* distributions.
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* Albert Chin-A-Young.
*
* based on code in `src/gzip/ftgzip.c'
diff --git a/thirdparty/freetype/src/lzw/ftzopen.c b/thirdparty/freetype/src/lzw/ftzopen.c
index 67e6760f95..cdc7f4e683 100644
--- a/thirdparty/freetype/src/lzw/ftzopen.c
+++ b/thirdparty/freetype/src/lzw/ftzopen.c
@@ -8,7 +8,7 @@
* be used to parse compressed PCF fonts, as found with many X11 server
* distributions.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* David Turner.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/lzw/ftzopen.h b/thirdparty/freetype/src/lzw/ftzopen.h
index 44fe36d6c5..2866529bd4 100644
--- a/thirdparty/freetype/src/lzw/ftzopen.h
+++ b/thirdparty/freetype/src/lzw/ftzopen.h
@@ -8,7 +8,7 @@
* be used to parse compressed PCF fonts, as found with many X11 server
* distributions.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* David Turner.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/lzw/rules.mk b/thirdparty/freetype/src/lzw/rules.mk
index 930b32e6b1..3468ee024d 100644
--- a/thirdparty/freetype/src/lzw/rules.mk
+++ b/thirdparty/freetype/src/lzw/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2004-2019 by
+# Copyright (C) 2004-2020 by
# Albert Chin-A-Young.
#
# based on `src/lzw/rules.mk'
diff --git a/thirdparty/freetype/src/otvalid/module.mk b/thirdparty/freetype/src/otvalid/module.mk
index 5ea5b7b57b..67b9820d84 100644
--- a/thirdparty/freetype/src/otvalid/module.mk
+++ b/thirdparty/freetype/src/otvalid/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2004-2019 by
+# Copyright (C) 2004-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/otvalid/otvalid.c b/thirdparty/freetype/src/otvalid/otvalid.c
index e3964b99ae..487d336a3b 100644
--- a/thirdparty/freetype/src/otvalid/otvalid.c
+++ b/thirdparty/freetype/src/otvalid/otvalid.c
@@ -4,7 +4,7 @@
*
* FreeType validator for OpenType tables (body only).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvalid.h b/thirdparty/freetype/src/otvalid/otvalid.h
index 5ca819f261..3c70268964 100644
--- a/thirdparty/freetype/src/otvalid/otvalid.h
+++ b/thirdparty/freetype/src/otvalid/otvalid.h
@@ -4,7 +4,7 @@
*
* OpenType table validation (specification only).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvbase.c b/thirdparty/freetype/src/otvalid/otvbase.c
index be69d7ca31..250ae98ab5 100644
--- a/thirdparty/freetype/src/otvalid/otvbase.c
+++ b/thirdparty/freetype/src/otvalid/otvbase.c
@@ -4,7 +4,7 @@
*
* OpenType BASE table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvcommn.c b/thirdparty/freetype/src/otvalid/otvcommn.c
index 5ed1723506..faaa846871 100644
--- a/thirdparty/freetype/src/otvalid/otvcommn.c
+++ b/thirdparty/freetype/src/otvalid/otvcommn.c
@@ -4,7 +4,7 @@
*
* OpenType common tables validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -151,6 +151,9 @@
FT_UInt result = 0;
+ if ( !count )
+ return result;
+
switch ( CoverageFormat )
{
case 1:
diff --git a/thirdparty/freetype/src/otvalid/otvcommn.h b/thirdparty/freetype/src/otvalid/otvcommn.h
index bfcc5b974a..1daf7dca79 100644
--- a/thirdparty/freetype/src/otvalid/otvcommn.h
+++ b/thirdparty/freetype/src/otvalid/otvcommn.h
@@ -4,7 +4,7 @@
*
* OpenType common tables validation (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otverror.h b/thirdparty/freetype/src/otvalid/otverror.h
index a7d35acf1a..49c34d6cd8 100644
--- a/thirdparty/freetype/src/otvalid/otverror.h
+++ b/thirdparty/freetype/src/otvalid/otverror.h
@@ -4,7 +4,7 @@
*
* OpenType validation module error codes (specification only).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvgdef.c b/thirdparty/freetype/src/otvalid/otvgdef.c
index 2529b544d2..88874b8474 100644
--- a/thirdparty/freetype/src/otvalid/otvgdef.c
+++ b/thirdparty/freetype/src/otvalid/otvgdef.c
@@ -4,7 +4,7 @@
*
* OpenType GDEF table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvgpos.c b/thirdparty/freetype/src/otvalid/otvgpos.c
index f3bddeac6c..29d56f91e8 100644
--- a/thirdparty/freetype/src/otvalid/otvgpos.c
+++ b/thirdparty/freetype/src/otvalid/otvgpos.c
@@ -4,7 +4,7 @@
*
* OpenType GPOS table validation (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvgpos.h b/thirdparty/freetype/src/otvalid/otvgpos.h
index b3154312eb..06a03a0e6c 100644
--- a/thirdparty/freetype/src/otvalid/otvgpos.h
+++ b/thirdparty/freetype/src/otvalid/otvgpos.h
@@ -4,7 +4,7 @@
*
* OpenType GPOS table validator (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvgsub.c b/thirdparty/freetype/src/otvalid/otvgsub.c
index 97da997d3d..f0d563ba92 100644
--- a/thirdparty/freetype/src/otvalid/otvgsub.c
+++ b/thirdparty/freetype/src/otvalid/otvgsub.c
@@ -4,7 +4,7 @@
*
* OpenType GSUB table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvjstf.c b/thirdparty/freetype/src/otvalid/otvjstf.c
index d4e6d87178..79de7b809d 100644
--- a/thirdparty/freetype/src/otvalid/otvjstf.c
+++ b/thirdparty/freetype/src/otvalid/otvjstf.c
@@ -4,7 +4,7 @@
*
* OpenType JSTF table validation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvmath.c b/thirdparty/freetype/src/otvalid/otvmath.c
index 3aaf0ec0ec..dfdeaaba7e 100644
--- a/thirdparty/freetype/src/otvalid/otvmath.c
+++ b/thirdparty/freetype/src/otvalid/otvmath.c
@@ -4,7 +4,7 @@
*
* OpenType MATH table validation (body).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* Written by George Williams.
diff --git a/thirdparty/freetype/src/otvalid/otvmod.c b/thirdparty/freetype/src/otvalid/otvmod.c
index f417bd220f..5f3e7e8d49 100644
--- a/thirdparty/freetype/src/otvalid/otvmod.c
+++ b/thirdparty/freetype/src/otvalid/otvmod.c
@@ -4,7 +4,7 @@
*
* FreeType's OpenType validation module implementation (body).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/otvmod.h b/thirdparty/freetype/src/otvalid/otvmod.h
index 5539de7ec6..f172c2c8fa 100644
--- a/thirdparty/freetype/src/otvalid/otvmod.h
+++ b/thirdparty/freetype/src/otvalid/otvmod.h
@@ -5,7 +5,7 @@
* FreeType's OpenType validation module implementation
* (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/otvalid/rules.mk b/thirdparty/freetype/src/otvalid/rules.mk
index 3c6ece1c19..7f0169fd89 100644
--- a/thirdparty/freetype/src/otvalid/rules.mk
+++ b/thirdparty/freetype/src/otvalid/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2004-2019 by
+# Copyright (C) 2004-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/pfr/module.mk b/thirdparty/freetype/src/pfr/module.mk
index 30d876d4c8..762353dda2 100644
--- a/thirdparty/freetype/src/pfr/module.mk
+++ b/thirdparty/freetype/src/pfr/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2002-2019 by
+# Copyright (C) 2002-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/pfr/pfr.c b/thirdparty/freetype/src/pfr/pfr.c
index 6d885ea47f..5dea6fa34a 100644
--- a/thirdparty/freetype/src/pfr/pfr.c
+++ b/thirdparty/freetype/src/pfr/pfr.c
@@ -4,7 +4,7 @@
*
* FreeType PFR driver component.
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrcmap.c b/thirdparty/freetype/src/pfr/pfrcmap.c
index bfa1b9ea05..3f64ba8b04 100644
--- a/thirdparty/freetype/src/pfr/pfrcmap.c
+++ b/thirdparty/freetype/src/pfr/pfrcmap.c
@@ -4,7 +4,7 @@
*
* FreeType PFR cmap handling (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrcmap.h b/thirdparty/freetype/src/pfr/pfrcmap.h
index 1e203a0514..b90e8a101f 100644
--- a/thirdparty/freetype/src/pfr/pfrcmap.h
+++ b/thirdparty/freetype/src/pfr/pfrcmap.h
@@ -4,7 +4,7 @@
*
* FreeType PFR cmap handling (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrdrivr.c b/thirdparty/freetype/src/pfr/pfrdrivr.c
index f67eebf118..2028c8e11b 100644
--- a/thirdparty/freetype/src/pfr/pfrdrivr.c
+++ b/thirdparty/freetype/src/pfr/pfrdrivr.c
@@ -4,7 +4,7 @@
*
* FreeType PFR driver interface (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrdrivr.h b/thirdparty/freetype/src/pfr/pfrdrivr.h
index 33b7b9413f..865ec8188a 100644
--- a/thirdparty/freetype/src/pfr/pfrdrivr.h
+++ b/thirdparty/freetype/src/pfr/pfrdrivr.h
@@ -4,7 +4,7 @@
*
* High-level Type PFR driver interface (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrerror.h b/thirdparty/freetype/src/pfr/pfrerror.h
index 4829cfc000..2dbeedfe15 100644
--- a/thirdparty/freetype/src/pfr/pfrerror.h
+++ b/thirdparty/freetype/src/pfr/pfrerror.h
@@ -4,7 +4,7 @@
*
* PFR error codes (specification only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrgload.c b/thirdparty/freetype/src/pfr/pfrgload.c
index 6ef5856a8d..7d57ae1530 100644
--- a/thirdparty/freetype/src/pfr/pfrgload.c
+++ b/thirdparty/freetype/src/pfr/pfrgload.c
@@ -4,7 +4,7 @@
*
* FreeType PFR glyph loader (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrgload.h b/thirdparty/freetype/src/pfr/pfrgload.h
index d0e1420b67..f356b4c75b 100644
--- a/thirdparty/freetype/src/pfr/pfrgload.h
+++ b/thirdparty/freetype/src/pfr/pfrgload.h
@@ -4,7 +4,7 @@
*
* FreeType PFR glyph loader (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrload.c b/thirdparty/freetype/src/pfr/pfrload.c
index ccf0b7e1f8..6eeed28245 100644
--- a/thirdparty/freetype/src/pfr/pfrload.c
+++ b/thirdparty/freetype/src/pfr/pfrload.c
@@ -4,7 +4,7 @@
*
* FreeType PFR loader (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrload.h b/thirdparty/freetype/src/pfr/pfrload.h
index 2e7ffd0127..7d113df270 100644
--- a/thirdparty/freetype/src/pfr/pfrload.h
+++ b/thirdparty/freetype/src/pfr/pfrload.h
@@ -4,7 +4,7 @@
*
* FreeType PFR loader (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrobjs.c b/thirdparty/freetype/src/pfr/pfrobjs.c
index 9765f95c2f..9bc90a4b68 100644
--- a/thirdparty/freetype/src/pfr/pfrobjs.c
+++ b/thirdparty/freetype/src/pfr/pfrobjs.c
@@ -4,7 +4,7 @@
*
* FreeType PFR object methods (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrobjs.h b/thirdparty/freetype/src/pfr/pfrobjs.h
index 39cffd07c5..808822f1c4 100644
--- a/thirdparty/freetype/src/pfr/pfrobjs.h
+++ b/thirdparty/freetype/src/pfr/pfrobjs.h
@@ -4,7 +4,7 @@
*
* FreeType PFR object methods (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrsbit.c b/thirdparty/freetype/src/pfr/pfrsbit.c
index 00a9616455..00669e13ff 100644
--- a/thirdparty/freetype/src/pfr/pfrsbit.c
+++ b/thirdparty/freetype/src/pfr/pfrsbit.c
@@ -4,7 +4,7 @@
*
* FreeType PFR bitmap loader (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrsbit.h b/thirdparty/freetype/src/pfr/pfrsbit.h
index 6568b90943..8cb0de0d25 100644
--- a/thirdparty/freetype/src/pfr/pfrsbit.h
+++ b/thirdparty/freetype/src/pfr/pfrsbit.h
@@ -4,7 +4,7 @@
*
* FreeType PFR bitmap loader (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/pfrtypes.h b/thirdparty/freetype/src/pfr/pfrtypes.h
index 6a5f9d571b..dfc47beff3 100644
--- a/thirdparty/freetype/src/pfr/pfrtypes.h
+++ b/thirdparty/freetype/src/pfr/pfrtypes.h
@@ -4,7 +4,7 @@
*
* FreeType PFR data structures (specification only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pfr/rules.mk b/thirdparty/freetype/src/pfr/rules.mk
index f14ca699e2..a1fe82baff 100644
--- a/thirdparty/freetype/src/pfr/rules.mk
+++ b/thirdparty/freetype/src/pfr/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2002-2019 by
+# Copyright (C) 2002-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/psaux/afmparse.c b/thirdparty/freetype/src/psaux/afmparse.c
index f78adbba3d..b957158aec 100644
--- a/thirdparty/freetype/src/psaux/afmparse.c
+++ b/thirdparty/freetype/src/psaux/afmparse.c
@@ -4,7 +4,7 @@
*
* AFM parser (body).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/afmparse.h b/thirdparty/freetype/src/psaux/afmparse.h
index 2ceb77553b..50f4834b3f 100644
--- a/thirdparty/freetype/src/psaux/afmparse.h
+++ b/thirdparty/freetype/src/psaux/afmparse.h
@@ -4,7 +4,7 @@
*
* AFM parser (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/cffdecode.c b/thirdparty/freetype/src/psaux/cffdecode.c
index 17cccf818b..172e3b23a3 100644
--- a/thirdparty/freetype/src/psaux/cffdecode.c
+++ b/thirdparty/freetype/src/psaux/cffdecode.c
@@ -4,7 +4,7 @@
*
* PostScript CFF (Type 2) decoding routines (body).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -330,7 +330,7 @@
builder->left_bearing.x = 0;
builder->left_bearing.y = 0;
- builder->pos_x = adx - asb;
+ builder->pos_x = SUB_LONG( adx, asb );
builder->pos_y = ady;
/* Now load `achar' on top of the base outline. */
@@ -530,6 +530,9 @@
builder->path_begun = 0;
+ if ( !charstring_base )
+ return FT_Err_Ok;
+
zone->base = charstring_base;
limit = zone->limit = charstring_base + charstring_len;
ip = zone->cursor = zone->base;
diff --git a/thirdparty/freetype/src/psaux/cffdecode.h b/thirdparty/freetype/src/psaux/cffdecode.h
index a6691979f0..5dc968b255 100644
--- a/thirdparty/freetype/src/psaux/cffdecode.h
+++ b/thirdparty/freetype/src/psaux/cffdecode.h
@@ -4,7 +4,7 @@
*
* PostScript CFF (Type 2) decoding routines (specification).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/module.mk b/thirdparty/freetype/src/psaux/module.mk
index bb0886abdf..651db01426 100644
--- a/thirdparty/freetype/src/psaux/module.mk
+++ b/thirdparty/freetype/src/psaux/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/psaux/psaux.c b/thirdparty/freetype/src/psaux/psaux.c
index 1db0462551..96d2484e9d 100644
--- a/thirdparty/freetype/src/psaux/psaux.c
+++ b/thirdparty/freetype/src/psaux/psaux.c
@@ -4,7 +4,7 @@
*
* FreeType auxiliary PostScript driver component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/psauxerr.h b/thirdparty/freetype/src/psaux/psauxerr.h
index 523e1886c2..df8b09ff78 100644
--- a/thirdparty/freetype/src/psaux/psauxerr.h
+++ b/thirdparty/freetype/src/psaux/psauxerr.h
@@ -4,7 +4,7 @@
*
* PS auxiliary module error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/psauxmod.c b/thirdparty/freetype/src/psaux/psauxmod.c
index 5df8e69056..bb520792e0 100644
--- a/thirdparty/freetype/src/psaux/psauxmod.c
+++ b/thirdparty/freetype/src/psaux/psauxmod.c
@@ -4,7 +4,7 @@
*
* FreeType auxiliary PostScript module implementation (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/psauxmod.h b/thirdparty/freetype/src/psaux/psauxmod.h
index a0eda0bfc0..6e2eb67042 100644
--- a/thirdparty/freetype/src/psaux/psauxmod.h
+++ b/thirdparty/freetype/src/psaux/psauxmod.h
@@ -4,7 +4,7 @@
*
* FreeType auxiliary PostScript module implementation (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/psconv.c b/thirdparty/freetype/src/psaux/psconv.c
index c88761681c..c813a0596c 100644
--- a/thirdparty/freetype/src/psaux/psconv.c
+++ b/thirdparty/freetype/src/psaux/psconv.c
@@ -4,7 +4,7 @@
*
* Some convenience conversions (body).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/psconv.h b/thirdparty/freetype/src/psaux/psconv.h
index 6b24bf6fc9..2cd5c60e4b 100644
--- a/thirdparty/freetype/src/psaux/psconv.h
+++ b/thirdparty/freetype/src/psaux/psconv.h
@@ -4,7 +4,7 @@
*
* Some convenience conversions (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/psft.c b/thirdparty/freetype/src/psaux/psft.c
index 54be468343..50b40bf8fe 100644
--- a/thirdparty/freetype/src/psaux/psft.c
+++ b/thirdparty/freetype/src/psaux/psft.c
@@ -313,7 +313,7 @@
FT_Error error = FT_Err_Ok;
CF2_Font font;
- FT_Bool is_t1 = decoder->builder.is_t1;
+ FT_Bool is_t1 = decoder->builder.is_t1;
FT_ASSERT( decoder &&
@@ -385,7 +385,7 @@
FT_ZERO( &buf );
buf.start =
buf.ptr = charstring_base;
- buf.end = charstring_base + charstring_len;
+ buf.end = FT_OFFSET( charstring_base, charstring_len );
FT_ZERO( &transform );
@@ -697,7 +697,7 @@
FT_ASSERT( charstring + len >= charstring );
buf->start = charstring;
- buf->end = charstring + len;
+ buf->end = FT_OFFSET( charstring, len );
buf->ptr = buf->start;
return FT_Err_Ok;
@@ -820,7 +820,7 @@
/* The CID driver stores subroutines with seed bytes. This */
/* case is taken care of when decoder->subrs_len == 0. */
if ( decoder->locals_len )
- buf->end = buf->start + decoder->locals_len[idx];
+ buf->end = FT_OFFSET( buf->start, decoder->locals_len[idx] );
else
{
/* We are using subroutines from a CID font. We must adjust */
diff --git a/thirdparty/freetype/src/psaux/psintrp.c b/thirdparty/freetype/src/psaux/psintrp.c
index e2f3accdd5..0a84145535 100644
--- a/thirdparty/freetype/src/psaux/psintrp.c
+++ b/thirdparty/freetype/src/psaux/psintrp.c
@@ -1433,6 +1433,13 @@
lastError = error2; /* pass FreeType error through */
goto exit;
}
+
+ /* save the left bearing and width of the SEAC */
+ /* glyph as they will be erased by the next load */
+
+ left_bearing = *decoder->builder.left_bearing;
+ advance = *decoder->builder.advance;
+
cf2_interpT2CharString( font,
&component,
callbacks,
@@ -1443,11 +1450,14 @@
&dummyWidth );
cf2_freeT1SeacComponent( decoder, &component );
- /* save the left bearing and width of the base */
- /* character as they will be erased by the next load */
+ /* If the SEAC glyph doesn't have a (H)SBW of its */
+ /* own use the values from the base glyph. */
- left_bearing = *decoder->builder.left_bearing;
- advance = *decoder->builder.advance;
+ if ( !haveWidth )
+ {
+ left_bearing = *decoder->builder.left_bearing;
+ advance = *decoder->builder.advance;
+ }
decoder->builder.left_bearing->x = 0;
decoder->builder.left_bearing->y = 0;
@@ -1473,8 +1483,8 @@
&dummyWidth );
cf2_freeT1SeacComponent( decoder, &component );
- /* restore the left side bearing and */
- /* advance width of the base character */
+ /* restore the left side bearing and advance width */
+ /* of the SEAC glyph or base character (saved above) */
*decoder->builder.left_bearing = left_bearing;
*decoder->builder.advance = advance;
diff --git a/thirdparty/freetype/src/psaux/psobjs.c b/thirdparty/freetype/src/psaux/psobjs.c
index 8bfdb92332..b37a78832c 100644
--- a/thirdparty/freetype/src/psaux/psobjs.c
+++ b/thirdparty/freetype/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
*
* Auxiliary functions for PostScript fonts (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -214,7 +214,7 @@
}
/* add the object to the base block and adjust offset */
- table->elements[idx] = table->block + table->cursor;
+ table->elements[idx] = FT_OFFSET( table->block, table->cursor );
table->lengths [idx] = length;
FT_MEM_COPY( table->block + table->cursor, object, length );
@@ -2577,7 +2577,7 @@
FT_UShort seed )
{
PS_Conv_EexecDecode( &buffer,
- buffer + length,
+ FT_OFFSET( buffer, length ),
buffer,
length,
&seed );
diff --git a/thirdparty/freetype/src/psaux/psobjs.h b/thirdparty/freetype/src/psaux/psobjs.h
index c44dc450ec..d37638d0ca 100644
--- a/thirdparty/freetype/src/psaux/psobjs.h
+++ b/thirdparty/freetype/src/psaux/psobjs.h
@@ -4,7 +4,7 @@
*
* Auxiliary functions for PostScript fonts (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/rules.mk b/thirdparty/freetype/src/psaux/rules.mk
index 2de734d547..f49aecbc79 100644
--- a/thirdparty/freetype/src/psaux/rules.mk
+++ b/thirdparty/freetype/src/psaux/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/psaux/t1cmap.c b/thirdparty/freetype/src/psaux/t1cmap.c
index d62d2d5c81..451b276537 100644
--- a/thirdparty/freetype/src/psaux/t1cmap.c
+++ b/thirdparty/freetype/src/psaux/t1cmap.c
@@ -4,7 +4,7 @@
*
* Type 1 character map support (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/t1cmap.h b/thirdparty/freetype/src/psaux/t1cmap.h
index d325e7b5a6..5411913831 100644
--- a/thirdparty/freetype/src/psaux/t1cmap.h
+++ b/thirdparty/freetype/src/psaux/t1cmap.h
@@ -4,7 +4,7 @@
*
* Type 1 character map support (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psaux/t1decode.c b/thirdparty/freetype/src/psaux/t1decode.c
index c2b3729b53..fa1745d9e0 100644
--- a/thirdparty/freetype/src/psaux/t1decode.c
+++ b/thirdparty/freetype/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
*
* PostScript Type 1 decoding routines (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -367,6 +367,12 @@
FT_GlyphLoader_Prepare( decoder->builder.loader ); /* prepare loader */
+ /* save the left bearing and width of the SEAC */
+ /* glyph as they will be erased by the next load */
+
+ left_bearing = decoder->builder.left_bearing;
+ advance = decoder->builder.advance;
+
/* the seac operator must not be nested */
decoder->seac = TRUE;
error = t1_decoder_parse_glyph( decoder, (FT_UInt)bchar_index );
@@ -374,11 +380,14 @@
if ( error )
goto Exit;
- /* save the left bearing and width of the base character */
- /* as they will be erased by the next load. */
+ /* If the SEAC glyph doesn't have a (H)SBW of its */
+ /* own use the values from the base glyph. */
- left_bearing = decoder->builder.left_bearing;
- advance = decoder->builder.advance;
+ if ( decoder->builder.parse_state != T1_Parse_Have_Width )
+ {
+ left_bearing = decoder->builder.left_bearing;
+ advance = decoder->builder.advance;
+ }
decoder->builder.left_bearing.x = 0;
decoder->builder.left_bearing.y = 0;
@@ -396,8 +405,8 @@
if ( error )
goto Exit;
- /* restore the left side bearing and */
- /* advance width of the base character */
+ /* restore the left side bearing and advance width */
+ /* of the SEAC glyph or base character (saved above) */
decoder->builder.left_bearing = left_bearing;
decoder->builder.advance = advance;
@@ -650,10 +659,8 @@
if ( value > 32000 || value < -32000 )
{
if ( large_int )
- {
FT_ERROR(( "t1_decoder_parse_charstrings:"
" no `div' after large integer\n" ));
- }
else
large_int = TRUE;
}
@@ -1690,6 +1697,7 @@
FT_Byte* ip;
FT_Byte* limit;
T1_Builder builder = &decoder->builder;
+ FT_Bool large_int;
#ifdef FT_DEBUG_LEVEL_TRACE
FT_Bool bol = TRUE;
@@ -1707,6 +1715,8 @@
limit = zone->limit = charstring_base + charstring_len;
ip = zone->cursor = zone->base;
+ large_int = FALSE;
+
/* now, execute loop */
while ( ip < limit )
{
@@ -1767,6 +1777,9 @@
case 7:
op = op_sbw;
break;
+ case 12:
+ op = op_div;
+ break;
default:
goto No_Width;
@@ -1796,13 +1809,19 @@
/* anyway. */
if ( value > 32000 || value < -32000 )
{
- FT_ERROR(( "t1_decoder_parse_metrics:"
- " large integer found for width\n" ));
- goto Syntax_Error;
+ if ( large_int )
+ {
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " no `div' after large integer\n" ));
+ goto Syntax_Error;
+ }
+ else
+ large_int = TRUE;
}
else
{
- value = (FT_Int32)( (FT_UInt32)value << 16 );
+ if ( !large_int )
+ value = (FT_Int32)( (FT_UInt32)value << 16 );
}
break;
@@ -1827,7 +1846,8 @@
value = -( ( ( ip[-2] - 251 ) * 256 ) + ip[-1] + 108 );
}
- value = (FT_Int32)( (FT_UInt32)value << 16 );
+ if ( !large_int )
+ value = (FT_Int32)( (FT_UInt32)value << 16 );
}
else
{
@@ -1837,6 +1857,13 @@
}
}
+ if ( large_int && !( op == op_none || op == op_div ) )
+ {
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " no `div' after large integer\n" ));
+ goto Syntax_Error;
+ }
+
/**********************************************************************
*
* Push value on stack, or process operator
@@ -1851,6 +1878,9 @@
}
#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( large_int )
+ FT_TRACE4(( " %d", value ));
+ else
FT_TRACE4(( " %d", value / 65536 ));
#endif
@@ -1869,11 +1899,14 @@
#ifdef FT_DEBUG_LEVEL_TRACE
- if ( top - decoder->stack != num_args )
- FT_TRACE0(( "t1_decoder_parse_metrics:"
- " too much operands on the stack"
- " (seen %d, expected %d)\n",
- top - decoder->stack, num_args ));
+ if ( op != op_div )
+ {
+ if ( top - decoder->stack != num_args )
+ FT_TRACE0(( "t1_decoder_parse_metrics:"
+ " too much operands on the stack"
+ " (seen %d, expected %d)\n",
+ top - decoder->stack, num_args ));
+ }
#endif /* FT_DEBUG_LEVEL_TRACE */
@@ -1917,12 +1950,26 @@
FT_TRACE4(( "\n" ));
return FT_Err_Ok;
+ case op_div:
+ FT_TRACE4(( " div" ));
+
+ /* if `large_int' is set, we divide unscaled numbers; */
+ /* otherwise, we divide numbers in 16.16 format -- */
+ /* in both cases, it is the same operation */
+ *top = FT_DivFix( top[0], top[1] );
+ top++;
+
+ large_int = FALSE;
+ break;
+
default:
FT_ERROR(( "t1_decoder_parse_metrics:"
" unhandled opcode %d\n", op ));
goto Syntax_Error;
}
+ decoder->top = top;
+
} /* general operator processing */
} /* while ip < limit */
diff --git a/thirdparty/freetype/src/psaux/t1decode.h b/thirdparty/freetype/src/psaux/t1decode.h
index 1b5d6263d3..231947e852 100644
--- a/thirdparty/freetype/src/psaux/t1decode.h
+++ b/thirdparty/freetype/src/psaux/t1decode.h
@@ -4,7 +4,7 @@
*
* PostScript Type 1 decoding routines (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/module.mk b/thirdparty/freetype/src/pshinter/module.mk
index 0a12a260e1..b440d2e76a 100644
--- a/thirdparty/freetype/src/pshinter/module.mk
+++ b/thirdparty/freetype/src/pshinter/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/pshinter/pshalgo.c b/thirdparty/freetype/src/pshinter/pshalgo.c
index 0c5ae62699..57dfa3da96 100644
--- a/thirdparty/freetype/src/pshinter/pshalgo.c
+++ b/thirdparty/freetype/src/pshinter/pshalgo.c
@@ -4,7 +4,7 @@
*
* PostScript hinting algorithm (body).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used
diff --git a/thirdparty/freetype/src/pshinter/pshalgo.h b/thirdparty/freetype/src/pshinter/pshalgo.h
index 6859e95cd2..5367a5d164 100644
--- a/thirdparty/freetype/src/pshinter/pshalgo.h
+++ b/thirdparty/freetype/src/pshinter/pshalgo.h
@@ -4,7 +4,7 @@
*
* PostScript hinting algorithm (specification).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/pshglob.c b/thirdparty/freetype/src/pshinter/pshglob.c
index b021e6e42a..d9f835f99e 100644
--- a/thirdparty/freetype/src/pshinter/pshglob.c
+++ b/thirdparty/freetype/src/pshinter/pshglob.c
@@ -5,7 +5,7 @@
* PostScript hinter global hinting management (body).
* Inspired by the new auto-hinter module.
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used
diff --git a/thirdparty/freetype/src/pshinter/pshglob.h b/thirdparty/freetype/src/pshinter/pshglob.h
index 0049d4c0bc..cd2f3122f7 100644
--- a/thirdparty/freetype/src/pshinter/pshglob.h
+++ b/thirdparty/freetype/src/pshinter/pshglob.h
@@ -4,7 +4,7 @@
*
* PostScript hinter global hinting management.
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/pshinter.c b/thirdparty/freetype/src/pshinter/pshinter.c
index 16c3a0a117..6009db5187 100644
--- a/thirdparty/freetype/src/pshinter/pshinter.c
+++ b/thirdparty/freetype/src/pshinter/pshinter.c
@@ -4,7 +4,7 @@
*
* FreeType PostScript Hinting module
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/pshmod.c b/thirdparty/freetype/src/pshinter/pshmod.c
index 2d36ea2a6a..686859b3ed 100644
--- a/thirdparty/freetype/src/pshinter/pshmod.c
+++ b/thirdparty/freetype/src/pshinter/pshmod.c
@@ -4,7 +4,7 @@
*
* FreeType PostScript hinter module implementation (body).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/pshmod.h b/thirdparty/freetype/src/pshinter/pshmod.h
index ea8771308a..c44112e9d4 100644
--- a/thirdparty/freetype/src/pshinter/pshmod.h
+++ b/thirdparty/freetype/src/pshinter/pshmod.h
@@ -4,7 +4,7 @@
*
* PostScript hinter module interface (specification).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/pshnterr.h b/thirdparty/freetype/src/pshinter/pshnterr.h
index fb9dbca2b1..c4e9f42d2c 100644
--- a/thirdparty/freetype/src/pshinter/pshnterr.h
+++ b/thirdparty/freetype/src/pshinter/pshnterr.h
@@ -4,7 +4,7 @@
*
* PS Hinter error codes (specification only).
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/pshrec.c b/thirdparty/freetype/src/pshinter/pshrec.c
index 9dd09efe4c..a81c6f7123 100644
--- a/thirdparty/freetype/src/pshinter/pshrec.c
+++ b/thirdparty/freetype/src/pshinter/pshrec.c
@@ -4,7 +4,7 @@
*
* FreeType PostScript hints recorder (body).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/pshrec.h b/thirdparty/freetype/src/pshinter/pshrec.h
index 02cc2102ec..a8bc5aeecb 100644
--- a/thirdparty/freetype/src/pshinter/pshrec.h
+++ b/thirdparty/freetype/src/pshinter/pshrec.h
@@ -4,7 +4,7 @@
*
* Postscript (Type1/Type2) hints recorder (specification).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/pshinter/rules.mk b/thirdparty/freetype/src/pshinter/rules.mk
index 58227d10f2..c845c255cd 100644
--- a/thirdparty/freetype/src/pshinter/rules.mk
+++ b/thirdparty/freetype/src/pshinter/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2001-2019 by
+# Copyright (C) 2001-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/psnames/module.mk b/thirdparty/freetype/src/psnames/module.mk
index 0806a318a7..675bb37131 100644
--- a/thirdparty/freetype/src/psnames/module.mk
+++ b/thirdparty/freetype/src/psnames/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/psnames/psmodule.c b/thirdparty/freetype/src/psnames/psmodule.c
index 0ec440e67b..bb3ff07022 100644
--- a/thirdparty/freetype/src/psnames/psmodule.c
+++ b/thirdparty/freetype/src/psnames/psmodule.c
@@ -4,7 +4,7 @@
*
* psnames module implementation (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psnames/psmodule.h b/thirdparty/freetype/src/psnames/psmodule.h
index 0df9a7d889..955f699f3a 100644
--- a/thirdparty/freetype/src/psnames/psmodule.h
+++ b/thirdparty/freetype/src/psnames/psmodule.h
@@ -4,7 +4,7 @@
*
* High-level psnames module interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psnames/psnamerr.h b/thirdparty/freetype/src/psnames/psnamerr.h
index 67ab1765d3..fb9058e61a 100644
--- a/thirdparty/freetype/src/psnames/psnamerr.h
+++ b/thirdparty/freetype/src/psnames/psnamerr.h
@@ -4,7 +4,7 @@
*
* PS names module error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psnames/psnames.c b/thirdparty/freetype/src/psnames/psnames.c
index 4722f98831..5ac3897d25 100644
--- a/thirdparty/freetype/src/psnames/psnames.c
+++ b/thirdparty/freetype/src/psnames/psnames.c
@@ -4,7 +4,7 @@
*
* FreeType psnames module component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psnames/pstables.h b/thirdparty/freetype/src/psnames/pstables.h
index c0139bbc60..c215f16ffc 100644
--- a/thirdparty/freetype/src/psnames/pstables.h
+++ b/thirdparty/freetype/src/psnames/pstables.h
@@ -4,7 +4,7 @@
*
* PostScript glyph names.
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/psnames/rules.mk b/thirdparty/freetype/src/psnames/rules.mk
index dcc203e391..14cdda3ad1 100644
--- a/thirdparty/freetype/src/psnames/rules.mk
+++ b/thirdparty/freetype/src/psnames/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/raster/ftmisc.h b/thirdparty/freetype/src/raster/ftmisc.h
index a246569e3b..6efe4a9a5a 100644
--- a/thirdparty/freetype/src/raster/ftmisc.h
+++ b/thirdparty/freetype/src/raster/ftmisc.h
@@ -5,7 +5,7 @@
* Miscellaneous macros for stand-alone rasterizer (specification
* only).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used
diff --git a/thirdparty/freetype/src/raster/ftraster.c b/thirdparty/freetype/src/raster/ftraster.c
index 023b6c1eff..35655a6346 100644
--- a/thirdparty/freetype/src/raster/ftraster.c
+++ b/thirdparty/freetype/src/raster/ftraster.c
@@ -4,7 +4,7 @@
*
* The FreeType glyph rasterizer (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/raster/ftraster.h b/thirdparty/freetype/src/raster/ftraster.h
index 50d34201a1..833d30f234 100644
--- a/thirdparty/freetype/src/raster/ftraster.h
+++ b/thirdparty/freetype/src/raster/ftraster.h
@@ -4,7 +4,7 @@
*
* The FreeType glyph rasterizer (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used
diff --git a/thirdparty/freetype/src/raster/ftrend1.c b/thirdparty/freetype/src/raster/ftrend1.c
index 62c727182a..944279a8d1 100644
--- a/thirdparty/freetype/src/raster/ftrend1.c
+++ b/thirdparty/freetype/src/raster/ftrend1.c
@@ -4,7 +4,7 @@
*
* The FreeType glyph rasterizer interface (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/raster/ftrend1.h b/thirdparty/freetype/src/raster/ftrend1.h
index 82ecac686c..dc972b1bc2 100644
--- a/thirdparty/freetype/src/raster/ftrend1.h
+++ b/thirdparty/freetype/src/raster/ftrend1.h
@@ -4,7 +4,7 @@
*
* The FreeType glyph rasterizer interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/raster/module.mk b/thirdparty/freetype/src/raster/module.mk
index 0a6d4b09d9..3600732b16 100644
--- a/thirdparty/freetype/src/raster/module.mk
+++ b/thirdparty/freetype/src/raster/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/raster/raster.c b/thirdparty/freetype/src/raster/raster.c
index e3ac9e566a..08431c8509 100644
--- a/thirdparty/freetype/src/raster/raster.c
+++ b/thirdparty/freetype/src/raster/raster.c
@@ -4,7 +4,7 @@
*
* FreeType monochrome rasterer module component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/raster/rasterrs.h b/thirdparty/freetype/src/raster/rasterrs.h
index 7266407365..379e1d3e89 100644
--- a/thirdparty/freetype/src/raster/rasterrs.h
+++ b/thirdparty/freetype/src/raster/rasterrs.h
@@ -4,7 +4,7 @@
*
* monochrome renderer error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/raster/rules.mk b/thirdparty/freetype/src/raster/rules.mk
index 7664671e80..3e949d7741 100644
--- a/thirdparty/freetype/src/raster/rules.mk
+++ b/thirdparty/freetype/src/raster/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/sfnt/module.mk b/thirdparty/freetype/src/sfnt/module.mk
index 8c3b44fec7..0f459d8421 100644
--- a/thirdparty/freetype/src/sfnt/module.mk
+++ b/thirdparty/freetype/src/sfnt/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/sfnt/pngshim.c b/thirdparty/freetype/src/sfnt/pngshim.c
index ca85d9751f..523b30a745 100644
--- a/thirdparty/freetype/src/sfnt/pngshim.c
+++ b/thirdparty/freetype/src/sfnt/pngshim.c
@@ -4,7 +4,7 @@
*
* PNG Bitmap glyph support.
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* Google, Inc.
* Written by Stuart Gill and Behdad Esfahbod.
*
@@ -68,6 +68,7 @@
( ( __clang_major__ >= 4 ) || \
( ( __clang_major__ == 3 ) && ( __clang_minor__ >= 2 ) ) ) ) ) && \
defined( __OPTIMIZE__ ) && \
+ defined( __SSE__ ) && \
__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#ifdef __clang__
diff --git a/thirdparty/freetype/src/sfnt/pngshim.h b/thirdparty/freetype/src/sfnt/pngshim.h
index 06c6f6b20e..d2c9e2b9b5 100644
--- a/thirdparty/freetype/src/sfnt/pngshim.h
+++ b/thirdparty/freetype/src/sfnt/pngshim.h
@@ -4,7 +4,7 @@
*
* PNG Bitmap glyph support.
*
- * Copyright (C) 2013-2019 by
+ * Copyright (C) 2013-2020 by
* Google, Inc.
* Written by Stuart Gill and Behdad Esfahbod.
*
diff --git a/thirdparty/freetype/src/sfnt/rules.mk b/thirdparty/freetype/src/sfnt/rules.mk
index ee3314eac3..f56ef060ed 100644
--- a/thirdparty/freetype/src/sfnt/rules.mk
+++ b/thirdparty/freetype/src/sfnt/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -28,19 +28,21 @@ SFNT_COMPILE := $(CC) $(ANSIFLAGS) \
# SFNT driver sources (i.e., C files)
#
-SFNT_DRV_SRC := $(SFNT_DIR)/pngshim.c \
- $(SFNT_DIR)/sfdriver.c \
- $(SFNT_DIR)/sfobjs.c \
- $(SFNT_DIR)/sfwoff.c \
- $(SFNT_DIR)/ttbdf.c \
- $(SFNT_DIR)/ttcmap.c \
- $(SFNT_DIR)/ttcolr.c \
- $(SFNT_DIR)/ttcpal.c \
- $(SFNT_DIR)/ttkern.c \
- $(SFNT_DIR)/ttload.c \
- $(SFNT_DIR)/ttmtx.c \
- $(SFNT_DIR)/ttpost.c \
- $(SFNT_DIR)/ttsbit.c
+SFNT_DRV_SRC := $(SFNT_DIR)/pngshim.c \
+ $(SFNT_DIR)/sfdriver.c \
+ $(SFNT_DIR)/sfobjs.c \
+ $(SFNT_DIR)/sfwoff.c \
+ $(SFNT_DIR)/sfwoff2.c \
+ $(SFNT_DIR)/ttbdf.c \
+ $(SFNT_DIR)/ttcmap.c \
+ $(SFNT_DIR)/ttcolr.c \
+ $(SFNT_DIR)/ttcpal.c \
+ $(SFNT_DIR)/ttkern.c \
+ $(SFNT_DIR)/ttload.c \
+ $(SFNT_DIR)/ttmtx.c \
+ $(SFNT_DIR)/ttpost.c \
+ $(SFNT_DIR)/ttsbit.c \
+ $(SFNT_DIR)/woff2tags.c
# SFNT driver headers
#
diff --git a/thirdparty/freetype/src/sfnt/sfdriver.c b/thirdparty/freetype/src/sfnt/sfdriver.c
index 2611685284..6ca4f3c268 100644
--- a/thirdparty/freetype/src/sfnt/sfdriver.c
+++ b/thirdparty/freetype/src/sfnt/sfdriver.c
@@ -4,7 +4,7 @@
*
* High-level SFNT driver interface (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/sfdriver.h b/thirdparty/freetype/src/sfnt/sfdriver.h
index 8c174634b3..d108ee2000 100644
--- a/thirdparty/freetype/src/sfnt/sfdriver.h
+++ b/thirdparty/freetype/src/sfnt/sfdriver.h
@@ -4,7 +4,7 @@
*
* High-level SFNT driver interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/sferrors.h b/thirdparty/freetype/src/sfnt/sferrors.h
index 43e148d295..fbfca0e525 100644
--- a/thirdparty/freetype/src/sfnt/sferrors.h
+++ b/thirdparty/freetype/src/sfnt/sferrors.h
@@ -4,7 +4,7 @@
*
* SFNT error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/sfnt.c b/thirdparty/freetype/src/sfnt/sfnt.c
index b4faf34a3a..9db7935ae4 100644
--- a/thirdparty/freetype/src/sfnt/sfnt.c
+++ b/thirdparty/freetype/src/sfnt/sfnt.c
@@ -4,7 +4,7 @@
*
* Single object library component.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -23,6 +23,7 @@
#include "sfdriver.c"
#include "sfobjs.c"
#include "sfwoff.c"
+#include "sfwoff2.c"
#include "ttbdf.c"
#include "ttcmap.c"
#include "ttcolr.c"
@@ -33,6 +34,7 @@
#include "ttmtx.c"
#include "ttpost.c"
#include "ttsbit.c"
+#include "woff2tags.c"
/* END */
diff --git a/thirdparty/freetype/src/sfnt/sfobjs.c b/thirdparty/freetype/src/sfnt/sfobjs.c
index 6edf3ae1de..2c66a9b648 100644
--- a/thirdparty/freetype/src/sfnt/sfobjs.c
+++ b/thirdparty/freetype/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
*
* SFNT object management (base).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -22,6 +22,7 @@
#include "ttcmap.h"
#include "ttkern.h"
#include "sfwoff.h"
+#include "sfwoff2.h"
#include FT_INTERNAL_SFNT_H
#include FT_INTERNAL_DEBUG_H
#include FT_TRUETYPE_IDS_H
@@ -341,7 +342,9 @@
/* synthesized into a TTC with one offset table. */
static FT_Error
sfnt_open_font( FT_Stream stream,
- TT_Face face )
+ TT_Face face,
+ FT_Int* face_instance_index,
+ FT_Long* woff2_num_faces )
{
FT_Memory memory = stream->memory;
FT_Error error;
@@ -385,6 +388,25 @@
goto retry;
}
+ if ( tag == TTAG_wOF2 )
+ {
+ FT_TRACE2(( "sfnt_open_font: file is a WOFF2; synthesizing SFNT\n" ));
+
+ if ( FT_STREAM_SEEK( offset ) )
+ return error;
+
+ error = woff2_open_font( stream,
+ face,
+ face_instance_index,
+ woff2_num_faces );
+ if ( error )
+ return error;
+
+ /* Swap out stream and retry! */
+ stream = face->root.stream;
+ goto retry;
+ }
+
if ( tag != 0x00010000UL &&
tag != TTAG_ttcf &&
tag != TTAG_OTTO &&
@@ -461,9 +483,10 @@
FT_Parameter* params )
{
FT_Error error;
- FT_Library library = face->root.driver->root.library;
+ FT_Library library = face->root.driver->root.library;
SFNT_Service sfnt;
FT_Int face_index;
+ FT_Long woff2_num_faces = 0;
/* for now, parameters are unused */
@@ -514,7 +537,10 @@
FT_TRACE2(( "SFNT driver\n" ));
- error = sfnt_open_font( stream, face );
+ error = sfnt_open_font( stream,
+ face,
+ &face_instance_index,
+ &woff2_num_faces );
if ( error )
return error;
@@ -689,6 +715,10 @@
face->root.num_faces = face->ttc_header.count;
face->root.face_index = face_instance_index;
+ /* `num_faces' for a WOFF2 needs to be handled separately. */
+ if ( woff2_num_faces )
+ face->root.num_faces = woff2_num_faces;
+
return error;
}
diff --git a/thirdparty/freetype/src/sfnt/sfobjs.h b/thirdparty/freetype/src/sfnt/sfobjs.h
index 3fbf2dd6bd..d8438a4834 100644
--- a/thirdparty/freetype/src/sfnt/sfobjs.h
+++ b/thirdparty/freetype/src/sfnt/sfobjs.h
@@ -4,7 +4,7 @@
*
* SFNT object management (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/sfwoff.c b/thirdparty/freetype/src/sfnt/sfwoff.c
index ca4821a20a..d1e330f675 100644
--- a/thirdparty/freetype/src/sfnt/sfwoff.c
+++ b/thirdparty/freetype/src/sfnt/sfwoff.c
@@ -4,7 +4,7 @@
*
* WOFF format management (base).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -371,18 +371,18 @@
sfnt + table->OrigOffset, &output_len,
stream->cursor, table->CompLength );
if ( error )
- goto Exit;
+ goto Exit1;
if ( output_len != table->OrigLength )
{
FT_ERROR(( "woff_font_open: compressed table length mismatch\n" ));
error = FT_THROW( Invalid_Table );
- goto Exit;
+ goto Exit1;
}
#else /* !FT_CONFIG_OPTION_USE_ZLIB */
error = FT_THROW( Unimplemented_Feature );
- goto Exit;
+ goto Exit1;
#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
}
@@ -424,6 +424,10 @@
}
return error;
+
+ Exit1:
+ FT_FRAME_EXIT();
+ goto Exit;
}
diff --git a/thirdparty/freetype/src/sfnt/sfwoff.h b/thirdparty/freetype/src/sfnt/sfwoff.h
index 15495c32a2..c1789d33d5 100644
--- a/thirdparty/freetype/src/sfnt/sfwoff.h
+++ b/thirdparty/freetype/src/sfnt/sfwoff.h
@@ -4,7 +4,7 @@
*
* WOFFF format management (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/sfwoff2.c b/thirdparty/freetype/src/sfnt/sfwoff2.c
new file mode 100644
index 0000000000..1b99e7d28c
--- /dev/null
+++ b/thirdparty/freetype/src/sfnt/sfwoff2.c
@@ -0,0 +1,2328 @@
+/****************************************************************************
+ *
+ * sfwoff2.c
+ *
+ * WOFF2 format management (base).
+ *
+ * Copyright (C) 2019-2020 by
+ * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
+
+#include <ft2build.h>
+#include "sfwoff2.h"
+#include "woff2tags.h"
+#include FT_TRUETYPE_TAGS_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_STREAM_H
+
+
+#ifdef FT_CONFIG_OPTION_USE_BROTLI
+
+#include <brotli/decode.h>
+
+#endif
+
+
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
+#undef FT_COMPONENT
+#define FT_COMPONENT sfwoff2
+
+
+#define READ_255USHORT( var ) FT_SET_ERROR( Read255UShort( stream, &var ) )
+
+#define READ_BASE128( var ) FT_SET_ERROR( ReadBase128( stream, &var ) )
+
+#define ROUND4( var ) ( ( var + 3 ) & ~3 )
+
+#define WRITE_USHORT( p, v ) \
+ do \
+ { \
+ *(p)++ = (FT_Byte)( (v) >> 8 ); \
+ *(p)++ = (FT_Byte)( (v) >> 0 ); \
+ \
+ } while ( 0 )
+
+#define WRITE_ULONG( p, v ) \
+ do \
+ { \
+ *(p)++ = (FT_Byte)( (v) >> 24 ); \
+ *(p)++ = (FT_Byte)( (v) >> 16 ); \
+ *(p)++ = (FT_Byte)( (v) >> 8 ); \
+ *(p)++ = (FT_Byte)( (v) >> 0 ); \
+ \
+ } while ( 0 )
+
+#define WRITE_SHORT( p, v ) \
+ do \
+ { \
+ *(p)++ = ( (v) >> 8 ); \
+ *(p)++ = ( (v) >> 0 ); \
+ \
+ } while ( 0 )
+
+#define WRITE_SFNT_BUF( buf, s ) \
+ write_buf( &sfnt, sfnt_size, &dest_offset, buf, s, memory )
+
+#define WRITE_SFNT_BUF_AT( offset, buf, s ) \
+ write_buf( &sfnt, sfnt_size, &offset, buf, s, memory )
+
+#define N_CONTOUR_STREAM 0
+#define N_POINTS_STREAM 1
+#define FLAG_STREAM 2
+#define GLYPH_STREAM 3
+#define COMPOSITE_STREAM 4
+#define BBOX_STREAM 5
+#define INSTRUCTION_STREAM 6
+
+
+ static void
+ stream_close( FT_Stream stream )
+ {
+ FT_Memory memory = stream->memory;
+
+
+ FT_FREE( stream->base );
+
+ stream->size = 0;
+ stream->base = NULL;
+ stream->close = NULL;
+ }
+
+
+ FT_CALLBACK_DEF( int )
+ compare_tags( const void* a,
+ const void* b )
+ {
+ WOFF2_Table table1 = *(WOFF2_Table*)a;
+ WOFF2_Table table2 = *(WOFF2_Table*)b;
+
+ FT_ULong tag1 = table1->Tag;
+ FT_ULong tag2 = table2->Tag;
+
+
+ if ( tag1 > tag2 )
+ return 1;
+ else if ( tag1 < tag2 )
+ return -1;
+ else
+ return 0;
+ }
+
+
+ static FT_Error
+ Read255UShort( FT_Stream stream,
+ FT_UShort* value )
+ {
+ static const FT_Int oneMoreByteCode1 = 255;
+ static const FT_Int oneMoreByteCode2 = 254;
+ static const FT_Int wordCode = 253;
+ static const FT_Int lowestUCode = 253;
+
+ FT_Error error = FT_Err_Ok;
+ FT_Byte code;
+ FT_Byte result_byte = 0;
+ FT_UShort result_short = 0;
+
+
+ if ( FT_READ_BYTE( code ) )
+ return error;
+ if ( code == wordCode )
+ {
+ /* Read next two bytes and store `FT_UShort' value. */
+ if ( FT_READ_USHORT( result_short ) )
+ return error;
+ *value = result_short;
+ return FT_Err_Ok;
+ }
+ else if ( code == oneMoreByteCode1 )
+ {
+ if ( FT_READ_BYTE( result_byte ) )
+ return error;
+ *value = result_byte + lowestUCode;
+ return FT_Err_Ok;
+ }
+ else if ( code == oneMoreByteCode2 )
+ {
+ if ( FT_READ_BYTE( result_byte ) )
+ return error;
+ *value = result_byte + lowestUCode * 2;
+ return FT_Err_Ok;
+ }
+ else
+ {
+ *value = code;
+ return FT_Err_Ok;
+ }
+ }
+
+
+ static FT_Error
+ ReadBase128( FT_Stream stream,
+ FT_ULong* value )
+ {
+ FT_ULong result = 0;
+ FT_Int i;
+ FT_Byte code;
+ FT_Error error = FT_Err_Ok;
+
+
+ for ( i = 0; i < 5; ++i )
+ {
+ code = 0;
+ if ( FT_READ_BYTE( code ) )
+ return error;
+
+ /* Leading zeros are invalid. */
+ if ( i == 0 && code == 0x80 )
+ return FT_THROW( Invalid_Table );
+
+ /* If any of top seven bits are set then we're about to overflow. */
+ if ( result & 0xfe000000 )
+ return FT_THROW( Invalid_Table );
+
+ result = ( result << 7 ) | ( code & 0x7f );
+
+ /* Spin until most significant bit of data byte is false. */
+ if ( ( code & 0x80 ) == 0 )
+ {
+ *value = result;
+ return FT_Err_Ok;
+ }
+ }
+
+ /* Make sure not to exceed the size bound. */
+ return FT_THROW( Invalid_Table );
+ }
+
+
+ /* Extend memory of `dst_bytes' buffer and copy data from `src'. */
+ static FT_Error
+ write_buf( FT_Byte** dst_bytes,
+ FT_ULong* dst_size,
+ FT_ULong* offset,
+ FT_Byte* src,
+ FT_ULong size,
+ FT_Memory memory )
+ {
+ FT_Error error = FT_Err_Ok;
+ /* We are reallocating memory for `dst', so its pointer may change. */
+ FT_Byte* dst = *dst_bytes;
+
+
+ /* Check whether we are within limits. */
+ if ( ( *offset + size ) > WOFF2_DEFAULT_MAX_SIZE )
+ return FT_THROW( Array_Too_Large );
+
+ /* Reallocate `dst'. */
+ if ( ( *offset + size ) > *dst_size )
+ {
+ FT_TRACE6(( "Reallocating %lu to %lu.\n",
+ *dst_size, (*offset + size) ));
+ if ( FT_REALLOC( dst,
+ (FT_ULong)( *dst_size ),
+ (FT_ULong)( *offset + size ) ) )
+ goto Exit;
+
+ *dst_size = *offset + size;
+ }
+
+ /* Copy data. */
+ ft_memcpy( dst + *offset, src, size );
+
+ *offset += size;
+ /* Set pointer of `dst' to its correct value. */
+ *dst_bytes = dst;
+
+ Exit:
+ return error;
+ }
+
+
+ /* Pad buffer to closest multiple of 4. */
+ static FT_Error
+ pad4( FT_Byte** sfnt_bytes,
+ FT_ULong* sfnt_size,
+ FT_ULong* out_offset,
+ FT_Memory memory )
+ {
+ FT_Byte* sfnt = *sfnt_bytes;
+ FT_ULong dest_offset = *out_offset;
+
+ FT_Byte zeroes[] = { 0, 0, 0 };
+ FT_ULong pad_bytes;
+
+
+ if ( dest_offset + 3 < dest_offset )
+ return FT_THROW( Invalid_Table );
+
+ pad_bytes = ROUND4( dest_offset ) - dest_offset;
+ if ( pad_bytes > 0 )
+ {
+ if ( WRITE_SFNT_BUF( &zeroes[0], pad_bytes ) )
+ return FT_THROW( Invalid_Table );
+ }
+
+ *sfnt_bytes = sfnt;
+ *out_offset = dest_offset;
+ return FT_Err_Ok;
+ }
+
+
+ /* Calculate table checksum of `buf'. */
+ static FT_Long
+ compute_ULong_sum( FT_Byte* buf,
+ FT_ULong size )
+ {
+ FT_ULong checksum = 0;
+ FT_ULong aligned_size = size & ~3;
+ FT_ULong i;
+ FT_ULong v;
+
+
+ for ( i = 0; i < aligned_size; i += 4 )
+ checksum += ( (FT_ULong)buf[i ] << 24 ) |
+ ( (FT_ULong)buf[i + 1] << 16 ) |
+ ( (FT_ULong)buf[i + 2] << 8 ) |
+ ( (FT_ULong)buf[i + 3] << 0 );
+
+ /* If size is not aligned to 4, treat as if it is padded with 0s. */
+ if ( size != aligned_size )
+ {
+ v = 0;
+ for ( i = aligned_size ; i < size; ++i )
+ v |= (FT_ULong)buf[i] << ( 24 - 8 * ( i & 3 ) );
+ checksum += v;
+ }
+
+ return checksum;
+ }
+
+
+ static FT_Error
+ woff2_decompress( FT_Byte* dst,
+ FT_ULong dst_size,
+ const FT_Byte* src,
+ FT_ULong src_size )
+ {
+#ifdef FT_CONFIG_OPTION_USE_BROTLI
+
+ FT_ULong uncompressed_size = dst_size;
+ BrotliDecoderResult result;
+
+
+ result = BrotliDecoderDecompress( src_size,
+ src,
+ &uncompressed_size,
+ dst );
+
+ if ( result != BROTLI_DECODER_RESULT_SUCCESS ||
+ uncompressed_size != dst_size )
+ {
+ FT_ERROR(( "woff2_decompress: Stream length mismatch.\n" ));
+ return FT_THROW( Invalid_Table );
+ }
+
+ FT_TRACE2(( "woff2_decompress: Brotli stream decompressed.\n" ));
+ return FT_Err_Ok;
+
+#else /* !FT_CONFIG_OPTION_USE_BROTLI */
+
+ FT_ERROR(( "woff2_decompress: Brotli support not available.\n" ));
+ return FT_THROW( Unimplemented_Feature );
+
+#endif /* !FT_CONFIG_OPTION_USE_BROTLI */
+ }
+
+
+ static WOFF2_Table
+ find_table( WOFF2_Table* tables,
+ FT_UShort num_tables,
+ FT_ULong tag )
+ {
+ FT_Int i;
+
+
+ for ( i = 0; i < num_tables; i++ )
+ {
+ if ( tables[i]->Tag == tag )
+ return tables[i];
+ }
+ return NULL;
+ }
+
+
+ /* Read `numberOfHMetrics' field from `hhea' table. */
+ static FT_Error
+ read_num_hmetrics( FT_Stream stream,
+ FT_UShort* num_hmetrics )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_UShort num_metrics;
+
+
+ if ( FT_STREAM_SKIP( 34 ) )
+ return FT_THROW( Invalid_Table );
+
+ if ( FT_READ_USHORT( num_metrics ) )
+ return FT_THROW( Invalid_Table );
+
+ *num_hmetrics = num_metrics;
+
+ return error;
+ }
+
+
+ /* An auxiliary function for overflow-safe addition. */
+ static FT_Int
+ with_sign( FT_Byte flag,
+ FT_Int base_val )
+ {
+ /* Precondition: 0 <= base_val < 65536 (to avoid overflow). */
+ return ( flag & 1 ) ? base_val : -base_val;
+ }
+
+
+ /* An auxiliary function for overflow-safe addition. */
+ static FT_Int
+ safe_int_addition( FT_Int a,
+ FT_Int b,
+ FT_Int* result )
+ {
+ if ( ( ( a > 0 ) && ( b > FT_INT_MAX - a ) ) ||
+ ( ( a < 0 ) && ( b < FT_INT_MIN - a ) ) )
+ return FT_THROW( Invalid_Table );
+
+ *result = a + b;
+ return FT_Err_Ok;
+ }
+
+
+ /*
+ * Decode variable-length (flag, xCoordinate, yCoordinate) triplet for a
+ * simple glyph. See
+ *
+ * https://www.w3.org/TR/WOFF2/#triplet_decoding
+ */
+ static FT_Error
+ triplet_decode( const FT_Byte* flags_in,
+ const FT_Byte* in,
+ FT_ULong in_size,
+ FT_ULong n_points,
+ WOFF2_Point result,
+ FT_ULong* in_bytes_used )
+ {
+ FT_Int x = 0;
+ FT_Int y = 0;
+ FT_Int dx;
+ FT_Int dy;
+ FT_Int b0, b1, b2;
+
+ FT_ULong triplet_index = 0;
+ FT_ULong data_bytes;
+
+ FT_UInt i;
+
+
+ if ( n_points > in_size )
+ return FT_THROW( Invalid_Table );
+
+ for ( i = 0; i < n_points; ++i )
+ {
+ FT_Byte flag = flags_in[i];
+ FT_Bool on_curve = !( flag >> 7 );
+
+
+ flag &= 0x7f;
+ if ( flag < 84 )
+ data_bytes = 1;
+ else if ( flag < 120 )
+ data_bytes = 2;
+ else if ( flag < 124 )
+ data_bytes = 3;
+ else
+ data_bytes = 4;
+
+ /* Overflow checks */
+ if ( triplet_index + data_bytes > in_size ||
+ triplet_index + data_bytes < triplet_index )
+ return FT_THROW( Invalid_Table );
+
+ if ( flag < 10 )
+ {
+ dx = 0;
+ dy = with_sign( flag,
+ ( ( flag & 14 ) << 7 ) + in[triplet_index] );
+ }
+ else if ( flag < 20 )
+ {
+ dx = with_sign( flag,
+ ( ( ( flag - 10 ) & 14 ) << 7 ) +
+ in[triplet_index] );
+ dy = 0;
+ }
+ else if ( flag < 84 )
+ {
+ b0 = flag - 20;
+ b1 = in[triplet_index];
+ dx = with_sign( flag,
+ 1 + ( b0 & 0x30 ) + ( b1 >> 4 ) );
+ dy = with_sign( flag >> 1,
+ 1 + ( ( b0 & 0x0c ) << 2 ) + ( b1 & 0x0f ) );
+ }
+ else if ( flag < 120 )
+ {
+ b0 = flag - 84;
+ dx = with_sign( flag,
+ 1 + ( ( b0 / 12 ) << 8 ) + in[triplet_index] );
+ dy = with_sign( flag >> 1,
+ 1 + ( ( ( b0 % 12 ) >> 2 ) << 8 ) +
+ in[triplet_index + 1] );
+ }
+ else if ( flag < 124 )
+ {
+ b2 = in[triplet_index + 1];
+ dx = with_sign( flag,
+ ( in[triplet_index] << 4 ) + ( b2 >> 4 ) );
+ dy = with_sign( flag >> 1,
+ ( ( b2 & 0x0f ) << 8 ) + in[triplet_index + 2] );
+ }
+ else
+ {
+ dx = with_sign( flag,
+ ( in[triplet_index] << 8 ) +
+ in[triplet_index + 1] );
+ dy = with_sign( flag >> 1,
+ ( in[triplet_index + 2] << 8 ) +
+ in[triplet_index + 3] );
+ }
+
+ triplet_index += data_bytes;
+
+ if ( safe_int_addition( x, dx, &x ) )
+ return FT_THROW( Invalid_Table );
+
+ if ( safe_int_addition( y, dy, &y ) )
+ return FT_THROW( Invalid_Table );
+
+ result[i].x = x;
+ result[i].y = y;
+ result[i].on_curve = on_curve;
+ }
+
+ *in_bytes_used = triplet_index;
+ return FT_Err_Ok;
+ }
+
+
+ /* Store decoded points in glyph buffer. */
+ static FT_Error
+ store_points( FT_ULong n_points,
+ const WOFF2_Point points,
+ FT_UShort n_contours,
+ FT_UShort instruction_len,
+ FT_Byte* dst,
+ FT_ULong dst_size,
+ FT_ULong* glyph_size )
+ {
+ FT_UInt flag_offset = 10 + ( 2 * n_contours ) + 2 + instruction_len;
+ FT_Int last_flag = -1;
+ FT_Int repeat_count = 0;
+ FT_Int last_x = 0;
+ FT_Int last_y = 0;
+ FT_UInt x_bytes = 0;
+ FT_UInt y_bytes = 0;
+ FT_UInt xy_bytes;
+ FT_UInt i;
+ FT_UInt x_offset;
+ FT_UInt y_offset;
+ FT_Byte* pointer;
+
+
+ for ( i = 0; i < n_points; ++i )
+ {
+ const WOFF2_PointRec point = points[i];
+
+ FT_Int flag = point.on_curve ? GLYF_ON_CURVE : 0;
+ FT_Int dx = point.x - last_x;
+ FT_Int dy = point.y - last_y;
+
+
+ if ( dx == 0 )
+ flag |= GLYF_THIS_X_IS_SAME;
+ else if ( dx > -256 && dx < 256 )
+ {
+ flag |= GLYF_X_SHORT | ( dx > 0 ? GLYF_THIS_X_IS_SAME : 0 );
+ x_bytes += 1;
+ }
+ else
+ x_bytes += 2;
+
+ if ( dy == 0 )
+ flag |= GLYF_THIS_Y_IS_SAME;
+ else if ( dy > -256 && dy < 256 )
+ {
+ flag |= GLYF_Y_SHORT | ( dy > 0 ? GLYF_THIS_Y_IS_SAME : 0 );
+ y_bytes += 1;
+ }
+ else
+ y_bytes += 2;
+
+ if ( flag == last_flag && repeat_count != 255 )
+ {
+ dst[flag_offset - 1] |= GLYF_REPEAT;
+ repeat_count++;
+ }
+ else
+ {
+ if ( repeat_count != 0 )
+ {
+ if ( flag_offset >= dst_size )
+ return FT_THROW( Invalid_Table );
+
+ dst[flag_offset++] = repeat_count;
+ }
+ if ( flag_offset >= dst_size )
+ return FT_THROW( Invalid_Table );
+
+ dst[flag_offset++] = flag;
+ repeat_count = 0;
+ }
+
+ last_x = point.x;
+ last_y = point.y;
+ last_flag = flag;
+ }
+
+ if ( repeat_count != 0 )
+ {
+ if ( flag_offset >= dst_size )
+ return FT_THROW( Invalid_Table );
+
+ dst[flag_offset++] = repeat_count;
+ }
+
+ xy_bytes = x_bytes + y_bytes;
+ if ( xy_bytes < x_bytes ||
+ flag_offset + xy_bytes < flag_offset ||
+ flag_offset + xy_bytes > dst_size )
+ return FT_THROW( Invalid_Table );
+
+ x_offset = flag_offset;
+ y_offset = flag_offset + x_bytes;
+ last_x = 0;
+ last_y = 0;
+
+ for ( i = 0; i < n_points; ++i )
+ {
+ FT_Int dx = points[i].x - last_x;
+ FT_Int dy = points[i].y - last_y;
+
+
+ if ( dx == 0 )
+ ;
+ else if ( dx > -256 && dx < 256 )
+ dst[x_offset++] = FT_ABS( dx );
+ else
+ {
+ pointer = dst + x_offset;
+ WRITE_SHORT( pointer, dx );
+ x_offset += 2;
+ }
+
+ last_x += dx;
+
+ if ( dy == 0 )
+ ;
+ else if ( dy > -256 && dy < 256 )
+ dst[y_offset++] = FT_ABS( dy );
+ else
+ {
+ pointer = dst + y_offset;
+ WRITE_SHORT( pointer, dy );
+ y_offset += 2;
+ }
+
+ last_y += dy;
+ }
+
+ *glyph_size = y_offset;
+ return FT_Err_Ok;
+ }
+
+
+ static void
+ compute_bbox( FT_ULong n_points,
+ const WOFF2_Point points,
+ FT_Byte* dst,
+ FT_UShort* src_x_min )
+ {
+ FT_Int x_min = 0;
+ FT_Int y_min = 0;
+ FT_Int x_max = 0;
+ FT_Int y_max = 0;
+
+ FT_UInt i;
+
+ FT_ULong offset;
+ FT_Byte* pointer;
+
+
+ if ( n_points > 0 )
+ {
+ x_min = points[0].x;
+ y_min = points[0].y;
+ x_max = points[0].x;
+ y_max = points[0].y;
+ }
+
+ for ( i = 1; i < n_points; ++i )
+ {
+ FT_Int x = points[i].x;
+ FT_Int y = points[i].y;
+
+
+ x_min = FT_MIN( x, x_min );
+ y_min = FT_MIN( y, y_min );
+ x_max = FT_MAX( x, x_max );
+ y_max = FT_MAX( y, y_max );
+ }
+
+ /* Write values to `glyf' record. */
+ offset = 2;
+ pointer = dst + offset;
+
+ WRITE_SHORT( pointer, x_min );
+ WRITE_SHORT( pointer, y_min );
+ WRITE_SHORT( pointer, x_max );
+ WRITE_SHORT( pointer, y_max );
+
+ *src_x_min = (FT_UShort)x_min;
+ }
+
+
+ static FT_Error
+ compositeGlyph_size( FT_Stream stream,
+ FT_ULong offset,
+ FT_ULong* size,
+ FT_Bool* have_instructions )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_ULong start_offset = offset;
+ FT_Bool we_have_inst = FALSE;
+ FT_UShort flags = FLAG_MORE_COMPONENTS;
+
+
+ if ( FT_STREAM_SEEK( start_offset ) )
+ goto Exit;
+ while ( flags & FLAG_MORE_COMPONENTS )
+ {
+ FT_ULong arg_size;
+
+
+ if ( FT_READ_USHORT( flags ) )
+ goto Exit;
+ we_have_inst |= ( flags & FLAG_WE_HAVE_INSTRUCTIONS ) != 0;
+ /* glyph index */
+ arg_size = 2;
+ if ( flags & FLAG_ARG_1_AND_2_ARE_WORDS )
+ arg_size += 4;
+ else
+ arg_size += 2;
+
+ if ( flags & FLAG_WE_HAVE_A_SCALE )
+ arg_size += 2;
+ else if ( flags & FLAG_WE_HAVE_AN_X_AND_Y_SCALE )
+ arg_size += 4;
+ else if ( flags & FLAG_WE_HAVE_A_TWO_BY_TWO )
+ arg_size += 8;
+
+ if ( FT_STREAM_SKIP( arg_size ) )
+ goto Exit;
+ }
+
+ *size = FT_STREAM_POS() - start_offset;
+ *have_instructions = we_have_inst;
+
+ Exit:
+ return error;
+ }
+
+
+ /* Store loca values (provided by `reconstruct_glyf') to output stream. */
+ static FT_Error
+ store_loca( FT_ULong* loca_values,
+ FT_ULong loca_values_size,
+ FT_UShort index_format,
+ FT_ULong* checksum,
+ FT_Byte** sfnt_bytes,
+ FT_ULong* sfnt_size,
+ FT_ULong* out_offset,
+ FT_Memory memory )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_Byte* sfnt = *sfnt_bytes;
+ FT_ULong dest_offset = *out_offset;
+
+ FT_Byte* loca_buf = NULL;
+ FT_Byte* dst = NULL;
+
+ FT_UInt i = 0;
+ FT_ULong loca_buf_size;
+
+ const FT_ULong offset_size = index_format ? 4 : 2;
+
+
+ if ( ( loca_values_size << 2 ) >> 2 != loca_values_size )
+ goto Fail;
+
+ loca_buf_size = loca_values_size * offset_size;
+ if ( FT_NEW_ARRAY( loca_buf, loca_buf_size ) )
+ goto Fail;
+
+ dst = loca_buf;
+ for ( i = 0; i < loca_values_size; i++ )
+ {
+ FT_ULong value = loca_values[i];
+
+
+ if ( index_format )
+ WRITE_ULONG( dst, value );
+ else
+ WRITE_USHORT( dst, ( value >> 1 ) );
+ }
+
+ *checksum = compute_ULong_sum( loca_buf, loca_buf_size );
+ /* Write `loca' table to sfnt buffer. */
+ if ( WRITE_SFNT_BUF( loca_buf, loca_buf_size ) )
+ goto Fail;
+
+ /* Set pointer `sfnt_bytes' to its correct value. */
+ *sfnt_bytes = sfnt;
+ *out_offset = dest_offset;
+
+ FT_FREE( loca_buf );
+ return error;
+
+ Fail:
+ if ( !error )
+ error = FT_THROW( Invalid_Table );
+
+ FT_FREE( loca_buf );
+
+ return error;
+ }
+
+
+ static FT_Error
+ reconstruct_glyf( FT_Stream stream,
+ FT_ULong* glyf_checksum,
+ FT_ULong* loca_checksum,
+ FT_Byte** sfnt_bytes,
+ FT_ULong* sfnt_size,
+ FT_ULong* out_offset,
+ WOFF2_Info info,
+ FT_Memory memory )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_Byte* sfnt = *sfnt_bytes;
+
+ /* current position in stream */
+ const FT_ULong pos = FT_STREAM_POS();
+
+ FT_UInt num_substreams = 7;
+
+ FT_UShort num_glyphs;
+ FT_UShort index_format;
+ FT_ULong expected_loca_length;
+ FT_UInt offset;
+ FT_UInt i;
+ FT_ULong points_size;
+ FT_ULong bitmap_length;
+ FT_ULong glyph_buf_size;
+ FT_ULong bbox_bitmap_offset;
+
+ const FT_ULong glyf_start = *out_offset;
+ FT_ULong dest_offset = *out_offset;
+
+ WOFF2_Substream substreams = NULL;
+
+ FT_ULong* loca_values = NULL;
+ FT_UShort* n_points_arr = NULL;
+ FT_Byte* glyph_buf = NULL;
+ WOFF2_Point points = NULL;
+
+
+ if ( FT_NEW_ARRAY( substreams, num_substreams ) )
+ goto Fail;
+
+ if ( FT_STREAM_SKIP( 4 ) )
+ goto Fail;
+ if ( FT_READ_USHORT( num_glyphs ) )
+ goto Fail;
+ if ( FT_READ_USHORT( index_format ) )
+ goto Fail;
+
+ FT_TRACE4(( "num_glyphs = %u; index_format = %u\n",
+ num_glyphs, index_format ));
+
+ info->num_glyphs = num_glyphs;
+
+ /* Calculate expected length of loca and compare. */
+ /* See https://www.w3.org/TR/WOFF2/#conform-mustRejectLoca */
+ /* index_format = 0 => Short version `loca'. */
+ /* index_format = 1 => Long version `loca'. */
+ expected_loca_length = ( index_format ? 4 : 2 ) *
+ ( (FT_ULong)num_glyphs + 1 );
+ if ( info->loca_table->dst_length != expected_loca_length )
+ goto Fail;
+
+ offset = ( 2 + num_substreams ) * 4;
+ if ( offset > info->glyf_table->TransformLength )
+ goto Fail;
+
+ for ( i = 0; i < num_substreams; ++i )
+ {
+ FT_ULong substream_size;
+
+
+ if ( FT_READ_ULONG( substream_size ) )
+ goto Fail;
+ if ( substream_size > info->glyf_table->TransformLength - offset )
+ goto Fail;
+
+ substreams[i].start = pos + offset;
+ substreams[i].offset = pos + offset;
+ substreams[i].size = substream_size;
+
+ FT_TRACE5(( " Substream %d: offset = %lu; size = %lu;\n",
+ i, substreams[i].offset, substreams[i].size ));
+ offset += substream_size;
+ }
+
+ if ( FT_NEW_ARRAY( loca_values, num_glyphs + 1 ) )
+ goto Fail;
+
+ points_size = 0;
+ bbox_bitmap_offset = substreams[BBOX_STREAM].offset;
+
+ /* Size of bboxBitmap = 4 * floor((numGlyphs + 31) / 32) */
+ bitmap_length = ( ( num_glyphs + 31 ) >> 5 ) << 2;
+ substreams[BBOX_STREAM].offset += bitmap_length;
+
+ glyph_buf_size = WOFF2_DEFAULT_GLYPH_BUF;
+ if ( FT_NEW_ARRAY( glyph_buf, glyph_buf_size ) )
+ goto Fail;
+
+ if ( FT_NEW_ARRAY( info->x_mins, num_glyphs ) )
+ goto Fail;
+
+ for ( i = 0; i < num_glyphs; ++i )
+ {
+ FT_ULong glyph_size = 0;
+ FT_UShort n_contours = 0;
+ FT_Bool have_bbox = FALSE;
+ FT_Byte bbox_bitmap;
+ FT_ULong bbox_offset;
+ FT_UShort x_min = 0;
+
+
+ /* Set `have_bbox'. */
+ bbox_offset = bbox_bitmap_offset + ( i >> 3 );
+ if ( FT_STREAM_SEEK( bbox_offset ) ||
+ FT_READ_BYTE( bbox_bitmap ) )
+ goto Fail;
+ if ( bbox_bitmap & ( 0x80 >> ( i & 7 ) ) )
+ have_bbox = TRUE;
+
+ /* Read value from `nContourStream'. */
+ if ( FT_STREAM_SEEK( substreams[N_CONTOUR_STREAM].offset ) ||
+ FT_READ_USHORT( n_contours ) )
+ goto Fail;
+ substreams[N_CONTOUR_STREAM].offset += 2;
+
+ if ( n_contours == 0xffff )
+ {
+ /* composite glyph */
+ FT_Bool have_instructions = FALSE;
+ FT_UShort instruction_size = 0;
+ FT_ULong composite_size;
+ FT_ULong size_needed;
+ FT_Byte* pointer = NULL;
+
+
+ /* Composite glyphs must have explicit bbox. */
+ if ( !have_bbox )
+ goto Fail;
+
+ if ( compositeGlyph_size( stream,
+ substreams[COMPOSITE_STREAM].offset,
+ &composite_size,
+ &have_instructions) )
+ goto Fail;
+
+ if ( have_instructions )
+ {
+ if ( FT_STREAM_SEEK( substreams[GLYPH_STREAM].offset ) ||
+ READ_255USHORT( instruction_size ) )
+ goto Fail;
+ substreams[GLYPH_STREAM].offset = FT_STREAM_POS();
+ }
+
+ size_needed = 12 + composite_size + instruction_size;
+ if ( glyph_buf_size < size_needed )
+ {
+ if ( FT_RENEW_ARRAY( glyph_buf, glyph_buf_size, size_needed ) )
+ goto Fail;
+ glyph_buf_size = size_needed;
+ }
+
+ pointer = glyph_buf + glyph_size;
+ WRITE_USHORT( pointer, n_contours );
+ glyph_size += 2;
+
+ /* Read x_min for current glyph. */
+ if ( FT_STREAM_SEEK( substreams[BBOX_STREAM].offset ) ||
+ FT_READ_USHORT( x_min ) )
+ goto Fail;
+ /* No increment here because we read again. */
+
+ if ( FT_STREAM_SEEK( substreams[BBOX_STREAM].offset ) ||
+ FT_STREAM_READ( glyph_buf + glyph_size, 8 ) )
+ goto Fail;
+
+ substreams[BBOX_STREAM].offset += 8;
+ glyph_size += 8;
+
+ if ( FT_STREAM_SEEK( substreams[COMPOSITE_STREAM].offset ) ||
+ FT_STREAM_READ( glyph_buf + glyph_size, composite_size ) )
+ goto Fail;
+
+ substreams[COMPOSITE_STREAM].offset += composite_size;
+ glyph_size += composite_size;
+
+ if ( have_instructions )
+ {
+ pointer = glyph_buf + glyph_size;
+ WRITE_USHORT( pointer, instruction_size );
+ glyph_size += 2;
+
+ if ( FT_STREAM_SEEK( substreams[INSTRUCTION_STREAM].offset ) ||
+ FT_STREAM_READ( glyph_buf + glyph_size, instruction_size ) )
+ goto Fail;
+
+ substreams[INSTRUCTION_STREAM].offset += instruction_size;
+ glyph_size += instruction_size;
+ }
+ }
+ else if ( n_contours > 0 )
+ {
+ /* simple glyph */
+ FT_ULong total_n_points = 0;
+ FT_UShort n_points_contour;
+ FT_UInt j;
+ FT_ULong flag_size;
+ FT_ULong triplet_size;
+ FT_ULong triplet_bytes_used;
+ FT_Byte* flags_buf = NULL;
+ FT_Byte* triplet_buf = NULL;
+ FT_UShort instruction_size;
+ FT_ULong size_needed;
+ FT_Int end_point;
+ FT_UInt contour_ix;
+
+ FT_Byte* pointer = NULL;
+
+
+ if ( FT_NEW_ARRAY( n_points_arr, n_contours ) )
+ goto Fail;
+
+ if ( FT_STREAM_SEEK( substreams[N_POINTS_STREAM].offset ) )
+ goto Fail;
+
+ for ( j = 0; j < n_contours; ++j )
+ {
+ if ( READ_255USHORT( n_points_contour ) )
+ goto Fail;
+ n_points_arr[j] = n_points_contour;
+ /* Prevent negative/overflow. */
+ if ( total_n_points + n_points_contour < total_n_points )
+ goto Fail;
+ total_n_points += n_points_contour;
+ }
+ substreams[N_POINTS_STREAM].offset = FT_STREAM_POS();
+
+ flag_size = total_n_points;
+ if ( flag_size > substreams[FLAG_STREAM].size )
+ goto Fail;
+
+ flags_buf = stream->base + substreams[FLAG_STREAM].offset;
+ triplet_buf = stream->base + substreams[GLYPH_STREAM].offset;
+
+ if ( substreams[GLYPH_STREAM].size <
+ ( substreams[GLYPH_STREAM].offset -
+ substreams[GLYPH_STREAM].start ) )
+ goto Fail;
+
+ triplet_size = substreams[GLYPH_STREAM].size -
+ ( substreams[GLYPH_STREAM].offset -
+ substreams[GLYPH_STREAM].start );
+ triplet_bytes_used = 0;
+
+ /* Create array to store point information. */
+ points_size = total_n_points;
+ if ( FT_NEW_ARRAY( points, points_size ) )
+ goto Fail;
+
+ if ( triplet_decode( flags_buf,
+ triplet_buf,
+ triplet_size,
+ total_n_points,
+ points,
+ &triplet_bytes_used ) )
+ goto Fail;
+
+ substreams[FLAG_STREAM].offset += flag_size;
+ substreams[GLYPH_STREAM].offset += triplet_bytes_used;
+
+ if ( FT_STREAM_SEEK( substreams[GLYPH_STREAM].offset ) ||
+ READ_255USHORT( instruction_size ) )
+ goto Fail;
+
+ substreams[GLYPH_STREAM].offset = FT_STREAM_POS();
+
+ if ( total_n_points >= ( 1 << 27 ) )
+ goto Fail;
+
+ size_needed = 12 +
+ ( 2 * n_contours ) +
+ ( 5 * total_n_points ) +
+ instruction_size;
+ if ( glyph_buf_size < size_needed )
+ {
+ if ( FT_RENEW_ARRAY( glyph_buf, glyph_buf_size, size_needed ) )
+ goto Fail;
+ glyph_buf_size = size_needed;
+ }
+
+ pointer = glyph_buf + glyph_size;
+ WRITE_USHORT( pointer, n_contours );
+ glyph_size += 2;
+
+ if ( have_bbox )
+ {
+ /* Read x_min for current glyph. */
+ if ( FT_STREAM_SEEK( substreams[BBOX_STREAM].offset ) ||
+ FT_READ_USHORT( x_min ) )
+ goto Fail;
+ /* No increment here because we read again. */
+
+ if ( FT_STREAM_SEEK( substreams[BBOX_STREAM].offset ) ||
+ FT_STREAM_READ( glyph_buf + glyph_size, 8 ) )
+ goto Fail;
+ substreams[BBOX_STREAM].offset += 8;
+ }
+ else
+ compute_bbox( total_n_points, points, glyph_buf, &x_min );
+
+ glyph_size = CONTOUR_OFFSET_END_POINT;
+
+ pointer = glyph_buf + glyph_size;
+ end_point = -1;
+
+ for ( contour_ix = 0; contour_ix < n_contours; ++contour_ix )
+ {
+ end_point += n_points_arr[contour_ix];
+ if ( end_point >= 65536 )
+ goto Fail;
+
+ WRITE_SHORT( pointer, end_point );
+ glyph_size += 2;
+ }
+
+ WRITE_USHORT( pointer, instruction_size );
+ glyph_size += 2;
+
+ if ( FT_STREAM_SEEK( substreams[INSTRUCTION_STREAM].offset ) ||
+ FT_STREAM_READ( glyph_buf + glyph_size, instruction_size ) )
+ goto Fail;
+
+ substreams[INSTRUCTION_STREAM].offset += instruction_size;
+ glyph_size += instruction_size;
+
+ if ( store_points( total_n_points,
+ points,
+ n_contours,
+ instruction_size,
+ glyph_buf,
+ glyph_buf_size,
+ &glyph_size ) )
+ goto Fail;
+
+ FT_FREE( points );
+ FT_FREE( n_points_arr );
+ }
+ else
+ {
+ /* Empty glyph. */
+ /* Must not have a bbox. */
+ if ( have_bbox )
+ {
+ FT_ERROR(( "Empty glyph has a bbox.\n" ));
+ goto Fail;
+ }
+ }
+
+ loca_values[i] = dest_offset - glyf_start;
+
+ if ( WRITE_SFNT_BUF( glyph_buf, glyph_size ) )
+ goto Fail;
+
+ if ( pad4( &sfnt, sfnt_size, &dest_offset, memory ) )
+ goto Fail;
+
+ *glyf_checksum += compute_ULong_sum( glyph_buf, glyph_size );
+
+ /* Store x_mins, may be required to reconstruct `hmtx'. */
+ if ( n_contours > 0 )
+ info->x_mins[i] = x_min;
+ }
+
+ info->glyf_table->dst_length = dest_offset - info->glyf_table->dst_offset;
+ info->loca_table->dst_offset = dest_offset;
+
+ /* `loca[n]' will be equal to the length of the `glyf' table. */
+ loca_values[num_glyphs] = info->glyf_table->dst_length;
+
+ if ( store_loca( loca_values,
+ num_glyphs + 1,
+ index_format,
+ loca_checksum,
+ &sfnt,
+ sfnt_size,
+ &dest_offset,
+ memory ) )
+ goto Fail;
+
+ info->loca_table->dst_length = dest_offset - info->loca_table->dst_offset;
+
+ FT_TRACE4(( " loca table info:\n" ));
+ FT_TRACE4(( " dst_offset = %lu\n", info->loca_table->dst_offset ));
+ FT_TRACE4(( " dst_length = %lu\n", info->loca_table->dst_length ));
+ FT_TRACE4(( " checksum = %09x\n", *loca_checksum ));
+
+ /* Set pointer `sfnt_bytes' to its correct value. */
+ *sfnt_bytes = sfnt;
+ *out_offset = dest_offset;
+
+ FT_FREE( substreams );
+ FT_FREE( loca_values );
+ FT_FREE( n_points_arr );
+ FT_FREE( glyph_buf );
+ FT_FREE( points );
+
+ return error;
+
+ Fail:
+ if ( !error )
+ error = FT_THROW( Invalid_Table );
+
+ /* Set pointer `sfnt_bytes' to its correct value. */
+ *sfnt_bytes = sfnt;
+
+ FT_FREE( substreams );
+ FT_FREE( loca_values );
+ FT_FREE( n_points_arr );
+ FT_FREE( glyph_buf );
+ FT_FREE( points );
+
+ return error;
+ }
+
+
+ /* Get `x_mins' for untransformed `glyf' table. */
+ static FT_Error
+ get_x_mins( FT_Stream stream,
+ WOFF2_Table* tables,
+ FT_UShort num_tables,
+ WOFF2_Info info,
+ FT_Memory memory )
+ {
+ FT_UShort num_glyphs;
+ FT_UShort index_format;
+ FT_ULong glyf_offset;
+ FT_UShort glyf_offset_short;
+ FT_ULong loca_offset;
+ FT_Int i;
+ FT_Error error = FT_Err_Ok;
+ FT_ULong offset_size;
+
+ /* At this point of time those tables might not have been read yet. */
+ const WOFF2_Table maxp_table = find_table( tables, num_tables,
+ TTAG_maxp );
+ const WOFF2_Table head_table = find_table( tables, num_tables,
+ TTAG_head );
+
+
+ if ( !maxp_table )
+ {
+ FT_ERROR(( "`maxp' table is missing.\n" ));
+ return FT_THROW( Invalid_Table );
+ }
+
+ if ( !head_table )
+ {
+ FT_ERROR(( "`head' table is missing.\n" ));
+ return FT_THROW( Invalid_Table );
+ }
+
+ /* Read `numGlyphs' field from `maxp' table. */
+ if ( FT_STREAM_SEEK( maxp_table->src_offset ) || FT_STREAM_SKIP( 8 ) )
+ return error;
+
+ if ( FT_READ_USHORT( num_glyphs ) )
+ return error;
+
+ info->num_glyphs = num_glyphs;
+
+ /* Read `indexToLocFormat' field from `head' table. */
+ if ( FT_STREAM_SEEK( head_table->src_offset ) ||
+ FT_STREAM_SKIP( 50 ) )
+ return error;
+
+ if ( FT_READ_USHORT( index_format ) )
+ return error;
+
+ offset_size = index_format ? 4 : 2;
+
+ /* Create `x_mins' array. */
+ if ( FT_NEW_ARRAY( info->x_mins, num_glyphs ) )
+ return error;
+
+ loca_offset = info->loca_table->src_offset;
+
+ for ( i = 0; i < num_glyphs; ++i )
+ {
+ if ( FT_STREAM_SEEK( loca_offset ) )
+ return error;
+
+ loca_offset += offset_size;
+
+ if ( index_format )
+ {
+ if ( FT_READ_ULONG( glyf_offset ) )
+ return error;
+ }
+ else
+ {
+ if ( FT_READ_USHORT( glyf_offset_short ) )
+ return error;
+
+ glyf_offset = (FT_ULong)( glyf_offset_short );
+ glyf_offset = glyf_offset << 1;
+ }
+
+ glyf_offset += info->glyf_table->src_offset;
+
+ if ( FT_STREAM_SEEK( glyf_offset ) || FT_STREAM_SKIP( 2 ) )
+ return error;
+
+ if ( FT_READ_USHORT( info->x_mins[i] ) )
+ return error;
+ }
+
+ return error;
+ }
+
+
+ static FT_Error
+ reconstruct_hmtx( FT_Stream stream,
+ FT_UShort num_glyphs,
+ FT_UShort num_hmetrics,
+ FT_Short* x_mins,
+ FT_ULong* checksum,
+ FT_Byte** sfnt_bytes,
+ FT_ULong* sfnt_size,
+ FT_ULong* out_offset,
+ FT_Memory memory )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_Byte* sfnt = *sfnt_bytes;
+ FT_ULong dest_offset = *out_offset;
+
+ FT_Byte hmtx_flags;
+ FT_Bool has_proportional_lsbs, has_monospace_lsbs;
+ FT_ULong hmtx_table_size;
+ FT_Int i;
+
+ FT_UShort* advance_widths = NULL;
+ FT_Short* lsbs = NULL;
+ FT_Byte* hmtx_table = NULL;
+ FT_Byte* dst = NULL;
+
+
+ if ( FT_READ_BYTE( hmtx_flags ) )
+ goto Fail;
+
+ has_proportional_lsbs = ( hmtx_flags & 1 ) == 0;
+ has_monospace_lsbs = ( hmtx_flags & 2 ) == 0;
+
+ /* Bits 2-7 are reserved and MUST be zero. */
+ if ( ( hmtx_flags & 0xFC ) != 0 )
+ goto Fail;
+
+ /* Are you REALLY transformed? */
+ if ( has_proportional_lsbs && has_monospace_lsbs )
+ goto Fail;
+
+ /* Cannot have a transformed `hmtx' without `glyf'. */
+ if ( ( num_hmetrics > num_glyphs ) ||
+ ( num_hmetrics < 1 ) )
+ goto Fail;
+
+ /* Must have at least one entry. */
+ if ( num_hmetrics < 1 )
+ goto Fail;
+
+ if ( FT_NEW_ARRAY( advance_widths, num_hmetrics ) ||
+ FT_NEW_ARRAY( lsbs, num_glyphs ) )
+ goto Fail;
+
+ /* Read `advanceWidth' stream. Always present. */
+ for ( i = 0; i < num_hmetrics; i++ )
+ {
+ FT_UShort advance_width;
+
+
+ if ( FT_READ_USHORT( advance_width ) )
+ goto Fail;
+
+ advance_widths[i] = advance_width;
+ }
+
+ /* lsb values for proportional glyphs. */
+ for ( i = 0; i < num_hmetrics; i++ )
+ {
+ FT_Short lsb;
+
+
+ if ( has_proportional_lsbs )
+ {
+ if ( FT_READ_SHORT( lsb ) )
+ goto Fail;
+ }
+ else
+ lsb = x_mins[i];
+
+ lsbs[i] = lsb;
+ }
+
+ /* lsb values for monospaced glyphs. */
+ for ( i = num_hmetrics; i < num_glyphs; i++ )
+ {
+ FT_Short lsb;
+
+
+ if ( has_monospace_lsbs )
+ {
+ if ( FT_READ_SHORT( lsb ) )
+ goto Fail;
+ }
+ else
+ lsb = x_mins[i];
+
+ lsbs[i] = lsb;
+ }
+
+ /* Build the hmtx table. */
+ hmtx_table_size = 2 * num_hmetrics + 2 * num_glyphs;
+ if ( FT_NEW_ARRAY( hmtx_table, hmtx_table_size ) )
+ goto Fail;
+
+ dst = hmtx_table;
+ FT_TRACE6(( "hmtx values: \n" ));
+ for ( i = 0; i < num_glyphs; i++ )
+ {
+ if ( i < num_hmetrics )
+ {
+ WRITE_SHORT( dst, advance_widths[i] );
+ FT_TRACE6(( "%d ", advance_widths[i] ));
+ }
+
+ WRITE_SHORT( dst, lsbs[i] );
+ FT_TRACE6(( "%d ", lsbs[i] ));
+ }
+ FT_TRACE6(( "\n" ));
+
+ *checksum = compute_ULong_sum( hmtx_table, hmtx_table_size );
+ /* Write `hmtx' table to sfnt buffer. */
+ if ( WRITE_SFNT_BUF( hmtx_table, hmtx_table_size ) )
+ goto Fail;
+
+ /* Set pointer `sfnt_bytes' to its correct value. */
+ *sfnt_bytes = sfnt;
+ *out_offset = dest_offset;
+
+ FT_FREE( advance_widths );
+ FT_FREE( lsbs );
+ FT_FREE( hmtx_table );
+
+ return error;
+
+ Fail:
+ FT_FREE( advance_widths );
+ FT_FREE( lsbs );
+ FT_FREE( hmtx_table );
+
+ if ( !error )
+ error = FT_THROW( Invalid_Table );
+
+ return error;
+ }
+
+
+ static FT_Error
+ reconstruct_font( FT_Byte* transformed_buf,
+ FT_ULong transformed_buf_size,
+ WOFF2_Table* indices,
+ WOFF2_Header woff2,
+ WOFF2_Info info,
+ FT_Byte** sfnt_bytes,
+ FT_ULong* sfnt_size,
+ FT_Memory memory )
+ {
+ /* Memory management of `transformed_buf' is handled by the caller. */
+
+ FT_Error error = FT_Err_Ok;
+ FT_Stream stream = NULL;
+ FT_Byte* buf_cursor = NULL;
+ FT_Byte* table_entry = NULL;
+
+ /* We are reallocating memory for `sfnt', so its pointer may change. */
+ FT_Byte* sfnt = *sfnt_bytes;
+
+ FT_UShort num_tables = woff2->num_tables;
+ FT_ULong dest_offset = 12 + num_tables * 16UL;
+
+ FT_ULong checksum = 0;
+ FT_ULong loca_checksum = 0;
+ FT_Int nn = 0;
+ FT_UShort num_hmetrics = 0;
+ FT_ULong font_checksum = info->header_checksum;
+ FT_Bool is_glyf_xform = FALSE;
+
+ FT_ULong table_entry_offset = 12;
+
+
+ /* A few table checks before reconstruction. */
+ /* `glyf' must be present with `loca'. */
+ info->glyf_table = find_table( indices, num_tables, TTAG_glyf );
+ info->loca_table = find_table( indices, num_tables, TTAG_loca );
+
+ if ( ( info->glyf_table == NULL ) ^ ( info->loca_table == NULL ) )
+ {
+ FT_ERROR(( "One of `glyf'/`loca' tables missing.\n" ));
+ return FT_THROW( Invalid_Table );
+ }
+
+ /* Both `glyf' and `loca' must have same transformation. */
+ if ( info->glyf_table != NULL )
+ {
+ if ( ( info->glyf_table->flags & WOFF2_FLAGS_TRANSFORM ) !=
+ ( info->loca_table->flags & WOFF2_FLAGS_TRANSFORM ) )
+ {
+ FT_ERROR(( "Transformation mismatch"
+ " between `glyf' and `loca' table." ));
+ return FT_THROW( Invalid_Table );
+ }
+ }
+
+ /* Create buffer for table entries. */
+ if ( FT_NEW_ARRAY( table_entry, 16 ) )
+ goto Fail;
+
+ /* Create a stream for the uncompressed buffer. */
+ if ( FT_NEW( stream ) )
+ goto Fail;
+ FT_Stream_OpenMemory( stream, transformed_buf, transformed_buf_size );
+
+ FT_ASSERT( FT_STREAM_POS() == 0 );
+
+ /* Reconstruct/copy tables to output stream. */
+ for ( nn = 0; nn < num_tables; nn++ )
+ {
+ WOFF2_TableRec table = *( indices[nn] );
+
+
+ FT_TRACE3(( "Seeking to %d with table size %d.\n",
+ table.src_offset, table.src_length ));
+ FT_TRACE3(( "Table tag: %c%c%c%c.\n",
+ (FT_Char)( table.Tag >> 24 ),
+ (FT_Char)( table.Tag >> 16 ),
+ (FT_Char)( table.Tag >> 8 ),
+ (FT_Char)( table.Tag ) ));
+
+ if ( FT_STREAM_SEEK( table.src_offset ) )
+ goto Fail;
+
+ if ( table.src_offset + table.src_length > transformed_buf_size )
+ goto Fail;
+
+ /* Get stream size for fields of `hmtx' table. */
+ if ( table.Tag == TTAG_hhea )
+ {
+ if ( read_num_hmetrics( stream, &num_hmetrics ) )
+ goto Fail;
+ }
+
+ info->num_hmetrics = num_hmetrics;
+
+ checksum = 0;
+ if ( ( table.flags & WOFF2_FLAGS_TRANSFORM ) != WOFF2_FLAGS_TRANSFORM )
+ {
+ /* Check whether `head' is at least 12 bytes. */
+ if ( table.Tag == TTAG_head )
+ {
+ if ( table.src_length < 12 )
+ goto Fail;
+
+ buf_cursor = transformed_buf + table.src_offset + 8;
+ /* Set checkSumAdjustment = 0 */
+ WRITE_ULONG( buf_cursor, 0 );
+ }
+
+ table.dst_offset = dest_offset;
+
+ checksum = compute_ULong_sum( transformed_buf + table.src_offset,
+ table.src_length );
+ FT_TRACE4(( "Checksum = %09x.\n", checksum ));
+
+ if ( WRITE_SFNT_BUF( transformed_buf + table.src_offset,
+ table.src_length ) )
+ goto Fail;
+ }
+ else
+ {
+ FT_TRACE3(( "This table is transformed.\n" ));
+
+ if ( table.Tag == TTAG_glyf )
+ {
+ is_glyf_xform = TRUE;
+ table.dst_offset = dest_offset;
+
+ if ( reconstruct_glyf( stream,
+ &checksum,
+ &loca_checksum,
+ &sfnt,
+ sfnt_size,
+ &dest_offset,
+ info,
+ memory ) )
+ goto Fail;
+
+ FT_TRACE4(( "Checksum = %09x.\n", checksum ));
+ }
+
+ else if ( table.Tag == TTAG_loca )
+ checksum = loca_checksum;
+
+ else if ( table.Tag == TTAG_hmtx )
+ {
+ /* If glyf is not transformed and hmtx is, handle separately. */
+ if ( !is_glyf_xform )
+ {
+ if ( get_x_mins( stream, indices, num_tables, info, memory ) )
+ goto Fail;
+ }
+
+ table.dst_offset = dest_offset;
+
+ if ( reconstruct_hmtx( stream,
+ info->num_glyphs,
+ info->num_hmetrics,
+ info->x_mins,
+ &checksum,
+ &sfnt,
+ sfnt_size,
+ &dest_offset,
+ memory ) )
+ goto Fail;
+ }
+ else
+ {
+ /* Unknown transform. */
+ FT_ERROR(( "Unknown table transform.\n" ));
+ goto Fail;
+ }
+ }
+
+ font_checksum += checksum;
+
+ buf_cursor = &table_entry[0];
+ WRITE_ULONG( buf_cursor, table.Tag );
+ WRITE_ULONG( buf_cursor, checksum );
+ WRITE_ULONG( buf_cursor, table.dst_offset );
+ WRITE_ULONG( buf_cursor, table.dst_length );
+
+ WRITE_SFNT_BUF_AT( table_entry_offset, table_entry, 16 );
+
+ /* Update checksum. */
+ font_checksum += compute_ULong_sum( table_entry, 16 );
+
+ if ( pad4( &sfnt, sfnt_size, &dest_offset, memory ) )
+ goto Fail;
+
+ /* Sanity check. */
+ if ( (FT_ULong)( table.dst_offset + table.dst_length ) > dest_offset )
+ {
+ FT_ERROR(( "Table was partially written.\n" ));
+ goto Fail;
+ }
+ }
+
+ /* Update `head' checkSumAdjustment. */
+ info->head_table = find_table( indices, num_tables, TTAG_head );
+ if ( !info->head_table )
+ {
+ FT_ERROR(( "`head' table is missing.\n" ));
+ goto Fail;
+ }
+
+ if ( info->head_table->dst_length < 12 )
+ goto Fail;
+
+ buf_cursor = sfnt + info->head_table->dst_offset + 8;
+ font_checksum = 0xB1B0AFBA - font_checksum;
+
+ WRITE_ULONG( buf_cursor, font_checksum );
+
+ FT_TRACE2(( "Final checksum = %09x.\n", font_checksum ));
+
+ woff2->actual_sfnt_size = dest_offset;
+
+ /* Set pointer of sfnt stream to its correct value. */
+ *sfnt_bytes = sfnt;
+
+ FT_FREE( table_entry );
+ FT_Stream_Close( stream );
+ FT_FREE( stream );
+
+ return error;
+
+ Fail:
+ if ( !error )
+ error = FT_THROW( Invalid_Table );
+
+ /* Set pointer of sfnt stream to its correct value. */
+ *sfnt_bytes = sfnt;
+
+ FT_FREE( table_entry );
+ FT_Stream_Close( stream );
+ FT_FREE( stream );
+
+ return error;
+ }
+
+
+ /* Replace `face->root.stream' with a stream containing the extracted */
+ /* SFNT of a WOFF2 font. */
+
+ FT_LOCAL_DEF( FT_Error )
+ woff2_open_font( FT_Stream stream,
+ TT_Face face,
+ FT_Int* face_instance_index,
+ FT_Long* num_faces )
+ {
+ FT_Memory memory = stream->memory;
+ FT_Error error = FT_Err_Ok;
+ FT_Int face_index;
+
+ WOFF2_HeaderRec woff2;
+ WOFF2_InfoRec info = { 0, 0, 0, NULL, NULL, NULL, NULL };
+ WOFF2_Table tables = NULL;
+ WOFF2_Table* indices = NULL;
+ WOFF2_Table* temp_indices = NULL;
+ WOFF2_Table last_table;
+
+ FT_Int nn;
+ FT_ULong j;
+ FT_ULong flags;
+ FT_UShort xform_version;
+ FT_ULong src_offset = 0;
+
+ FT_UInt glyf_index;
+ FT_UInt loca_index;
+ FT_UInt32 file_offset;
+
+ FT_Byte* sfnt = NULL;
+ FT_Stream sfnt_stream = NULL;
+ FT_Byte* sfnt_header;
+ FT_ULong sfnt_size;
+
+ FT_Byte* uncompressed_buf = NULL;
+
+ static const FT_Frame_Field woff2_header_fields[] =
+ {
+#undef FT_STRUCTURE
+#define FT_STRUCTURE WOFF2_HeaderRec
+
+ FT_FRAME_START( 48 ),
+ FT_FRAME_ULONG ( signature ),
+ FT_FRAME_ULONG ( flavor ),
+ FT_FRAME_ULONG ( length ),
+ FT_FRAME_USHORT ( num_tables ),
+ FT_FRAME_SKIP_BYTES( 2 ),
+ FT_FRAME_ULONG ( totalSfntSize ),
+ FT_FRAME_ULONG ( totalCompressedSize ),
+ FT_FRAME_SKIP_BYTES( 2 * 2 ),
+ FT_FRAME_ULONG ( metaOffset ),
+ FT_FRAME_ULONG ( metaLength ),
+ FT_FRAME_ULONG ( metaOrigLength ),
+ FT_FRAME_ULONG ( privOffset ),
+ FT_FRAME_ULONG ( privLength ),
+ FT_FRAME_END
+ };
+
+
+ FT_ASSERT( stream == face->root.stream );
+ FT_ASSERT( FT_STREAM_POS() == 0 );
+
+ face_index = FT_ABS( *face_instance_index ) & 0xFFFF;
+
+ /* Read WOFF2 Header. */
+ if ( FT_STREAM_READ_FIELDS( woff2_header_fields, &woff2 ) )
+ return error;
+
+ FT_TRACE4(( "signature -> 0x%X\n", woff2.signature ));
+ FT_TRACE2(( "flavor -> 0x%08lx\n", woff2.flavor ));
+ FT_TRACE4(( "length -> %lu\n", woff2.length ));
+ FT_TRACE2(( "num_tables -> %hu\n", woff2.num_tables ));
+ FT_TRACE4(( "totalSfntSize -> %lu\n", woff2.totalSfntSize ));
+ FT_TRACE4(( "metaOffset -> %hu\n", woff2.metaOffset ));
+ FT_TRACE4(( "metaLength -> %hu\n", woff2.metaLength ));
+ FT_TRACE4(( "privOffset -> %hu\n", woff2.privOffset ));
+ FT_TRACE4(( "privLength -> %hu\n", woff2.privLength ));
+
+ /* Make sure we don't recurse back here. */
+ if ( woff2.flavor == TTAG_wOF2 )
+ return FT_THROW( Invalid_Table );
+
+ /* Miscellaneous checks. */
+ if ( woff2.length != stream->size ||
+ woff2.num_tables == 0 ||
+ 48 + woff2.num_tables * 20UL >= woff2.length ||
+ ( woff2.metaOffset == 0 && ( woff2.metaLength != 0 ||
+ woff2.metaOrigLength != 0 ) ) ||
+ ( woff2.metaLength != 0 && woff2.metaOrigLength == 0 ) ||
+ ( woff2.metaOffset >= woff2.length ) ||
+ ( woff2.length - woff2.metaOffset < woff2.metaLength ) ||
+ ( woff2.privOffset == 0 && woff2.privLength != 0 ) ||
+ ( woff2.privOffset >= woff2.length ) ||
+ ( woff2.length - woff2.privOffset < woff2.privLength ) )
+ {
+ FT_ERROR(( "woff2_open_font: invalid WOFF2 header\n" ));
+ return FT_THROW( Invalid_Table );
+ }
+
+ FT_TRACE2(( "woff2_open_font: WOFF2 Header is valid.\n" ));
+
+ woff2.ttc_fonts = NULL;
+
+ /* Read table directory. */
+ if ( FT_NEW_ARRAY( tables, woff2.num_tables ) ||
+ FT_NEW_ARRAY( indices, woff2.num_tables ) )
+ goto Exit;
+
+ FT_TRACE2(( "\n"
+ " tag flags transform origLen transformLen\n"
+ " --------------------------------------------------\n" ));
+
+ for ( nn = 0; nn < woff2.num_tables; nn++ )
+ {
+ WOFF2_Table table = tables + nn;
+
+
+ if ( FT_READ_BYTE( table->FlagByte ) )
+ goto Exit;
+
+ if ( ( table->FlagByte & 0x3f ) == 0x3f )
+ {
+ if ( FT_READ_ULONG( table->Tag ) )
+ goto Exit;
+ }
+ else
+ {
+ table->Tag = woff2_known_tags( table->FlagByte & 0x3f );
+ if ( !table->Tag )
+ {
+ FT_ERROR(( "woff2_open_font: Unknown table tag." ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+ }
+
+ flags = 0;
+ xform_version = ( table->FlagByte >> 6 ) & 0x03;
+
+ /* 0 means xform for glyph/loca, non-0 for others. */
+ if ( table->Tag == TTAG_glyf || table->Tag == TTAG_loca )
+ {
+ if ( xform_version == 0 )
+ flags |= WOFF2_FLAGS_TRANSFORM;
+ }
+ else if ( xform_version != 0 )
+ flags |= WOFF2_FLAGS_TRANSFORM;
+
+ flags |= xform_version;
+
+ if ( READ_BASE128( table->dst_length ) )
+ goto Exit;
+
+ table->TransformLength = table->dst_length;
+
+ if ( ( flags & WOFF2_FLAGS_TRANSFORM ) != 0 )
+ {
+ if ( READ_BASE128( table->TransformLength ) )
+ goto Exit;
+
+ if ( table->Tag == TTAG_loca && table->TransformLength )
+ {
+ FT_ERROR(( "woff2_open_font: Invalid loca `transformLength'.\n" ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+ }
+
+ if ( src_offset + table->TransformLength < src_offset )
+ {
+ FT_ERROR(( "woff2_open_font: invalid WOFF2 table directory.\n" ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ table->src_offset = src_offset;
+ table->src_length = table->TransformLength;
+ src_offset += table->TransformLength;
+ table->flags = flags;
+
+ FT_TRACE2(( " %c%c%c%c %08d %08d %08ld %08ld\n",
+ (FT_Char)( table->Tag >> 24 ),
+ (FT_Char)( table->Tag >> 16 ),
+ (FT_Char)( table->Tag >> 8 ),
+ (FT_Char)( table->Tag ),
+ table->FlagByte & 0x3f,
+ ( table->FlagByte >> 6 ) & 0x03,
+ table->dst_length,
+ table->TransformLength,
+ table->src_length,
+ table->src_offset ));
+
+ indices[nn] = table;
+ }
+
+ /* End of last table is uncompressed size. */
+ last_table = indices[woff2.num_tables - 1];
+
+ woff2.uncompressed_size = last_table->src_offset +
+ last_table->src_length;
+ if ( woff2.uncompressed_size < last_table->src_offset )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ FT_TRACE2(( "Table directory parsed.\n" ));
+
+ /* Check for and read collection directory. */
+ woff2.num_fonts = 1;
+ woff2.header_version = 0;
+
+ if ( woff2.flavor == TTAG_ttcf )
+ {
+ FT_TRACE2(( "Font is a TTC, reading collection directory.\n" ));
+
+ if ( FT_READ_ULONG( woff2.header_version ) )
+ goto Exit;
+
+ if ( woff2.header_version != 0x00010000 &&
+ woff2.header_version != 0x00020000 )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ if ( READ_255USHORT( woff2.num_fonts ) )
+ goto Exit;
+
+ if ( !woff2.num_fonts )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ FT_TRACE4(( "Number of fonts in TTC: %ld\n", woff2.num_fonts ));
+
+ if ( FT_NEW_ARRAY( woff2.ttc_fonts, woff2.num_fonts ) )
+ goto Exit;
+
+ for ( nn = 0; nn < woff2.num_fonts; nn++ )
+ {
+ WOFF2_TtcFont ttc_font = woff2.ttc_fonts + nn;
+
+
+ if ( READ_255USHORT( ttc_font->num_tables ) )
+ goto Exit;
+ if ( FT_READ_ULONG( ttc_font->flavor ) )
+ goto Exit;
+
+ if ( FT_NEW_ARRAY( ttc_font->table_indices, ttc_font->num_tables ) )
+ goto Exit;
+
+ FT_TRACE5(( "Number of tables in font %d: %ld\n",
+ nn, ttc_font->num_tables ));
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( ttc_font->num_tables )
+ FT_TRACE6(( " Indices: " ));
+#endif
+
+ glyf_index = 0;
+ loca_index = 0;
+
+ for ( j = 0; j < ttc_font->num_tables; j++ )
+ {
+ FT_UShort table_index;
+ WOFF2_Table table;
+
+
+ if ( READ_255USHORT( table_index ) )
+ goto Exit;
+
+ FT_TRACE6(( "%hu ", table_index ));
+ if ( table_index >= woff2.num_tables )
+ {
+ FT_ERROR(( "woff2_open_font: invalid table index\n" ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ ttc_font->table_indices[j] = table_index;
+
+ table = indices[table_index];
+ if ( table->Tag == TTAG_loca )
+ loca_index = table_index;
+ if ( table->Tag == TTAG_glyf )
+ glyf_index = table_index;
+ }
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( ttc_font->num_tables )
+ FT_TRACE6(( "\n" ));
+#endif
+
+ /* glyf and loca must be consecutive */
+ if ( glyf_index > 0 || loca_index > 0 )
+ {
+ if ( glyf_index > loca_index ||
+ loca_index - glyf_index != 1 )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+ }
+ }
+
+ /* Collection directory reading complete. */
+ FT_TRACE2(( "WOFF2 collection directory is valid.\n" ));
+ }
+ else
+ woff2.ttc_fonts = NULL;
+
+ woff2.compressed_offset = FT_STREAM_POS();
+ file_offset = ROUND4( woff2.compressed_offset +
+ woff2.totalCompressedSize );
+
+ /* Some more checks before we start reading the tables. */
+ if ( file_offset > woff2.length )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ if ( woff2.metaOffset )
+ {
+ if ( file_offset != woff2.metaOffset )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+ file_offset = ROUND4(woff2.metaOffset + woff2.metaLength);
+ }
+
+ if ( woff2.privOffset )
+ {
+ if ( file_offset != woff2.privOffset )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+ file_offset = ROUND4(woff2.privOffset + woff2.privLength);
+ }
+
+ if ( file_offset != ( ROUND4( woff2.length ) ) )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ /* Validate requested face index. */
+ *num_faces = woff2.num_fonts;
+ /* value -(N+1) requests information on index N */
+ if ( *face_instance_index < 0 )
+ face_index--;
+
+ if ( face_index >= woff2.num_fonts )
+ {
+ if ( *face_instance_index >= 0 )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+ else
+ face_index = 0;
+ }
+
+ /* Only retain tables of the requested face in a TTC. */
+ if ( woff2.header_version )
+ {
+ WOFF2_TtcFont ttc_font = woff2.ttc_fonts + face_index;
+
+
+ /* Create a temporary array. */
+ if ( FT_NEW_ARRAY( temp_indices,
+ ttc_font->num_tables ) )
+ goto Exit;
+
+ FT_TRACE4(( "Storing tables for TTC face index %d.\n", face_index ));
+ for ( nn = 0; nn < ttc_font->num_tables; nn++ )
+ temp_indices[nn] = indices[ttc_font->table_indices[nn]];
+
+ /* Resize array to required size. */
+ if ( FT_RENEW_ARRAY( indices,
+ woff2.num_tables,
+ ttc_font->num_tables ) )
+ goto Exit;
+
+ for ( nn = 0; nn < ttc_font->num_tables; nn++ )
+ indices[nn] = temp_indices[nn];
+
+ FT_FREE( temp_indices );
+
+ /* Change header values. */
+ woff2.flavor = ttc_font->flavor;
+ woff2.num_tables = ttc_font->num_tables;
+ }
+
+ /* We need to allocate this much at the minimum. */
+ sfnt_size = 12 + woff2.num_tables * 16UL;
+ /* This is what we normally expect. */
+ /* Initially trust `totalSfntSize' and change later as required. */
+ if ( woff2.totalSfntSize > sfnt_size )
+ {
+ /* However, adjust the value to something reasonable. */
+
+ /* Factor 64 is heuristic. */
+ if ( ( woff2.totalSfntSize >> 6 ) > woff2.length )
+ sfnt_size = woff2.length << 6;
+ else
+ sfnt_size = woff2.totalSfntSize;
+
+ /* Value 1<<26 = 67108864 is heuristic. */
+ if (sfnt_size >= (1 << 26))
+ sfnt_size = 1 << 26;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( sfnt_size != woff2.totalSfntSize )
+ FT_TRACE4(( "adjusting estimate of uncompressed font size"
+ " to %lu bytes\n",
+ sfnt_size ));
+#endif
+ }
+
+ /* Write sfnt header. */
+ if ( FT_ALLOC( sfnt, sfnt_size ) ||
+ FT_NEW( sfnt_stream ) )
+ goto Exit;
+
+ sfnt_header = sfnt;
+
+ WRITE_ULONG( sfnt_header, woff2.flavor );
+
+ if ( woff2.num_tables )
+ {
+ FT_UInt searchRange, entrySelector, rangeShift, x;
+
+
+ x = woff2.num_tables;
+ entrySelector = 0;
+ while ( x )
+ {
+ x >>= 1;
+ entrySelector += 1;
+ }
+ entrySelector--;
+
+ searchRange = ( 1 << entrySelector ) * 16;
+ rangeShift = ( woff2.num_tables * 16 ) - searchRange;
+
+ WRITE_USHORT( sfnt_header, woff2.num_tables );
+ WRITE_USHORT( sfnt_header, searchRange );
+ WRITE_USHORT( sfnt_header, entrySelector );
+ WRITE_USHORT( sfnt_header, rangeShift );
+ }
+
+ info.header_checksum = compute_ULong_sum( sfnt, 12 );
+
+ /* Sort tables by tag. */
+ ft_qsort( indices,
+ woff2.num_tables,
+ sizeof ( WOFF2_Table ),
+ compare_tags );
+
+ if ( woff2.uncompressed_size < 1 )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ if ( woff2.uncompressed_size > sfnt_size )
+ {
+ FT_ERROR(( "woff2_open_font: SFNT table lengths are too large.\n" ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ /* Allocate memory for uncompressed table data. */
+ if ( FT_ALLOC( uncompressed_buf, woff2.uncompressed_size ) ||
+ FT_FRAME_ENTER( woff2.totalCompressedSize ) )
+ goto Exit;
+
+ /* Uncompress the stream. */
+ error = woff2_decompress( uncompressed_buf,
+ woff2.uncompressed_size,
+ stream->cursor,
+ woff2.totalCompressedSize );
+
+ FT_FRAME_EXIT();
+
+ if ( error )
+ goto Exit;
+
+ error = reconstruct_font( uncompressed_buf,
+ woff2.uncompressed_size,
+ indices,
+ &woff2,
+ &info,
+ &sfnt,
+ &sfnt_size,
+ memory );
+
+ if ( error )
+ goto Exit;
+
+ /* Resize `sfnt' to actual size of sfnt stream. */
+ if ( woff2.actual_sfnt_size < sfnt_size )
+ {
+ FT_TRACE5(( "Trimming sfnt stream from %lu to %lu.\n",
+ sfnt_size, woff2.actual_sfnt_size ));
+ if ( FT_REALLOC( sfnt,
+ (FT_ULong)( sfnt_size ),
+ (FT_ULong)( woff2.actual_sfnt_size ) ) )
+ goto Exit;
+ }
+
+ /* `reconstruct_font' has done all the work. */
+ /* Swap out stream and return. */
+ FT_Stream_OpenMemory( sfnt_stream, sfnt, woff2.actual_sfnt_size );
+ sfnt_stream->memory = stream->memory;
+ sfnt_stream->close = stream_close;
+
+ FT_Stream_Free(
+ face->root.stream,
+ ( face->root.face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );
+
+ face->root.stream = sfnt_stream;
+ face->root.face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;
+
+ /* Set face_index to 0 or -1. */
+ if ( *face_instance_index >= 0 )
+ *face_instance_index = 0;
+ else
+ *face_instance_index = -1;
+
+ FT_TRACE2(( "woff2_open_font: SFNT synthesized.\n" ));
+
+ Exit:
+ FT_FREE( tables );
+ FT_FREE( indices );
+ FT_FREE( uncompressed_buf );
+ FT_FREE( info.x_mins );
+
+ if ( woff2.ttc_fonts )
+ {
+ WOFF2_TtcFont ttc_font = woff2.ttc_fonts;
+
+
+ for ( nn = 0; nn < woff2.num_fonts; nn++ )
+ {
+ FT_FREE( ttc_font->table_indices );
+ ttc_font++;
+ }
+
+ FT_FREE( woff2.ttc_fonts );
+ }
+
+ if ( error )
+ {
+ FT_FREE( sfnt );
+ if ( sfnt_stream )
+ {
+ FT_Stream_Close( sfnt_stream );
+ FT_FREE( sfnt_stream );
+ }
+ }
+
+ return error;
+ }
+
+
+#undef READ_255USHORT
+#undef READ_BASE128
+#undef ROUND4
+#undef WRITE_USHORT
+#undef WRITE_ULONG
+#undef WRITE_SHORT
+#undef WRITE_SFNT_BUF
+#undef WRITE_SFNT_BUF_AT
+
+#undef N_CONTOUR_STREAM
+#undef N_POINTS_STREAM
+#undef FLAG_STREAM
+#undef GLYPH_STREAM
+#undef COMPOSITE_STREAM
+#undef BBOX_STREAM
+#undef INSTRUCTION_STREAM
+
+
+/* END */
diff --git a/thirdparty/freetype/src/sfnt/sfwoff2.h b/thirdparty/freetype/src/sfnt/sfwoff2.h
new file mode 100644
index 0000000000..7ae6e2c06d
--- /dev/null
+++ b/thirdparty/freetype/src/sfnt/sfwoff2.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ *
+ * sfwoff2.h
+ *
+ * WOFFF2 format management (specification).
+ *
+ * Copyright (C) 2019-2020 by
+ * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
+
+
+#ifndef SFWOFF2_H_
+#define SFWOFF2_H_
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_SFNT_H
+#include FT_INTERNAL_OBJECTS_H
+
+
+FT_BEGIN_HEADER
+
+
+ /* Leave the first byte open to store `flag_byte'. */
+#define WOFF2_FLAGS_TRANSFORM 1 << 8
+
+#define WOFF2_SFNT_HEADER_SIZE 12
+#define WOFF2_SFNT_ENTRY_SIZE 16
+
+ /* Suggested maximum size for output. */
+#define WOFF2_DEFAULT_MAX_SIZE 30 * 1024 * 1024
+
+ /* 98% of Google Fonts have no glyph above 5k bytes. */
+#define WOFF2_DEFAULT_GLYPH_BUF 5120
+
+ /* Composite glyph flags. */
+ /* See `CompositeGlyph.java' in `sfntly' for full definitions. */
+#define FLAG_ARG_1_AND_2_ARE_WORDS 1 << 0
+#define FLAG_WE_HAVE_A_SCALE 1 << 3
+#define FLAG_MORE_COMPONENTS 1 << 5
+#define FLAG_WE_HAVE_AN_X_AND_Y_SCALE 1 << 6
+#define FLAG_WE_HAVE_A_TWO_BY_TWO 1 << 7
+#define FLAG_WE_HAVE_INSTRUCTIONS 1 << 8
+
+ /* Simple glyph flags */
+#define GLYF_ON_CURVE 1 << 0
+#define GLYF_X_SHORT 1 << 1
+#define GLYF_Y_SHORT 1 << 2
+#define GLYF_REPEAT 1 << 3
+#define GLYF_THIS_X_IS_SAME 1 << 4
+#define GLYF_THIS_Y_IS_SAME 1 << 5
+
+ /* Other constants */
+#define CONTOUR_OFFSET_END_POINT 10
+
+
+ FT_LOCAL( FT_Error )
+ woff2_open_font( FT_Stream stream,
+ TT_Face face,
+ FT_Int* face_index,
+ FT_Long* num_faces );
+
+
+FT_END_HEADER
+
+#endif /* SFWOFF2_H_ */
+
+
+/* END */
diff --git a/thirdparty/freetype/src/sfnt/ttbdf.c b/thirdparty/freetype/src/sfnt/ttbdf.c
index 853599fc43..bc35284cc8 100644
--- a/thirdparty/freetype/src/sfnt/ttbdf.c
+++ b/thirdparty/freetype/src/sfnt/ttbdf.c
@@ -4,7 +4,7 @@
*
* TrueType and OpenType embedded BDF properties (body).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttbdf.h b/thirdparty/freetype/src/sfnt/ttbdf.h
index e4164e61fc..c340f6631d 100644
--- a/thirdparty/freetype/src/sfnt/ttbdf.h
+++ b/thirdparty/freetype/src/sfnt/ttbdf.h
@@ -4,7 +4,7 @@
*
* TrueType and OpenType embedded BDF properties (specification).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttcmap.c b/thirdparty/freetype/src/sfnt/ttcmap.c
index 683f3b1818..2c34efb5ce 100644
--- a/thirdparty/freetype/src/sfnt/ttcmap.c
+++ b/thirdparty/freetype/src/sfnt/ttcmap.c
@@ -4,7 +4,7 @@
*
* TrueType character mapping table (cmap) support (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -3764,28 +3764,31 @@
FT_LOCAL_DEF( FT_Error )
tt_face_build_cmaps( TT_Face face )
{
- FT_Byte* table = face->cmap_table;
- FT_Byte* limit = table + face->cmap_size;
+ FT_Byte* const table = face->cmap_table;
+ FT_Byte* limit;
FT_UInt volatile num_cmaps;
- FT_Byte* volatile p = table;
+ FT_Byte* volatile p = table;
FT_Library library = FT_FACE_LIBRARY( face );
FT_UNUSED( library );
- if ( !p || p + 4 > limit )
+ if ( !p || face->cmap_size < 4 )
return FT_THROW( Invalid_Table );
- /* only recognize format 0 */
- if ( TT_NEXT_USHORT( p ) != 0 )
- {
- FT_ERROR(( "tt_face_build_cmaps:"
- " unsupported `cmap' table format = %d\n",
- TT_PEEK_USHORT( p - 2 ) ));
- return FT_THROW( Invalid_Table );
- }
+ /* Version 1.8.3 of the OpenType specification contains the following */
+ /* (https://docs.microsoft.com/en-us/typography/opentype/spec/cmap): */
+ /* */
+ /* The 'cmap' table version number remains at 0x0000 for fonts that */
+ /* make use of the newer subtable formats. */
+ /* */
+ /* This essentially means that a version format test is useless. */
+
+ /* ignore format */
+ p += 2;
num_cmaps = TT_NEXT_USHORT( p );
+ limit = table + face->cmap_size;
for ( ; num_cmaps > 0 && p + 8 <= limit; num_cmaps-- )
{
diff --git a/thirdparty/freetype/src/sfnt/ttcmap.h b/thirdparty/freetype/src/sfnt/ttcmap.h
index 36801c939e..4bf49e2d49 100644
--- a/thirdparty/freetype/src/sfnt/ttcmap.h
+++ b/thirdparty/freetype/src/sfnt/ttcmap.h
@@ -4,7 +4,7 @@
*
* TrueType character mapping table (cmap) support (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttcmapc.h b/thirdparty/freetype/src/sfnt/ttcmapc.h
index ace9e69ca8..2e4ce5075b 100644
--- a/thirdparty/freetype/src/sfnt/ttcmapc.h
+++ b/thirdparty/freetype/src/sfnt/ttcmapc.h
@@ -4,7 +4,7 @@
*
* TT CMAP classes definitions (specification only).
*
- * Copyright (C) 2009-2019 by
+ * Copyright (C) 2009-2020 by
* Oran Agra and Mickey Gabel.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttcolr.c b/thirdparty/freetype/src/sfnt/ttcolr.c
index 6b537d95b8..b37fa7b09a 100644
--- a/thirdparty/freetype/src/sfnt/ttcolr.c
+++ b/thirdparty/freetype/src/sfnt/ttcolr.c
@@ -4,7 +4,7 @@
*
* TrueType and OpenType colored glyph layer support (body).
*
- * Copyright (C) 2018-2019 by
+ * Copyright (C) 2018-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* Originally written by Shao Yu Zhang <shaozhang@fb.com>.
diff --git a/thirdparty/freetype/src/sfnt/ttcolr.h b/thirdparty/freetype/src/sfnt/ttcolr.h
index 817489a855..8da6b3aa14 100644
--- a/thirdparty/freetype/src/sfnt/ttcolr.h
+++ b/thirdparty/freetype/src/sfnt/ttcolr.h
@@ -4,7 +4,7 @@
*
* TrueType and OpenType colored glyph layer support (specification).
*
- * Copyright (C) 2018-2019 by
+ * Copyright (C) 2018-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* Originally written by Shao Yu Zhang <shaozhang@fb.com>.
diff --git a/thirdparty/freetype/src/sfnt/ttcpal.c b/thirdparty/freetype/src/sfnt/ttcpal.c
index 3482169a89..165423e305 100644
--- a/thirdparty/freetype/src/sfnt/ttcpal.c
+++ b/thirdparty/freetype/src/sfnt/ttcpal.c
@@ -4,7 +4,7 @@
*
* TrueType and OpenType color palette support (body).
*
- * Copyright (C) 2018-2019 by
+ * Copyright (C) 2018-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* Originally written by Shao Yu Zhang <shaozhang@fb.com>.
diff --git a/thirdparty/freetype/src/sfnt/ttcpal.h b/thirdparty/freetype/src/sfnt/ttcpal.h
index d1b244f3e3..f2e116ba2c 100644
--- a/thirdparty/freetype/src/sfnt/ttcpal.h
+++ b/thirdparty/freetype/src/sfnt/ttcpal.h
@@ -4,7 +4,7 @@
*
* TrueType and OpenType color palette support (specification).
*
- * Copyright (C) 2018-2019 by
+ * Copyright (C) 2018-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* Originally written by Shao Yu Zhang <shaozhang@fb.com>.
diff --git a/thirdparty/freetype/src/sfnt/ttkern.c b/thirdparty/freetype/src/sfnt/ttkern.c
index 8d1b781090..1d34acbd13 100644
--- a/thirdparty/freetype/src/sfnt/ttkern.c
+++ b/thirdparty/freetype/src/sfnt/ttkern.c
@@ -5,7 +5,7 @@
* Load the basic TrueType kerning table. This doesn't handle
* kerning data within the GPOS table at the moment.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttkern.h b/thirdparty/freetype/src/sfnt/ttkern.h
index 5f283e5e62..6560a283a6 100644
--- a/thirdparty/freetype/src/sfnt/ttkern.h
+++ b/thirdparty/freetype/src/sfnt/ttkern.h
@@ -5,7 +5,7 @@
* Load the basic TrueType kerning table. This doesn't handle
* kerning data within the GPOS table at the moment.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttload.c b/thirdparty/freetype/src/sfnt/ttload.c
index 5443bf4b69..d4e4ee4f10 100644
--- a/thirdparty/freetype/src/sfnt/ttload.c
+++ b/thirdparty/freetype/src/sfnt/ttload.c
@@ -5,7 +5,7 @@
* Load the basic TrueType tables, i.e., tables that can be either in
* TTF or OTF fonts (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -397,7 +397,15 @@
}
}
else
+ {
valid_entries = sfnt.num_tables;
+ if ( !valid_entries )
+ {
+ FT_TRACE2(( "tt_face_load_font_dir: no valid tables found\n" ));
+ error = FT_THROW( Unknown_File_Format );
+ goto Exit;
+ }
+ }
face->num_tables = valid_entries;
face->format_tag = sfnt.format_tag;
@@ -916,7 +924,7 @@
/* load language tags */
{
TT_LangTag entry = table->langTags;
- TT_LangTag limit = entry + table->numLangTagRecords;
+ TT_LangTag limit = FT_OFFSET( entry, table->numLangTagRecords );
for ( ; entry < limit; entry++ )
diff --git a/thirdparty/freetype/src/sfnt/ttload.h b/thirdparty/freetype/src/sfnt/ttload.h
index cc18c18694..49d40655f8 100644
--- a/thirdparty/freetype/src/sfnt/ttload.h
+++ b/thirdparty/freetype/src/sfnt/ttload.h
@@ -5,7 +5,7 @@
* Load the basic TrueType tables, i.e., tables that can be either in
* TTF or OTF fonts (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttmtx.c b/thirdparty/freetype/src/sfnt/ttmtx.c
index b6725c962f..e18ff877ef 100644
--- a/thirdparty/freetype/src/sfnt/ttmtx.c
+++ b/thirdparty/freetype/src/sfnt/ttmtx.c
@@ -4,7 +4,7 @@
*
* Load the metrics tables common to TTF and OTF fonts (body).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttmtx.h b/thirdparty/freetype/src/sfnt/ttmtx.h
index 5b0b60b641..c98c79ec51 100644
--- a/thirdparty/freetype/src/sfnt/ttmtx.h
+++ b/thirdparty/freetype/src/sfnt/ttmtx.h
@@ -4,7 +4,7 @@
*
* Load the metrics tables common to TTF and OTF fonts (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttpost.c b/thirdparty/freetype/src/sfnt/ttpost.c
index 636a0a004a..f7be716219 100644
--- a/thirdparty/freetype/src/sfnt/ttpost.c
+++ b/thirdparty/freetype/src/sfnt/ttpost.c
@@ -5,7 +5,7 @@
* PostScript name table processing for TrueType and OpenType fonts
* (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttpost.h b/thirdparty/freetype/src/sfnt/ttpost.h
index 812a0fc92d..547f2ff843 100644
--- a/thirdparty/freetype/src/sfnt/ttpost.h
+++ b/thirdparty/freetype/src/sfnt/ttpost.h
@@ -5,7 +5,7 @@
* PostScript name table processing for TrueType and OpenType fonts
* (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/ttsbit.c b/thirdparty/freetype/src/sfnt/ttsbit.c
index 23bd9d7eb0..3f8730f7fb 100644
--- a/thirdparty/freetype/src/sfnt/ttsbit.c
+++ b/thirdparty/freetype/src/sfnt/ttsbit.c
@@ -4,7 +4,7 @@
*
* TrueType and OpenType embedded bitmap support (body).
*
- * Copyright (C) 2005-2019 by
+ * Copyright (C) 2005-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* Copyright 2013 by Google, Inc.
diff --git a/thirdparty/freetype/src/sfnt/ttsbit.h b/thirdparty/freetype/src/sfnt/ttsbit.h
index 5ab8ff5568..dfeb886838 100644
--- a/thirdparty/freetype/src/sfnt/ttsbit.h
+++ b/thirdparty/freetype/src/sfnt/ttsbit.h
@@ -4,7 +4,7 @@
*
* TrueType and OpenType embedded bitmap support (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/sfnt/woff2tags.c b/thirdparty/freetype/src/sfnt/woff2tags.c
new file mode 100644
index 0000000000..246f7fa062
--- /dev/null
+++ b/thirdparty/freetype/src/sfnt/woff2tags.c
@@ -0,0 +1,110 @@
+/****************************************************************************
+ *
+ * woff2tags.c
+ *
+ * WOFF2 Font table tags (base).
+ *
+ * Copyright (C) 2019-2020 by
+ * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
+
+
+#include <ft2build.h>
+#include FT_TRUETYPE_TAGS_H
+
+
+ /*
+ * Return tag from index in the order given in WOFF2 specification.
+ *
+ * See
+ *
+ * https://www.w3.org/TR/WOFF2/#table_dir_format
+ *
+ * for details.
+ */
+ FT_LOCAL_DEF( FT_ULong )
+ woff2_known_tags( FT_Byte index )
+ {
+ const FT_ULong known_tags[63] =
+ {
+ FT_MAKE_TAG('c', 'm', 'a', 'p'), /* 0 */
+ FT_MAKE_TAG('h', 'e', 'a', 'd'), /* 1 */
+ FT_MAKE_TAG('h', 'h', 'e', 'a'), /* 2 */
+ FT_MAKE_TAG('h', 'm', 't', 'x'), /* 3 */
+ FT_MAKE_TAG('m', 'a', 'x', 'p'), /* 4 */
+ FT_MAKE_TAG('n', 'a', 'm', 'e'), /* 5 */
+ FT_MAKE_TAG('O', 'S', '/', '2'), /* 6 */
+ FT_MAKE_TAG('p', 'o', 's', 't'), /* 7 */
+ FT_MAKE_TAG('c', 'v', 't', ' '), /* 8 */
+ FT_MAKE_TAG('f', 'p', 'g', 'm'), /* 9 */
+ FT_MAKE_TAG('g', 'l', 'y', 'f'), /* 10 */
+ FT_MAKE_TAG('l', 'o', 'c', 'a'), /* 11 */
+ FT_MAKE_TAG('p', 'r', 'e', 'p'), /* 12 */
+ FT_MAKE_TAG('C', 'F', 'F', ' '), /* 13 */
+ FT_MAKE_TAG('V', 'O', 'R', 'G'), /* 14 */
+ FT_MAKE_TAG('E', 'B', 'D', 'T'), /* 15 */
+ FT_MAKE_TAG('E', 'B', 'L', 'C'), /* 16 */
+ FT_MAKE_TAG('g', 'a', 's', 'p'), /* 17 */
+ FT_MAKE_TAG('h', 'd', 'm', 'x'), /* 18 */
+ FT_MAKE_TAG('k', 'e', 'r', 'n'), /* 19 */
+ FT_MAKE_TAG('L', 'T', 'S', 'H'), /* 20 */
+ FT_MAKE_TAG('P', 'C', 'L', 'T'), /* 21 */
+ FT_MAKE_TAG('V', 'D', 'M', 'X'), /* 22 */
+ FT_MAKE_TAG('v', 'h', 'e', 'a'), /* 23 */
+ FT_MAKE_TAG('v', 'm', 't', 'x'), /* 24 */
+ FT_MAKE_TAG('B', 'A', 'S', 'E'), /* 25 */
+ FT_MAKE_TAG('G', 'D', 'E', 'F'), /* 26 */
+ FT_MAKE_TAG('G', 'P', 'O', 'S'), /* 27 */
+ FT_MAKE_TAG('G', 'S', 'U', 'B'), /* 28 */
+ FT_MAKE_TAG('E', 'B', 'S', 'C'), /* 29 */
+ FT_MAKE_TAG('J', 'S', 'T', 'F'), /* 30 */
+ FT_MAKE_TAG('M', 'A', 'T', 'H'), /* 31 */
+ FT_MAKE_TAG('C', 'B', 'D', 'T'), /* 32 */
+ FT_MAKE_TAG('C', 'B', 'L', 'C'), /* 33 */
+ FT_MAKE_TAG('C', 'O', 'L', 'R'), /* 34 */
+ FT_MAKE_TAG('C', 'P', 'A', 'L'), /* 35 */
+ FT_MAKE_TAG('S', 'V', 'G', ' '), /* 36 */
+ FT_MAKE_TAG('s', 'b', 'i', 'x'), /* 37 */
+ FT_MAKE_TAG('a', 'c', 'n', 't'), /* 38 */
+ FT_MAKE_TAG('a', 'v', 'a', 'r'), /* 39 */
+ FT_MAKE_TAG('b', 'd', 'a', 't'), /* 40 */
+ FT_MAKE_TAG('b', 'l', 'o', 'c'), /* 41 */
+ FT_MAKE_TAG('b', 's', 'l', 'n'), /* 42 */
+ FT_MAKE_TAG('c', 'v', 'a', 'r'), /* 43 */
+ FT_MAKE_TAG('f', 'd', 's', 'c'), /* 44 */
+ FT_MAKE_TAG('f', 'e', 'a', 't'), /* 45 */
+ FT_MAKE_TAG('f', 'm', 't', 'x'), /* 46 */
+ FT_MAKE_TAG('f', 'v', 'a', 'r'), /* 47 */
+ FT_MAKE_TAG('g', 'v', 'a', 'r'), /* 48 */
+ FT_MAKE_TAG('h', 's', 't', 'y'), /* 49 */
+ FT_MAKE_TAG('j', 'u', 's', 't'), /* 50 */
+ FT_MAKE_TAG('l', 'c', 'a', 'r'), /* 51 */
+ FT_MAKE_TAG('m', 'o', 'r', 't'), /* 52 */
+ FT_MAKE_TAG('m', 'o', 'r', 'x'), /* 53 */
+ FT_MAKE_TAG('o', 'p', 'b', 'd'), /* 54 */
+ FT_MAKE_TAG('p', 'r', 'o', 'p'), /* 55 */
+ FT_MAKE_TAG('t', 'r', 'a', 'k'), /* 56 */
+ FT_MAKE_TAG('Z', 'a', 'p', 'f'), /* 57 */
+ FT_MAKE_TAG('S', 'i', 'l', 'f'), /* 58 */
+ FT_MAKE_TAG('G', 'l', 'a', 't'), /* 59 */
+ FT_MAKE_TAG('G', 'l', 'o', 'c'), /* 60 */
+ FT_MAKE_TAG('F', 'e', 'a', 't'), /* 61 */
+ FT_MAKE_TAG('S', 'i', 'l', 'l'), /* 62 */
+ };
+
+
+ if ( index > 62 )
+ return 0;
+
+ return known_tags[index];
+ }
+
+
+/* END */
diff --git a/thirdparty/freetype/src/sfnt/woff2tags.h b/thirdparty/freetype/src/sfnt/woff2tags.h
new file mode 100644
index 0000000000..13d242e11d
--- /dev/null
+++ b/thirdparty/freetype/src/sfnt/woff2tags.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ *
+ * woff2tags.h
+ *
+ * WOFFF2 Font table tags (specification).
+ *
+ * Copyright (C) 1996-2020 by
+ * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
+
+
+#ifndef WOFF2TAGS_H
+#define WOFF2TAGS_H
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+
+
+FT_BEGIN_HEADER
+
+
+ FT_LOCAL( FT_ULong )
+ woff2_known_tags( FT_Byte index );
+
+
+FT_END_HEADER
+
+#endif /* WOFF2TAGS_H */
+
+
+/* END */
diff --git a/thirdparty/freetype/src/smooth/ftgrays.c b/thirdparty/freetype/src/smooth/ftgrays.c
index fd357a50fc..93538331af 100644
--- a/thirdparty/freetype/src/smooth/ftgrays.c
+++ b/thirdparty/freetype/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
*
* A new `perfect' anti-aliasing renderer (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/smooth/ftgrays.h b/thirdparty/freetype/src/smooth/ftgrays.h
index e9f9c7a4ad..e10fd039ac 100644
--- a/thirdparty/freetype/src/smooth/ftgrays.h
+++ b/thirdparty/freetype/src/smooth/ftgrays.h
@@ -4,7 +4,7 @@
*
* FreeType smooth renderer declaration
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/smooth/ftsmerrs.h b/thirdparty/freetype/src/smooth/ftsmerrs.h
index d52c0dd9e2..3f8567b0fa 100644
--- a/thirdparty/freetype/src/smooth/ftsmerrs.h
+++ b/thirdparty/freetype/src/smooth/ftsmerrs.h
@@ -4,7 +4,7 @@
*
* smooth renderer error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/smooth/ftsmooth.c b/thirdparty/freetype/src/smooth/ftsmooth.c
index cd034d2b40..072045cbc2 100644
--- a/thirdparty/freetype/src/smooth/ftsmooth.c
+++ b/thirdparty/freetype/src/smooth/ftsmooth.c
@@ -4,7 +4,7 @@
*
* Anti-aliasing renderer interface (body).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -155,6 +155,9 @@
goto Exit;
}
+ if ( !bitmap->rows || !bitmap->pitch )
+ goto Exit;
+
/* allocate new one */
if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, bitmap->pitch ) )
goto Exit;
@@ -188,7 +191,7 @@
/* implode outline if needed */
{
FT_Vector* points = outline->points;
- FT_Vector* points_end = points + outline->n_points;
+ FT_Vector* points_end = FT_OFFSET( points, outline->n_points );
FT_Vector* vec;
@@ -207,7 +210,7 @@
/* deflate outline if needed */
{
FT_Vector* points = outline->points;
- FT_Vector* points_end = points + outline->n_points;
+ FT_Vector* points_end = FT_OFFSET( points, outline->n_points );
FT_Vector* vec;
diff --git a/thirdparty/freetype/src/smooth/ftsmooth.h b/thirdparty/freetype/src/smooth/ftsmooth.h
index fbb21a31d0..ee5d2ff61d 100644
--- a/thirdparty/freetype/src/smooth/ftsmooth.h
+++ b/thirdparty/freetype/src/smooth/ftsmooth.h
@@ -4,7 +4,7 @@
*
* Anti-aliasing renderer interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/smooth/module.mk b/thirdparty/freetype/src/smooth/module.mk
index 44b76dfec6..ad8b47dab6 100644
--- a/thirdparty/freetype/src/smooth/module.mk
+++ b/thirdparty/freetype/src/smooth/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/smooth/rules.mk b/thirdparty/freetype/src/smooth/rules.mk
index 0153ac24a4..b08056fac5 100644
--- a/thirdparty/freetype/src/smooth/rules.mk
+++ b/thirdparty/freetype/src/smooth/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/smooth/smooth.c b/thirdparty/freetype/src/smooth/smooth.c
index 9c543d3360..6ad9424f01 100644
--- a/thirdparty/freetype/src/smooth/smooth.c
+++ b/thirdparty/freetype/src/smooth/smooth.c
@@ -4,7 +4,7 @@
*
* FreeType anti-aliasing rasterer module component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/module.mk b/thirdparty/freetype/src/truetype/module.mk
index 8a841cc956..2d8d39d1f7 100644
--- a/thirdparty/freetype/src/truetype/module.mk
+++ b/thirdparty/freetype/src/truetype/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/truetype/rules.mk b/thirdparty/freetype/src/truetype/rules.mk
index df8dcd4a4e..2f6fecfc44 100644
--- a/thirdparty/freetype/src/truetype/rules.mk
+++ b/thirdparty/freetype/src/truetype/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/truetype/truetype.c b/thirdparty/freetype/src/truetype/truetype.c
index 84928e7321..1f15b29bb2 100644
--- a/thirdparty/freetype/src/truetype/truetype.c
+++ b/thirdparty/freetype/src/truetype/truetype.c
@@ -4,7 +4,7 @@
*
* FreeType TrueType driver component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttdriver.c b/thirdparty/freetype/src/truetype/ttdriver.c
index ff626d53ab..90fab46e28 100644
--- a/thirdparty/freetype/src/truetype/ttdriver.c
+++ b/thirdparty/freetype/src/truetype/ttdriver.c
@@ -4,7 +4,7 @@
*
* TrueType font driver implementation (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttdriver.h b/thirdparty/freetype/src/truetype/ttdriver.h
index 3936c6a4de..d1cfa47c8b 100644
--- a/thirdparty/freetype/src/truetype/ttdriver.h
+++ b/thirdparty/freetype/src/truetype/ttdriver.h
@@ -4,7 +4,7 @@
*
* High-level TrueType driver interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/tterrors.h b/thirdparty/freetype/src/truetype/tterrors.h
index 5609d28d68..71d66023cd 100644
--- a/thirdparty/freetype/src/truetype/tterrors.h
+++ b/thirdparty/freetype/src/truetype/tterrors.h
@@ -4,7 +4,7 @@
*
* TrueType error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttgload.c b/thirdparty/freetype/src/truetype/ttgload.c
index a04684086b..2a1742839a 100644
--- a/thirdparty/freetype/src/truetype/ttgload.c
+++ b/thirdparty/freetype/src/truetype/ttgload.c
@@ -4,7 +4,7 @@
*
* TrueType Glyph Loader (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -1102,9 +1102,16 @@
}
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- /* if we have a HVAR table, `pp1' and/or `pp2' are already adjusted */
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) ||
- !IS_HINTED( loader->load_flags ) )
+ /* if we have a HVAR table, `pp1' and/or `pp2' */
+ /* are already adjusted but unscaled */
+ if ( ( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) &&
+ IS_HINTED( loader->load_flags ) )
+ {
+ loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
+ loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
+ /* pp1.y and pp2.y are always zero */
+ }
+ else
#endif
{
loader->pp1 = outline->points[n_points - 4];
@@ -1112,9 +1119,17 @@
}
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- /* if we have a VVAR table, `pp3' and/or `pp4' are already adjusted */
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) ||
- !IS_HINTED( loader->load_flags ) )
+ /* if we have a VVAR table, `pp3' and/or `pp4' */
+ /* are already adjusted but unscaled */
+ if ( ( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) &&
+ IS_HINTED( loader->load_flags ) )
+ {
+ loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );
+ loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );
+ loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );
+ loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
+ }
+ else
#endif
{
loader->pp3 = outline->points[n_points - 2];
@@ -2287,13 +2302,14 @@
if ( face->vertical_info &&
face->vertical.number_Of_VMetrics > 0 )
{
- top = (FT_Short)FT_DivFix( loader->pp3.y - bbox.yMax,
+ top = (FT_Short)FT_DivFix( SUB_LONG( loader->pp3.y, bbox.yMax ),
y_scale );
if ( loader->pp3.y <= loader->pp4.y )
advance = 0;
else
- advance = (FT_UShort)FT_DivFix( loader->pp3.y - loader->pp4.y,
+ advance = (FT_UShort)FT_DivFix( SUB_LONG( loader->pp3.y,
+ loader->pp4.y ),
y_scale );
}
else
diff --git a/thirdparty/freetype/src/truetype/ttgload.h b/thirdparty/freetype/src/truetype/ttgload.h
index f1324bc862..9a8c3e71dd 100644
--- a/thirdparty/freetype/src/truetype/ttgload.h
+++ b/thirdparty/freetype/src/truetype/ttgload.h
@@ -4,7 +4,7 @@
*
* TrueType Glyph Loader (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttgxvar.c b/thirdparty/freetype/src/truetype/ttgxvar.c
index 78d87dc097..110f24a116 100644
--- a/thirdparty/freetype/src/truetype/ttgxvar.c
+++ b/thirdparty/freetype/src/truetype/ttgxvar.c
@@ -4,7 +4,7 @@
*
* TrueType GX Font Variation loader
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams.
*
* This file is part of the FreeType project, and may only be used,
@@ -1470,6 +1470,7 @@
FT_ULong table_len;
FT_ULong gvar_start;
FT_ULong offsetToData;
+ FT_ULong offsets_len;
GX_GVar_Head gvar_head;
static const FT_Frame_Field gvar_fields[] =
@@ -1530,9 +1531,13 @@
goto Exit;
}
- /* rough sanity check: offsets can be either 2 or 4 bytes */
- if ( (FT_ULong)gvar_head.glyphCount *
- ( ( gvar_head.flags & 1 ) ? 4 : 2 ) > table_len )
+ /* offsets can be either 2 or 4 bytes */
+ /* (one more offset than glyphs, to mark size of last) */
+ offsets_len = ( gvar_head.glyphCount + 1 ) *
+ ( ( gvar_head.flags & 1 ) ? 4L : 2L );
+
+ /* rough sanity check */
+ if (offsets_len > table_len )
{
FT_TRACE1(( "ft_var_load_gvar: invalid number of glyphs\n" ));
error = FT_THROW( Invalid_Table );
@@ -1541,81 +1546,102 @@
FT_TRACE2(( "loaded\n" ));
- blend->gvar_size = table_len;
- blend->tuplecount = gvar_head.globalCoordCount;
- blend->gv_glyphcnt = gvar_head.glyphCount;
- offsetToData = gvar_start + gvar_head.offsetToData;
+ blend->gvar_size = table_len;
+ offsetToData = gvar_start + gvar_head.offsetToData;
FT_TRACE5(( "gvar: there %s %d shared coordinate%s:\n",
- blend->tuplecount == 1 ? "is" : "are",
- blend->tuplecount,
- blend->tuplecount == 1 ? "" : "s" ));
+ gvar_head.globalCoordCount == 1 ? "is" : "are",
+ gvar_head.globalCoordCount,
+ gvar_head.globalCoordCount == 1 ? "" : "s" ));
- if ( FT_NEW_ARRAY( blend->glyphoffsets, blend->gv_glyphcnt + 1 ) )
+ if ( FT_FRAME_ENTER( offsets_len ) )
goto Exit;
+ /* offsets (one more offset than glyphs, to mark size of last) */
+ if ( FT_NEW_ARRAY( blend->glyphoffsets, gvar_head.glyphCount + 1 ) )
+ goto Fail2;
+
if ( gvar_head.flags & 1 )
{
- FT_ULong limit = gvar_start + table_len;
-
+ FT_ULong limit = gvar_start + table_len;
+ FT_ULong max_offset = 0;
- /* long offsets (one more offset than glyphs, to mark size of last) */
- if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 4L ) )
- goto Exit;
- for ( i = 0; i <= blend->gv_glyphcnt; i++ )
+ for ( i = 0; i <= gvar_head.glyphCount; i++ )
{
blend->glyphoffsets[i] = offsetToData + FT_GET_ULONG();
- /* use `>', not `>=' */
- if ( blend->glyphoffsets[i] > limit )
+
+ if ( max_offset <= blend->glyphoffsets[i] )
+ max_offset = blend->glyphoffsets[i];
+ else
{
FT_TRACE2(( "ft_var_load_gvar:"
- " invalid glyph variation data offset for index %d\n",
+ " glyph variation data offset %d not monotonic\n",
i ));
- error = FT_THROW( Invalid_Table );
- break;
+ blend->glyphoffsets[i] = max_offset;
+ }
+
+ /* use `<', not `<=' */
+ if ( limit < blend->glyphoffsets[i] )
+ {
+ FT_TRACE2(( "ft_var_load_gvar:"
+ " glyph variation data offset %d out of range\n",
+ i ));
+ blend->glyphoffsets[i] = limit;
}
}
}
else
{
- FT_ULong limit = gvar_start + table_len;
-
+ FT_ULong limit = gvar_start + table_len;
+ FT_ULong max_offset = 0;
- /* short offsets (one more offset than glyphs, to mark size of last) */
- if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 2L ) )
- goto Exit;
- for ( i = 0; i <= blend->gv_glyphcnt; i++ )
+ for ( i = 0; i <= gvar_head.glyphCount; i++ )
{
blend->glyphoffsets[i] = offsetToData + FT_GET_USHORT() * 2;
- /* use `>', not `>=' */
- if ( blend->glyphoffsets[i] > limit )
+
+ if ( max_offset <= blend->glyphoffsets[i] )
+ max_offset = blend->glyphoffsets[i];
+ else
{
FT_TRACE2(( "ft_var_load_gvar:"
- " invalid glyph variation data offset for index %d\n",
+ " glyph variation data offset %d not monotonic\n",
i ));
- error = FT_THROW( Invalid_Table );
- break;
+ blend->glyphoffsets[i] = max_offset;
+ }
+
+ /* use `<', not `<=' */
+ if ( limit < blend->glyphoffsets[i] )
+ {
+ FT_TRACE2(( "ft_var_load_gvar:"
+ " glyph variation data offset %d out of range\n",
+ i ));
+ blend->glyphoffsets[i] = limit;
}
}
}
+ blend->gv_glyphcnt = gvar_head.glyphCount;
+
FT_FRAME_EXIT();
- if ( error )
- goto Exit;
- if ( blend->tuplecount != 0 )
+ if ( gvar_head.globalCoordCount != 0 )
{
- if ( FT_NEW_ARRAY( blend->tuplecoords,
- gvar_head.axisCount * blend->tuplecount ) )
- goto Exit;
+ if ( FT_STREAM_SEEK( gvar_start + gvar_head.offsetToCoord ) ||
+ FT_FRAME_ENTER( gvar_head.globalCoordCount *
+ gvar_head.axisCount * 2L ) )
+ {
+ FT_TRACE2(( "ft_var_load_gvar:"
+ " glyph variation shared tuples missing\n" ));
+ goto Fail;
+ }
- if ( FT_STREAM_SEEK( gvar_start + gvar_head.offsetToCoord ) ||
- FT_FRAME_ENTER( blend->tuplecount * gvar_head.axisCount * 2L ) )
- goto Exit;
+ if ( FT_NEW_ARRAY( blend->tuplecoords,
+ gvar_head.axisCount * gvar_head.globalCoordCount ) )
+ goto Fail2;
- for ( i = 0; i < blend->tuplecount; i++ )
+ for ( i = 0; i < gvar_head.globalCoordCount; i++ )
{
FT_TRACE5(( " [ " ));
for ( j = 0; j < (FT_UInt)gvar_head.axisCount; j++ )
@@ -1628,6 +1654,8 @@
FT_TRACE5(( "]\n" ));
}
+ blend->tuplecount = gvar_head.globalCoordCount;
+
FT_TRACE5(( "\n" ));
FT_FRAME_EXIT();
@@ -1635,6 +1663,14 @@
Exit:
return error;
+
+ Fail2:
+ FT_FRAME_EXIT();
+
+ Fail:
+ FT_FREE( blend->glyphoffsets );
+ blend->gv_glyphcnt = 0;
+ goto Exit;
}
@@ -2127,7 +2163,7 @@
/* `fvar' table validity check in `sfnt_init_face' */
/* the various `*_size' variables, which we also use as */
- /* offsets into the `mmlen' array, must be multiples of the */
+ /* offsets into the `mmvar' array, must be multiples of the */
/* pointer size (except the last one); without such an */
/* alignment there might be runtime errors due to */
/* misaligned addresses */
@@ -3037,7 +3073,7 @@
TT_Set_Named_Instance( TT_Face face,
FT_UInt instance_index )
{
- FT_Error error = FT_ERR( Invalid_Argument );
+ FT_Error error;
GX_Blend blend;
FT_MM_Var* mmvar;
@@ -3057,7 +3093,10 @@
/* `instance_index' starts with value 1, thus `>' */
if ( instance_index > num_instances )
+ {
+ error = FT_ERR( Invalid_Argument );
goto Exit;
+ }
if ( instance_index > 0 )
{
@@ -3766,7 +3805,7 @@
blend->glyphoffsets[glyph_index + 1] )
{
FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:"
- " no variation data for this glyph\n" ));
+ " no variation data for glyph %d\n", glyph_index ));
return FT_Err_Ok;
}
diff --git a/thirdparty/freetype/src/truetype/ttgxvar.h b/thirdparty/freetype/src/truetype/ttgxvar.h
index 07c99b6403..11664e997a 100644
--- a/thirdparty/freetype/src/truetype/ttgxvar.h
+++ b/thirdparty/freetype/src/truetype/ttgxvar.h
@@ -4,7 +4,7 @@
*
* TrueType GX Font Variation loader (specification)
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2020 by
* David Turner, Robert Wilhelm, Werner Lemberg and George Williams.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttinterp.c b/thirdparty/freetype/src/truetype/ttinterp.c
index 70434e1729..3215040970 100644
--- a/thirdparty/freetype/src/truetype/ttinterp.c
+++ b/thirdparty/freetype/src/truetype/ttinterp.c
@@ -4,7 +4,7 @@
*
* TrueType bytecode interpreter (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -3718,7 +3718,7 @@
/* We will then parse the current table. */
rec = exc->FDefs;
- limit = rec + exc->numFDefs;
+ limit = FT_OFFSET( rec, exc->numFDefs );
n = (FT_ULong)args[0];
for ( ; rec < limit; rec++ )
@@ -3965,6 +3965,9 @@
if ( BOUNDSL( F, exc->maxFunc + 1 ) )
goto Fail;
+ if ( !exc->FDefs )
+ goto Fail;
+
/* Except for some old Apple fonts, all functions in a TrueType */
/* font are defined in increasing order, starting from 0. This */
/* means that we normally have */
@@ -4062,7 +4065,7 @@
/* */
/* If this isn't true, we need to look up the function table. */
- def = exc->FDefs + F;
+ def = FT_OFFSET( exc->FDefs, F );
if ( exc->maxFunc + 1 != exc->numFDefs || def->opc != F )
{
/* look up the FDefs table */
@@ -4070,7 +4073,7 @@
def = exc->FDefs;
- limit = def + exc->numFDefs;
+ limit = FT_OFFSET( def, exc->numFDefs );
while ( def < limit && def->opc != F )
def++;
@@ -4150,7 +4153,7 @@
/* First of all, look for the same function in our table */
def = exc->IDefs;
- limit = def + exc->numIDefs;
+ limit = FT_OFFSET( def, exc->numIDefs );
for ( ; def < limit; def++ )
if ( def->opc == (FT_ULong)args[0] )
@@ -6346,12 +6349,14 @@
/* twilight points (confirmed by Greg Hitchcock) */
if ( exc->GS.gep1 == 0 )
{
- exc->zp1.org[point].x = exc->zp0.org[exc->GS.rp0].x +
- TT_MulFix14( cvt_dist,
- exc->GS.freeVector.x );
- exc->zp1.org[point].y = exc->zp0.org[exc->GS.rp0].y +
- TT_MulFix14( cvt_dist,
- exc->GS.freeVector.y );
+ exc->zp1.org[point].x = ADD_LONG(
+ exc->zp0.org[exc->GS.rp0].x,
+ TT_MulFix14( cvt_dist,
+ exc->GS.freeVector.x ) );
+ exc->zp1.org[point].y = ADD_LONG(
+ exc->zp0.org[exc->GS.rp0].y,
+ TT_MulFix14( cvt_dist,
+ exc->GS.freeVector.y ) );
exc->zp1.cur[point] = exc->zp1.org[point];
}
@@ -7715,7 +7720,7 @@
Ins_UNKNOWN( TT_ExecContext exc )
{
TT_DefRecord* def = exc->IDefs;
- TT_DefRecord* limit = def + exc->numIDefs;
+ TT_DefRecord* limit = FT_OFFSET( def, exc->numIDefs );
for ( ; def < limit; def++ )
@@ -7867,7 +7872,7 @@
FT_MAX( 50,
exc->cvtSize / 10 );
else
- exc->loopcall_counter_max = 300 + 8 * exc->cvtSize;
+ exc->loopcall_counter_max = 300 + 22 * exc->cvtSize;
/* as a protection against an unreasonable number of CVT entries */
/* we assume at most 100 control values per glyph for the counter */
@@ -8567,7 +8572,7 @@
case FT_ERR( Invalid_Opcode ):
{
TT_DefRecord* def = exc->IDefs;
- TT_DefRecord* limit = def + exc->numIDefs;
+ TT_DefRecord* limit = FT_OFFSET( def, exc->numIDefs );
for ( ; def < limit; def++ )
diff --git a/thirdparty/freetype/src/truetype/ttinterp.h b/thirdparty/freetype/src/truetype/ttinterp.h
index 0cb1e892fb..07e4ad6891 100644
--- a/thirdparty/freetype/src/truetype/ttinterp.h
+++ b/thirdparty/freetype/src/truetype/ttinterp.h
@@ -4,7 +4,7 @@
*
* TrueType bytecode interpreter (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttobjs.c b/thirdparty/freetype/src/truetype/ttobjs.c
index e4775a51ed..730a5b8cdf 100644
--- a/thirdparty/freetype/src/truetype/ttobjs.c
+++ b/thirdparty/freetype/src/truetype/ttobjs.c
@@ -4,7 +4,7 @@
*
* Objects manager (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttobjs.h b/thirdparty/freetype/src/truetype/ttobjs.h
index 9fc654d5d1..7c3fc7ef8a 100644
--- a/thirdparty/freetype/src/truetype/ttobjs.h
+++ b/thirdparty/freetype/src/truetype/ttobjs.h
@@ -4,7 +4,7 @@
*
* Objects manager (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttpload.c b/thirdparty/freetype/src/truetype/ttpload.c
index bc954c2dba..d35393a8b0 100644
--- a/thirdparty/freetype/src/truetype/ttpload.c
+++ b/thirdparty/freetype/src/truetype/ttpload.c
@@ -4,7 +4,7 @@
*
* TrueType-specific tables loader (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -633,7 +633,7 @@
FT_UInt nn;
FT_Byte* result = NULL;
FT_ULong record_size = face->hdmx_record_size;
- FT_Byte* record = face->hdmx_table + 8;
+ FT_Byte* record = FT_OFFSET( face->hdmx_table, 8 );
for ( nn = 0; nn < face->hdmx_record_count; nn++ )
diff --git a/thirdparty/freetype/src/truetype/ttpload.h b/thirdparty/freetype/src/truetype/ttpload.h
index 022750e324..3bbd4add19 100644
--- a/thirdparty/freetype/src/truetype/ttpload.h
+++ b/thirdparty/freetype/src/truetype/ttpload.h
@@ -4,7 +4,7 @@
*
* TrueType-specific tables loader (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttsubpix.c b/thirdparty/freetype/src/truetype/ttsubpix.c
index 23a2e5b440..8289818863 100644
--- a/thirdparty/freetype/src/truetype/ttsubpix.c
+++ b/thirdparty/freetype/src/truetype/ttsubpix.c
@@ -4,7 +4,7 @@
*
* TrueType Subpixel Hinting.
*
- * Copyright (C) 2010-2019 by
+ * Copyright (C) 2010-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/truetype/ttsubpix.h b/thirdparty/freetype/src/truetype/ttsubpix.h
index 4966800c2d..23adf7e8d8 100644
--- a/thirdparty/freetype/src/truetype/ttsubpix.h
+++ b/thirdparty/freetype/src/truetype/ttsubpix.h
@@ -4,7 +4,7 @@
*
* TrueType Subpixel Hinting.
*
- * Copyright (C) 2010-2019 by
+ * Copyright (C) 2010-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/module.mk b/thirdparty/freetype/src/type1/module.mk
index 2f48c65821..cffb774b45 100644
--- a/thirdparty/freetype/src/type1/module.mk
+++ b/thirdparty/freetype/src/type1/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/type1/rules.mk b/thirdparty/freetype/src/type1/rules.mk
index 901169c7a5..213e619247 100644
--- a/thirdparty/freetype/src/type1/rules.mk
+++ b/thirdparty/freetype/src/type1/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/type1/t1afm.c b/thirdparty/freetype/src/type1/t1afm.c
index 6841184539..0866e7bf97 100644
--- a/thirdparty/freetype/src/type1/t1afm.c
+++ b/thirdparty/freetype/src/type1/t1afm.c
@@ -4,7 +4,7 @@
*
* AFM support for Type 1 fonts (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1afm.h b/thirdparty/freetype/src/type1/t1afm.h
index a8e6a5495a..40ce8f9754 100644
--- a/thirdparty/freetype/src/type1/t1afm.h
+++ b/thirdparty/freetype/src/type1/t1afm.h
@@ -4,7 +4,7 @@
*
* AFM support for Type 1 fonts (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1driver.c b/thirdparty/freetype/src/type1/t1driver.c
index 557733da3b..75a5698e8d 100644
--- a/thirdparty/freetype/src/type1/t1driver.c
+++ b/thirdparty/freetype/src/type1/t1driver.c
@@ -4,7 +4,7 @@
*
* Type 1 driver interface (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1driver.h b/thirdparty/freetype/src/type1/t1driver.h
index 206f64a0bc..84b3e041c4 100644
--- a/thirdparty/freetype/src/type1/t1driver.h
+++ b/thirdparty/freetype/src/type1/t1driver.h
@@ -4,7 +4,7 @@
*
* High-level Type 1 driver interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1errors.h b/thirdparty/freetype/src/type1/t1errors.h
index b35f67a24c..1b119b843a 100644
--- a/thirdparty/freetype/src/type1/t1errors.h
+++ b/thirdparty/freetype/src/type1/t1errors.h
@@ -4,7 +4,7 @@
*
* Type 1 error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1gload.c b/thirdparty/freetype/src/type1/t1gload.c
index f9b115b186..fcaf66c401 100644
--- a/thirdparty/freetype/src/type1/t1gload.c
+++ b/thirdparty/freetype/src/type1/t1gload.c
@@ -4,7 +4,7 @@
*
* Type 1 Glyph Loader (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1gload.h b/thirdparty/freetype/src/type1/t1gload.h
index 80440369dc..59fae82b6d 100644
--- a/thirdparty/freetype/src/type1/t1gload.h
+++ b/thirdparty/freetype/src/type1/t1gload.h
@@ -4,7 +4,7 @@
*
* Type 1 Glyph Loader (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1load.c b/thirdparty/freetype/src/type1/t1load.c
index 5cffdfaac4..d0ea36badb 100644
--- a/thirdparty/freetype/src/type1/t1load.c
+++ b/thirdparty/freetype/src/type1/t1load.c
@@ -4,7 +4,7 @@
*
* Type 1 font loader (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -309,31 +309,55 @@
FT_UInt i;
FT_Fixed axiscoords[T1_MAX_MM_AXIS];
PS_Blend blend = face->blend;
+ FT_UShort* axis_flags;
+
+ FT_Offset mmvar_size;
+ FT_Offset axis_flags_size;
+ FT_Offset axis_size;
error = T1_Get_Multi_Master( face, &mmaster );
if ( error )
goto Exit;
- if ( FT_ALLOC( mmvar,
- sizeof ( FT_MM_Var ) +
- mmaster.num_axis * sizeof ( FT_Var_Axis ) ) )
+
+ /* the various `*_size' variables, which we also use as */
+ /* offsets into the `mmvar' array, must be multiples of the */
+ /* pointer size (except the last one); without such an */
+ /* alignment there might be runtime errors due to */
+ /* misaligned addresses */
+#undef ALIGN_SIZE
+#define ALIGN_SIZE( n ) \
+ ( ( (n) + sizeof (void*) - 1 ) & ~( sizeof (void*) - 1 ) )
+
+ mmvar_size = ALIGN_SIZE( sizeof ( FT_MM_Var ) );
+ axis_flags_size = ALIGN_SIZE( mmaster.num_axis *
+ sizeof ( FT_UShort ) );
+ axis_size = mmaster.num_axis * sizeof ( FT_Var_Axis );
+
+ if ( FT_ALLOC( mmvar, mmvar_size +
+ axis_flags_size +
+ axis_size ) )
goto Exit;
mmvar->num_axis = mmaster.num_axis;
mmvar->num_designs = mmaster.num_designs;
mmvar->num_namedstyles = 0; /* Not supported */
- mmvar->axis = (FT_Var_Axis*)&mmvar[1];
- /* Point to axes after MM_Var struct */
- mmvar->namedstyle = NULL;
+
+ /* while axis flags are meaningless here, we have to provide the array */
+ /* to make `FT_Get_Var_Axis_Flags' work: the function expects that the */
+ /* values directly follow the data of `FT_MM_Var' */
+ axis_flags = (FT_UShort*)( (char*)mmvar + mmvar_size );
+ for ( i = 0; i < mmaster.num_axis; i++ )
+ axis_flags[i] = 0;
+
+ mmvar->axis = (FT_Var_Axis*)( (char*)axis_flags + axis_flags_size );
+ mmvar->namedstyle = NULL;
for ( i = 0; i < mmaster.num_axis; i++ )
{
mmvar->axis[i].name = mmaster.axis[i].name;
mmvar->axis[i].minimum = INT_TO_FIXED( mmaster.axis[i].minimum );
mmvar->axis[i].maximum = INT_TO_FIXED( mmaster.axis[i].maximum );
- mmvar->axis[i].def = ( mmvar->axis[i].minimum +
- mmvar->axis[i].maximum ) / 2;
- /* Does not apply. But this value is in range */
mmvar->axis[i].strid = ~0U; /* Does not apply */
mmvar->axis[i].tag = ~0U; /* Does not apply */
diff --git a/thirdparty/freetype/src/type1/t1load.h b/thirdparty/freetype/src/type1/t1load.h
index 44f835bde2..9cac0f6fb6 100644
--- a/thirdparty/freetype/src/type1/t1load.h
+++ b/thirdparty/freetype/src/type1/t1load.h
@@ -4,7 +4,7 @@
*
* Type 1 font loader (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1objs.c b/thirdparty/freetype/src/type1/t1objs.c
index 741388a645..80ee0e265e 100644
--- a/thirdparty/freetype/src/type1/t1objs.c
+++ b/thirdparty/freetype/src/type1/t1objs.c
@@ -4,7 +4,7 @@
*
* Type 1 objects manager (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1objs.h b/thirdparty/freetype/src/type1/t1objs.h
index 2161091f77..6bc902cc89 100644
--- a/thirdparty/freetype/src/type1/t1objs.h
+++ b/thirdparty/freetype/src/type1/t1objs.h
@@ -4,7 +4,7 @@
*
* Type 1 objects manager (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1parse.c b/thirdparty/freetype/src/type1/t1parse.c
index 56caeb9e40..ec30355bf8 100644
--- a/thirdparty/freetype/src/type1/t1parse.c
+++ b/thirdparty/freetype/src/type1/t1parse.c
@@ -4,7 +4,7 @@
*
* Type 1 parser (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1parse.h b/thirdparty/freetype/src/type1/t1parse.h
index dab8fddc8b..edf79b0a8b 100644
--- a/thirdparty/freetype/src/type1/t1parse.h
+++ b/thirdparty/freetype/src/type1/t1parse.h
@@ -4,7 +4,7 @@
*
* Type 1 parser (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/t1tokens.h b/thirdparty/freetype/src/type1/t1tokens.h
index 97f2dbe0cf..c09420355d 100644
--- a/thirdparty/freetype/src/type1/t1tokens.h
+++ b/thirdparty/freetype/src/type1/t1tokens.h
@@ -4,7 +4,7 @@
*
* Type 1 tokenizer (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type1/type1.c b/thirdparty/freetype/src/type1/type1.c
index ce8557a5fb..95dbaeb501 100644
--- a/thirdparty/freetype/src/type1/type1.c
+++ b/thirdparty/freetype/src/type1/type1.c
@@ -4,7 +4,7 @@
*
* FreeType Type 1 driver component (body only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/module.mk b/thirdparty/freetype/src/type42/module.mk
index 9e9d15455b..6ef3a95ead 100644
--- a/thirdparty/freetype/src/type42/module.mk
+++ b/thirdparty/freetype/src/type42/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2002-2019 by
+# Copyright (C) 2002-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/type42/rules.mk b/thirdparty/freetype/src/type42/rules.mk
index 9d71f5300e..f4ce91a3b7 100644
--- a/thirdparty/freetype/src/type42/rules.mk
+++ b/thirdparty/freetype/src/type42/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2002-2019 by
+# Copyright (C) 2002-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/type42/t42drivr.c b/thirdparty/freetype/src/type42/t42drivr.c
index 09ad632e97..4b2cab3474 100644
--- a/thirdparty/freetype/src/type42/t42drivr.c
+++ b/thirdparty/freetype/src/type42/t42drivr.c
@@ -4,7 +4,7 @@
*
* High-level Type 42 driver interface (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* Roberto Alameda.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/t42drivr.h b/thirdparty/freetype/src/type42/t42drivr.h
index a35ca28f84..7e7ec70f9d 100644
--- a/thirdparty/freetype/src/type42/t42drivr.h
+++ b/thirdparty/freetype/src/type42/t42drivr.h
@@ -4,7 +4,7 @@
*
* High-level Type 42 driver interface (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* Roberto Alameda.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/t42error.h b/thirdparty/freetype/src/type42/t42error.h
index 5fb2143949..6d3617e927 100644
--- a/thirdparty/freetype/src/type42/t42error.h
+++ b/thirdparty/freetype/src/type42/t42error.h
@@ -4,7 +4,7 @@
*
* Type 42 error codes (specification only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/t42objs.c b/thirdparty/freetype/src/type42/t42objs.c
index d31bace451..8d1e63ffc7 100644
--- a/thirdparty/freetype/src/type42/t42objs.c
+++ b/thirdparty/freetype/src/type42/t42objs.c
@@ -4,7 +4,7 @@
*
* Type 42 objects manager (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* Roberto Alameda.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/t42objs.h b/thirdparty/freetype/src/type42/t42objs.h
index 98300cf348..ecb495e8f0 100644
--- a/thirdparty/freetype/src/type42/t42objs.h
+++ b/thirdparty/freetype/src/type42/t42objs.h
@@ -4,7 +4,7 @@
*
* Type 42 objects manager (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* Roberto Alameda.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/t42parse.c b/thirdparty/freetype/src/type42/t42parse.c
index c47a77786d..7f26d04170 100644
--- a/thirdparty/freetype/src/type42/t42parse.c
+++ b/thirdparty/freetype/src/type42/t42parse.c
@@ -4,7 +4,7 @@
*
* Type 42 font parser (body).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* Roberto Alameda.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/t42parse.h b/thirdparty/freetype/src/type42/t42parse.h
index 0c7bb48496..de54a46cf1 100644
--- a/thirdparty/freetype/src/type42/t42parse.h
+++ b/thirdparty/freetype/src/type42/t42parse.h
@@ -4,7 +4,7 @@
*
* Type 42 font parser (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* Roberto Alameda.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/t42types.h b/thirdparty/freetype/src/type42/t42types.h
index a258144ec3..f66f09db87 100644
--- a/thirdparty/freetype/src/type42/t42types.h
+++ b/thirdparty/freetype/src/type42/t42types.h
@@ -4,7 +4,7 @@
*
* Type 42 font data types (specification only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* Roberto Alameda.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/type42/type42.c b/thirdparty/freetype/src/type42/type42.c
index 0cb7b77eec..4739b3c333 100644
--- a/thirdparty/freetype/src/type42/type42.c
+++ b/thirdparty/freetype/src/type42/type42.c
@@ -4,7 +4,7 @@
*
* FreeType Type 42 driver component.
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/winfonts/fnterrs.h b/thirdparty/freetype/src/winfonts/fnterrs.h
index af29307c75..f98e68435b 100644
--- a/thirdparty/freetype/src/winfonts/fnterrs.h
+++ b/thirdparty/freetype/src/winfonts/fnterrs.h
@@ -4,7 +4,7 @@
*
* Win FNT/FON error codes (specification only).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/thirdparty/freetype/src/winfonts/module.mk b/thirdparty/freetype/src/winfonts/module.mk
index 82fb0151f8..4614c55fd0 100644
--- a/thirdparty/freetype/src/winfonts/module.mk
+++ b/thirdparty/freetype/src/winfonts/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/winfonts/rules.mk b/thirdparty/freetype/src/winfonts/rules.mk
index 998d49bc9f..e73ef5ea99 100644
--- a/thirdparty/freetype/src/winfonts/rules.mk
+++ b/thirdparty/freetype/src/winfonts/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 1996-2019 by
+# Copyright (C) 1996-2020 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/thirdparty/freetype/src/winfonts/winfnt.c b/thirdparty/freetype/src/winfonts/winfnt.c
index 2d771be2cc..9b466e8f28 100644
--- a/thirdparty/freetype/src/winfonts/winfnt.c
+++ b/thirdparty/freetype/src/winfonts/winfnt.c
@@ -4,7 +4,7 @@
*
* FreeType font driver for Windows FNT/FON files
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
* Copyright 2003 Huw D M Davies for Codeweavers
* Copyright 2007 Dmitry Timoshkov for Codeweavers
@@ -331,7 +331,7 @@
{
FT_TRACE2(( "invalid alignment shift count for resource data\n" ));
error = FT_THROW( Invalid_File_Format );
- goto Exit;
+ goto Exit1;
}
@@ -597,6 +597,10 @@
Exit:
return error;
+
+ Exit1:
+ FT_FRAME_EXIT();
+ goto Exit;
}
diff --git a/thirdparty/freetype/src/winfonts/winfnt.h b/thirdparty/freetype/src/winfonts/winfnt.h
index b628ad4c42..391f4448a7 100644
--- a/thirdparty/freetype/src/winfonts/winfnt.h
+++ b/thirdparty/freetype/src/winfonts/winfnt.h
@@ -4,7 +4,7 @@
*
* FreeType font driver for Windows FNT/FON files
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
* Copyright 2007 Dmitry Timoshkov for Codeweavers
*
diff --git a/thirdparty/jpeg-compressor/jpgd.cpp b/thirdparty/jpeg-compressor/jpgd.cpp
index 257d0b7574..baf6ea0484 100644
--- a/thirdparty/jpeg-compressor/jpgd.cpp
+++ b/thirdparty/jpeg-compressor/jpgd.cpp
@@ -37,16 +37,14 @@
#ifndef JPGD_USE_SSE2
- #if defined(__GNUC__)
-
- #if (defined(__x86_64__) || defined(_M_X64))
- #if defined(__SSE2__)
- #define JPGD_USE_SSE2 (1)
- #endif
+ #if defined(__GNUC__)
+ #if defined(__SSE2__)
+ #define JPGD_USE_SSE2 (1)
+ #endif
+ #elif defined(_MSC_VER)
+ #if defined(_M_X64)
+ #define JPGD_USE_SSE2 (1)
#endif
-
- #else
- #define JPGD_USE_SSE2 (1)
#endif
#endif
diff --git a/thirdparty/jpeg-compressor/patches/fix-msvc-sse2-detection.patch b/thirdparty/jpeg-compressor/patches/fix-msvc-sse2-detection.patch
new file mode 100644
index 0000000000..830b03b0c0
--- /dev/null
+++ b/thirdparty/jpeg-compressor/patches/fix-msvc-sse2-detection.patch
@@ -0,0 +1,44 @@
+From ae74fa2fcdef8ec44b925a649f66e8cbefce8315 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com>
+Date: Thu, 7 May 2020 12:14:09 +0200
+Subject: [PATCH] Fix detection of SSE2 with Visual Studio
+
+The previous code assumed that SSE2 is available when building with
+Visual Studio, but that's not accurate on ARM with UWP.
+
+SSE2 could also be enabled on x86 if `_M_IX86_FP == 2`, but it requires
+checking first that it's not actually set to 2 for AVX, AVX2 or AVX512
+(see https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019),
+so I left it out for this quick fix.
+---
+ jpgd.cpp | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/jpgd.cpp b/jpgd.cpp
+index 91e66ad..db1f3b4 100644
+--- a/jpgd.cpp
++++ b/jpgd.cpp
+@@ -37,16 +37,14 @@
+
+ #ifndef JPGD_USE_SSE2
+
+- #if defined(__GNUC__)
+-
+- #if (defined(__x86_64__) || defined(_M_X64))
+- #if defined(__SSE2__)
+- #define JPGD_USE_SSE2 (1)
+- #endif
++ #if defined(__GNUC__)
++ #if defined(__SSE2__)
++ #define JPGD_USE_SSE2 (1)
++ #endif
++ #elif defined(_MSC_VER)
++ #if defined(_M_X64)
++ #define JPGD_USE_SSE2 (1)
+ #endif
+-
+- #else
+- #define JPGD_USE_SSE2 (1)
+ #endif
+
+ #endif
diff --git a/thirdparty/vhacd/0005-fix-scale-calculation.patch b/thirdparty/vhacd/0005-fix-scale-calculation.patch
new file mode 100644
index 0000000000..4b05f64fbf
--- /dev/null
+++ b/thirdparty/vhacd/0005-fix-scale-calculation.patch
@@ -0,0 +1,20 @@
+diff --git a/thirdparty/vhacd/inc/vhacdVolume.h b/thirdparty/vhacd/inc/vhacdVolume.h
+index 8c47fa1e2c..c445f20122 100644
+--- a/thirdparty/vhacd/inc/vhacdVolume.h
++++ b/thirdparty/vhacd/inc/vhacdVolume.h
+@@ -316,13 +316,13 @@ void Volume::Voxelize(const T* const points, const uint32_t stridePoints, const
+
+ double d[3] = { m_maxBB[0] - m_minBB[0], m_maxBB[1] - m_minBB[1], m_maxBB[2] - m_minBB[2] };
+ double r;
+- if (d[0] > d[1] && d[0] > d[2]) {
++ if (d[0] >= d[1] && d[0] >= d[2]) {
+ r = d[0];
+ m_dim[0] = dim;
+ m_dim[1] = 2 + static_cast<size_t>(dim * d[1] / d[0]);
+ m_dim[2] = 2 + static_cast<size_t>(dim * d[2] / d[0]);
+ }
+- else if (d[1] > d[0] && d[1] > d[2]) {
++ else if (d[1] >= d[0] && d[1] >= d[2]) {
+ r = d[1];
+ m_dim[1] = dim;
+ m_dim[0] = 2 + static_cast<size_t>(dim * d[0] / d[1]);
diff --git a/thirdparty/vhacd/inc/vhacdVolume.h b/thirdparty/vhacd/inc/vhacdVolume.h
index 8c47fa1e2c..c445f20122 100644
--- a/thirdparty/vhacd/inc/vhacdVolume.h
+++ b/thirdparty/vhacd/inc/vhacdVolume.h
@@ -316,13 +316,13 @@ void Volume::Voxelize(const T* const points, const uint32_t stridePoints, const
double d[3] = { m_maxBB[0] - m_minBB[0], m_maxBB[1] - m_minBB[1], m_maxBB[2] - m_minBB[2] };
double r;
- if (d[0] > d[1] && d[0] > d[2]) {
+ if (d[0] >= d[1] && d[0] >= d[2]) {
r = d[0];
m_dim[0] = dim;
m_dim[1] = 2 + static_cast<size_t>(dim * d[1] / d[0]);
m_dim[2] = 2 + static_cast<size_t>(dim * d[2] / d[0]);
}
- else if (d[1] > d[0] && d[1] > d[2]) {
+ else if (d[1] >= d[0] && d[1] >= d[2]) {
r = d[1];
m_dim[1] = dim;
m_dim[0] = 2 + static_cast<size_t>(dim * d[0] / d[1]);