UI: Allow Float Kerning for Text Objects #105181
No reviewers
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#105181
Loading…
Reference in New Issue
No description provided.
Delete Branch "pioverfour/blender:dp_kerning_float"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Change Text Object character
kern
member to float from int, and allowfractional changes to kerning with Shift-Alt-arrows.
Currently, the kerning used to change spacing between characters in a
text object is defined as int values. This is enough for most cases,
but for very demanding typesetting, say a logo or calligram, one may
need more precision.
Say you want to combine "u" and "n" for your DunE logo:
You might want to combine the right stem of the u, with the left stem
of the n:
To achieve this you need fine precision to align the letters together.
Another limitation this change removes is that the kerning is
currently limited to the [-20,20] range. If you’re trying to fill a
shape with words, you may need very large kerning to take the letter
far enough apart from each other. You could also use spaces, but they
have the drawback that they have to be inserted manually between each
pair of letters, instead of just kerning the entire line at once.
In addition, this change adds shortcuts to increase or decrease
kerning by increments of 1/10.
The real-life use case I had was doing this sticker:
This type of thing is surprisingly hard to do because you need to control the position of each letter to get a good outline and a somewhat consistent type color. I started doing it in Scribus because it offers precise kerning, but ended up patching Blender to add float kerning.
@pioverfour
Can you include more detail? Maybe illustrate a situation where the current precision is too small, and the current limits are too narrow? Including captures can really help. You want to make it as easy as possible to understand and review without having to dig, explore, and test ourselves. The following explains what is requested:
https://wiki.blender.org/wiki/Process/Contributing_Code#Ingredients_of_a_Pull_Request
2ca79b9632
to8b230c598e
Font kerning: allow float valuesto UI: Allow Float Kerning for Text Objects@pioverfour - sorry for not responding earlier. I missed that you had updated this so nicely and provided good example usage.
Yes, I can completely agree with you on the need for float kerning. Without this it is indeed far too coarse. I love the amount of adjustment here with the 0.1f change with Shift-Alt-arrow being about perfect.
Also agree that the -20,20 clamping should go. I don't like to second-guess a user's intention and would rather let them do as they wish.
Off-topic, but long-term we should consider adding a member to
CharInfo
to hold the default kerning (now assumed zero) or usekern
to hold that and add a delta for the change from that. This would allow us to start users off with better default kerning values, from the font'skern
table now or from itsgpos
table later.But I love this patch, and can't find anything wrong with it. Although I am approving please consider Campbell's approval as blocking.
Thanks for the kind words :)
No worry about the delay—I thought editing the original message would notify you, but I guess I needed to re-request review for that.
Hi, do you think this can be merged?
Yes, sorry. I didn't realize that you couldn't do so yourself. I just tested it again and will get on it. Thanks!