Maniphest T71484

Text object font picker UI
Confirmed, NormalDESIGN

Assigned To
None
Authored By
Campbell Barton (campbellbarton)
Nov 11 2019, 3:38 AM
Tags
  • User Interface
  • Modeling
  • BF Blender
Subscribers
Arvind R (r-arvind)
Campbell Barton (campbellbarton)
Evan Wilson (EAW)
Peter Fog (tintwotin)
Tokens
"Love" token, awarded by raksa."Love" token, awarded by mindinsomnia."Love" token, awarded by Arken."Love" token, awarded by girafic."Love" token, awarded by davidsikes."Love" token, awarded by EAW."Burninate" token, awarded by xdanic."Like" token, awarded by franMarz."Like" token, awarded by threedslider."Love" token, awarded by Tetone.

Description

Currently selecting a file to pick font's is not very convenient.

We can improve this by:

  • Automatically scanning the various system font folders, depending on the OS
  • Using auto-generated named previews, which are cached so we don't need to re-generate each time the menu opens
  • Presenting a single menu of fonts to the user

Example:

Event Timeline

Campbell Barton (campbellbarton) triaged this task as 30 priority.Nov 11 2019, 3:38 AM
Campbell Barton (campbellbarton) created this task.
Campbell Barton (campbellbarton) mentioned this in T68887: Text object editing rich text and UI/UX.
Campbell Barton (campbellbarton) mentioned this in T63731: Modeling Module.Nov 11 2019, 3:43 AM
William Reynish (billreynish) raised the priority of this task from 30 to Normal.Nov 11 2019, 7:43 AM
William Reynish (billreynish) updated the task description.
stefano severi (Tetone) awarded a token.Nov 11 2019, 8:16 AM
Laurent Le Flem (threedslider) awarded a token.Nov 12 2019, 1:01 AM
Fran Marz (franMarz) awarded a token.Nov 12 2019, 1:31 AM
Daniel Calderón (xdanic) awarded a token.Nov 20 2019, 4:31 PM
Evan Wilson (EAW) awarded a token.Feb 25 2020, 7:27 PM
Evan Wilson (EAW) added a subscriber: Evan Wilson (EAW).
Arvind R (r-arvind) added a subscriber: Arvind R (r-arvind).Apr 7 2020, 8:29 AM

Hi, I would like to work on this task.

So essentially there are two ways to implement this:

  1. Make a list of the folders where system fonts are usually present in that specific OS. For example, in Linux, fonts are present in "/usr/share/fonts" or "/usr/local/share/fonts". We can scan those directories and get the list of font families. It has been implemented here in typescript. It can be used as reference.
  1. Use OS specific APIs for fetching the font information. For example, Linux comes with fontconfig, Mac has CoreText etc. We can use these APIs instead of manually scanning the folders. It has been implemented in C++ in this repo and can be used for reference.

Once we implement this, we can put it in a function called BKE_get_system_fonts in blender/blenderkernel/BKE_font.h. This function will return a struct (or an array of structs) containing the catalog of fonts-families.

Initially we can just print these values on to the terminal. Once everything works properly and integrates well with blender, we can expose these values in the property editor. Then we can implement additional features like font caching, font preview etc.

David Sikes (davidsikes) awarded a token.Apr 18 2020, 3:51 PM
Bastien Montagne (mont29) added projects: Modeling, BF Blender.Aug 14 2020, 10:17 AM
Peter Fog (tintwotin) added a subscriber: Peter Fog (tintwotin).Aug 14 2020, 10:49 AM

If this is to be implemented, please consider also implementing it in the Video Editor Text Strips:

Bastien Montagne (mont29) moved this task from Backlog to Medium Term on the Modeling board.Aug 14 2020, 5:42 PM
Stas (girafic) awarded a token.Sep 28 2020, 10:44 AM
Arken awarded a token.Oct 5 2020, 2:15 PM
Mindinsomnia (mindinsomnia) awarded a token.Oct 27 2020, 2:29 AM
raksa eng (raksa) awarded a token.Jan 26 2021, 4:37 PM