blf.dimensions incorrect on Darwin builds #46371
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#46371
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
We have created a help text box in python that draws text to 3D viewport when our tools run modal. This help box automatically wraps the text if it is too wide to fit in the space given. Our line breaking code uses
blf.dimensions(0,text)- [x]
to determine the width of the text.On Linux and Windows machines, this works as expected, but on OSX machine it is off by factor of ~1.2. For example,
blf.dimensions(0,text)- [x]
gives 155.4 on OSX and 186.0 on Linux whentext = 'Contours Help (click to hide help):'
. Note: it should report 186.0 for both machines.We have seen this issue since at least Jan 12, but thought it was a bug in our code. We are using the default font at size = 12 with
DPI = context.user_preferences.system.dpi
, which is 72 on all our test machines (Linux, Windows, OSX).Changed status to: 'Open'
Added subscriber: @gfxcoder
Added subscriber: @patmo141-3
Removed subscriber: @patmo141-3
Added subscriber: @JonathanWilliamson
Added subscribers: @ideasman42, @Blendify
@ideasman42 think this one is for you
Added subscriber: @brecht
What are the steps to reproduce this problem, just running this in the python console?
Does the OS X machine have a retina display? I would expect a 2x factor for that though, not 1.2x.
Are you testing with factory settings on both platforms?
Running
import blf; blf.size(0, 12, 72); blf.dimensions(0, 'Contours Help (click to hide help):')- [x]
gives:Linux:
186.046875
OSX: ~
155.4
Windows: ~
186.047
The OSX machine does not have a retina display. Factory settings for Linux and Windows. Fairly certain OSX has factory settings (not my machine), but I'll double-check on this.
Testing with Blender 2.75 and 2.76 RC3 on OS X 10.11, I'm seeing
186.046875
, both when running Blender in retina and low resolution.I would expect there's something in the user preferences influencing this. So testing with File > Load Factory Settings would be good to confirm if that's the case. Perhaps something under Themes > Text Style, or a custom interface font under System.
It would seem it is indeed something with my user preferences.
Running with factory settings I get
186.046875
as well.So, we need to figure out what exactly is causing this. An addon, theme setting, something else? If you can't find it, could you attach your userpref.blend?
Added subscriber: @mont29
Changed status from 'Open' to: 'Archived'
No news since one week…