[Bf-blender-cvs] [0c4bc09092d] master: Docs: comment text scale behavior
Campbell Barton
noreply at git.blender.org
Tue Jun 9 07:19:55 CEST 2020
Commit: 0c4bc09092de6a948a6cc46da3b2f1fcc31ed8f7
Author: Campbell Barton
Date: Tue Jun 9 15:17:13 2020 +1000
Branches: master
https://developer.blender.org/rB0c4bc09092de6a948a6cc46da3b2f1fcc31ed8f7
Docs: comment text scale behavior
Avoid misunderstanding that caused T77609.
===================================================================
M source/blender/blenkernel/intern/font.c
===================================================================
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 34bb328bde0..5f59666a28a 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -673,6 +673,16 @@ struct TempLineInfo {
int wspace_nr; /* number of whitespaces of line */
};
+/* -------------------------------------------------------------------- */
+/** \name VFont Scale Overflow
+ *
+ * Scale the font to fit inside #TextBox bounds.
+ *
+ * - Scale horizontally when #TextBox.h is zero,
+ * otherwise scale vertically, allowing the text to wrap horizontally.
+ * - Never increase scale to fit, only ever scale on overflow.
+ * \{ */
+
typedef struct VFontToCurveIter {
int iteraction;
float scale_to_fit;
@@ -694,6 +704,8 @@ enum {
#define FONT_TO_CURVE_SCALE_ITERATIONS 20
#define FONT_TO_CURVE_SCALE_THRESHOLD 0.0001f
+/** \} */
+
/**
* Font metric values explained:
*
More information about the Bf-blender-cvs
mailing list