Page MenuHome

Fix T100823: Do Not Load Non-Scalable Fonts
ClosedPublic

Authored by Harley Acheson (harley) on Sep 5 2022, 8:12 PM.

Details

Summary

Do not allow the loading of old-style non-scalable fonts.


We can't use fonts that aren't made from scalable vector outlines. We need unlimited sizes for the interface, and we need outlines to convert to curves for 3D text objects. This patch just disallows the loading of very old types of fonts that are made of bitmaps of fixed sizes. These are mostly ".fon" files, which we don't include when filtering for font types, but FreeType will load if you turn filtering off. These types of files result in an exception inside of FreeType's FTC_Manager_LookupSize (when the caching subsystem is used).

Note that some new(ish) types of fonts can be scalable and also have bitmaps in fixed sizes. This does not affect those.

Although this seems to only add a console print of "Font is not scalable", we also get an additional "Can't load font: C:\WINDOWS\Fonts\85f874.fon" printed afterward.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) edited the summary of this revision. (Show Details)Sep 5 2022, 8:19 PM
This revision is now accepted and ready to land.Sep 6 2022, 4:25 PM