Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2022-10-17 18:35:11 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-10-17 18:35:11 +0300
commit694481095baca58d13474aed26ee7619615399b2 (patch)
tree93d972c86ee898a05319870fea9637dce90b2a1c /source/blender
parent660c47596e17229dbadca2b129767ec9a17338e9 (diff)
Fix for T101506: BLF Disable Kerning in Main Font
Disable kerning in our main font to exactly restore the spacing of text as seen in Blender 3.1 - 3.3 See D16186 for more details. Differential Revision: https://developer.blender.org/D16186 Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenfont/intern/blf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index a673f4a1bc7..d4f5be617fd 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -162,6 +162,14 @@ int BLF_load_unique(const char *name)
}
FontBLF *font = blf_font_new(name, filepath);
+
+ /* XXX: Temporarily disable kerning in our main font. Kerning had been accidentally removed from
+ * our font in 3.1. In 3.4 we disable kerning here in the new version to keep spacing the same
+ * (T101506). Enable again later with change of font, placement, or rendering - Harley. */
+ if (font && BLI_str_endswith(filepath, BLF_DEFAULT_PROPORTIONAL_FONT)) {
+ font->face_flags &= ~FT_FACE_FLAG_KERNING;
+ }
+
MEM_freeN(filepath);
if (!font) {