# Decrease background size around text

**URL:** https://forum.techsoft3d.com/t/decrease-background-size-around-text/5047
**Category:** HOOPS Visualize Desktop
**Created:** [January 14, 2026, 11:05pm UTC](https://forum.techsoft3d.com/t/decrease-background-size-around-text/5047 "2026-01-14T23:05:37Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.techsoft3d.com/u/simon)
#### Post date: [January 17, 2026, 12:14am UTC](https://forum.techsoft3d.com/t/decrease-background-size-around-text/5047/4 "2026-01-17T00:14:31Z")

</div>

Hello @amaan.makhani ,

After futher research, SetBackground will not work because it will take any spaces into account.

1. This is more complicated but you can call ComputeTextExtent to get the text size (w/o padding) and insert your own background.

This background will be render in 3D space. If your text is 2D, then you will need to recalculate your background.

Below is a simple sample on ComputeTextExtent

[HPS - ComputeTextExtent example](https://forum.techsoft3d.com/t/hps-computetextextent-example/2823)

1. You can insert your text with a offset to your symbol/marker.

Best Regards,  
Simon

---

_[View the full topic](https://forum.techsoft3d.com/t/decrease-background-size-around-text/5047)._
