From b32e8d63d8d3bfe65f6692ff15f5a82171a8bf61 Mon Sep 17 00:00:00 2001
From: bruvzg <7645683+bruvzg@users.noreply.github.com>
Date: Fri, 11 Mar 2022 09:31:16 +0200
Subject: Add options to embolden and transform font outlines to simulate bold
and italic typefaces.
---
doc/classes/FontData.xml | 7 +++++++
doc/classes/TextServer.xml | 31 +++++++++++++++++++++++++++++++
doc/classes/TextServerExtension.xml | 31 +++++++++++++++++++++++++++++++
3 files changed, 69 insertions(+)
(limited to 'doc/classes')
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index ccaefc60ee..9344a1fe80 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -567,6 +567,9 @@
Contents of the dynamic font source file.
+
+ If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+
Font size, used only for the bitmap fonts.
@@ -603,5 +606,9 @@
Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
+
+ 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
+ For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
+
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 3157eea436..020c30b9cd 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -112,6 +112,13 @@
Returns the font descent (number of pixels below the baseline).
+
+
+
+
+ Returns font embolden strength.
+
+
@@ -368,6 +375,13 @@
Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+
+
+
+
+ Returns 2D transform applied to the font outlines.
+
+
@@ -542,6 +556,14 @@
Sets the font descent (number of pixels below the baseline).
+
+
+
+
+
+ Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+
+
@@ -765,6 +787,15 @@
Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+
+
+
+
+
+ Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
+ For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
+
+
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index f730f28e79..5ffd80bf63 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -112,6 +112,13 @@
Returns the font descent (number of pixels below the baseline).
+
+
+
+
+ Returns font embolden strength.
+
+
@@ -368,6 +375,13 @@
Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+
+
+
+
+ Retruns 2D transform applied to the font outlines.
+
+
@@ -551,6 +565,14 @@
Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
+
+
+
+
+
+ Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+
+
@@ -773,6 +795,15 @@
Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+
+
+
+
+
+ Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
+ For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
+
+
--
cgit v1.2.3