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
This commit is contained in:
Harley Acheson
2022-10-17 08:35:11 -07:00
parent 660c47596e
commit 694481095b

View File

@@ -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) {