# Draw debug string appears to render in the wrong location UE-54346

**URL:** <https://forums.unrealengine.com/t/draw-debug-string-appears-to-render-in-the-wrong-location-ue-54346/459727>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** windows, bug, unreal-engine, editor, question, dpi\
**Created:** [December 19, 2019, 10:18pm UTC](https://forums.unrealengine.com/t/draw-debug-string-appears-to-render-in-the-wrong-location-ue-54346/459727 "2019-12-19T22:18:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kurtrussellfanclub](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kurtrussellfanclub](https://forums.unrealengine.com/u/kurtrussellfanclub)\
**Post date:** [December 19, 2019, 10:18pm UTC](https://forums.unrealengine.com/t/draw-debug-string-appears-to-render-in-the-wrong-location-ue-54346/459727/1 "2019-12-19T22:18:29Z")

</div>

This bug has already been logged but I’m adding more details [Unreal Engine Issues and Bug Tracker (UE-54346)](https://issues.unrealengine.com/issue/UE-54346)

**To reproduce:**  
The bug appears when you turn on DPI scaling in Windows. Start Menu → Change Size of Text, Apps and Other Items → Increase from 100% to 150 or 200%.

Then draw debug string in 3d viewport -

- By using the Draw Debug String blueprint node
- By making a vector or transform variable in a blueprint and toggling on “Show 3D Widget” checkbox for that variable

Debug text in the viewport will appear offset.

The issue appears to be in Engine\Source\Runtime\Engine\Private\UserInterface\CanvasItem.cpp

The method FCanvasTextItemBase::Draw multiplies positions by DPI, then passes result eventually into DrawStringInternal\_RuntimeCache which does the DPI multiply a second time! I can’t do a fix, though, because I am not sure which of two should be removed. Under some cases ::Draw will call an offline cache method instead of the runtime cache one and I am not familiar enough with when that’s called to know where the DPI code should go.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_935088b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_935088b3](https://forums.unrealengine.com/u/anonymous_user_935088b3)\
**Post date:** [December 20, 2019, 3:38pm UTC](https://forums.unrealengine.com/t/draw-debug-string-appears-to-render-in-the-wrong-location-ue-54346/459727/2 "2019-12-20T15:38:33Z")

</div>

Hi,

Thank you for the information, we have updated the ticket. If you find any new information or wish to report a bug in the future, we have switched to a new, better structured, bug reporting method:

[https://epicsupport.force.com/unrealengine/s/](https://epicsupport.force.com/unrealengine/s/)

Thanks again!
