BLF: Improved Cached Fallback Font Setup #114018

Merged
Harley Acheson merged 1 commits from Harley/blender:FontSetup into main 2023-10-22 03:55:07 +02:00
Member

Changes to FontBLF initialization so that the cached fallback fonts,
which remain faceless until needed, get all required setup.
Otherwise they are not kerned and we also don't get metrics from them.


This is actually an old PR on Phab. https://archive.blender.org/developer/D15844

This largely just breaks up blf_ensure_face into two parts so that some setup can be called from it and also from the blf_cache_face_requester callback.

We distribute some fonts that are specific to particular languages or uses and we therefore do not want to fully set them up until they are actually used. But with the addition of the FreeType Caching subsystem those fonts do not get a Face until the caching system itself initiates it and we are informed via a callback. At that point calling blf_ensure_face does nothing since the face now exists. This means that they do not get some setup that they would have gotten if caching wasn't enabled or if they were not created to be initially faceless.

Without this fix, fallback fonts will not do kerning if the font supports that, but none of these fonts are used for Latin text anyway. They also will not support variable font features if they are of that type. And we would not get font metrics from them. All these things are now becoming more important.

Changes to FontBLF initialization so that the cached fallback fonts, which remain faceless until needed, get all required setup. Otherwise they are not kerned and we also don't get metrics from them. --- This is actually an old PR on Phab. https://archive.blender.org/developer/D15844 This largely just breaks up `blf_ensure_face` into two parts so that some setup can be called from it and also from the `blf_cache_face_requester` callback. We distribute some fonts that are specific to particular languages or uses and we therefore do not want to fully set them up until they are actually used. But with the addition of the FreeType Caching subsystem those fonts do not get a Face until the caching system itself initiates it and we are informed via a callback. At that point calling blf_ensure_face does nothing since the face now exists. This means that they do not get some setup that they would have gotten if caching wasn't enabled or if they were not created to be initially faceless. Without this fix, fallback fonts will not do kerning if the font supports that, but none of these fonts are used for Latin text anyway. They also will not support variable font features if they are of that type. And we would not get font metrics from them. All these things are now becoming more important.
Harley Acheson added 1 commit 2023-10-22 02:59:49 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
6039290c33
BLF: Improved Cached Fallback Font Setup
Changes to FontBLF initialization so that the cached fallback fonts
- which remain faceless until needed - get all required setup.
Otherwise they are not kerned and we also don't get metrics from them.

---

This is actually an old PR on Phab. https://archive.blender.org/developer/D15844

This largely just breaks up `blf_ensure_face` into two parts so that some setup can be called from it and also from the `blf_cache_face_requester` callback.

We distribute some fonts that are specific to particular languages or uses and we therefore do not want to fully set them up until they are actually used. But with the addition of the FreeType Caching subsystem those fonts do not get a Face until the caching system itself initiates it and we are informed via a callback. At that point calling blf_ensure_face does nothing since the face now exists. This means that they do not get some setup that they would have gotten if caching wasn't enabled or if they were not created to be initially faceless.

Without this fix, fallback fonts will not do kerning if the font supports that, but none of these fonts are used for Latin text anyway. They also will not support variable font features if they are of that type. And we would not get font metrics from them. All these things are now becoming more important.
Harley Acheson added this to the User Interface project 2023-10-22 03:03:23 +02:00
Author
Member

@blender-bot build

@blender-bot build
Harley Acheson merged commit b53111e935 into main 2023-10-22 03:55:07 +02:00
Harley Acheson deleted branch FontSetup 2023-10-22 03:55:09 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#114018
No description provided.