Page MenuHome

VSE: Allow Wingdings and Symbol Fonts
ClosedPublic

Authored by Harley Acheson (harley) on Aug 4 2021, 12:10 AM.

Details

Summary

Our treatment of font encodings is a little odd. This fixes and unifies it a bit to allow more font types throughout blender, especially in the VSE. Following shows Wingdings not working in VSE on the left (current), but working on the right (patch):

When loading fonts for 3D Text objects we current don't set an encoding by default, so we get what FreeType thinks is best. If there are no characters using that encoding we look through the Character Maps for FT_ENCODING_APPLE_ROMAN and use that if available, or error out.

For uses outside of 3D text objects we try explicitly to set FT_ENCODING_UNICODE and if that does not work we error out. This is overly strict. There are many older or oddball fonts that FreeType will use just fine. Without a unicode character map most of these fonts just map the letters A-z to the glyphs, which works great.

Note this patch also changes the usage of deprecated ft_encoding_unicode to recommended FT_ENCODING_UNICODE.

Note also that these fonts will also preview correctly with https://developer.blender.org/D12032

Diff Detail

Repository
rB Blender