Page MenuHome

UI: VFont Display Names
ClosedPublic

Authored by Harley Acheson (harley) on Jul 28 2021, 10:43 PM.

Details

Summary

The the commit of D12020 we are now showing a friendly display name for fonts in the File Browser, rather than just the file name. This matches how fonts are displayed to users in most programs and operating systems.

This patch makes the display of vfonts (used for 3D text objects) use the same name format. They currently show in a format that uses FT_Get_Postscript_Name(), which is a bit of an in-between, neither file name nor display name. But nice to have them match.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Jul 28 2021, 10:43 PM
Harley Acheson (harley) created this revision.
Harley Acheson (harley) edited the summary of this revision. (Show Details)Aug 4 2021, 12:10 AM
Campbell Barton (campbellbarton) added inline comments.
source/blender/blenlib/intern/freetypefont.c
303

Not a new issue, but since it's come to my attention, this should use:

BLI_strncpy_utf8 or call BLI_utf8_invalid_strip after BLI_snprintf.

This revision is now accepted and ready to land.Aug 4 2021, 2:22 AM
source/blender/blenlib/intern/freetypefont.c
303

Edit, this can be fixed separately from this commit.

As per Campbell, dealing with possibility of invalid utf-8 sequence.

This revision was automatically updated to reflect the committed changes.