# Left-aligning text in a HUD doesn't work (it centers the text still)

**URL:** <https://community.folivora.ai/t/left-aligning-text-in-a-hud-doesnt-work-it-centers-the-text-still/33418>\
**Category:** Bugs or Unexpected Behavior\
**Tags:** hud-overlay\
**Created:** [September 25, 2023, 1:36pm UTC](https://community.folivora.ai/t/left-aligning-text-in-a-hud-doesnt-work-it-centers-the-text-still/33418 "2023-09-25T13:36:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zethzethzeth](https://community.folivora.ai/letter_avatar_proxy/v4/letter/z/e9a140/32.png) [@zethzethzeth](https://community.folivora.ai/u/zethzethzeth)\
**Post date:** [September 25, 2023, 1:36pm UTC](https://community.folivora.ai/t/left-aligning-text-in-a-hud-doesnt-work-it-centers-the-text-still/33418/1 "2023-09-25T13:36:05Z")

</div>

I love this software. It's the best thing that happened in my life! \<3

## Bug description

When I make a HUD, I cannot left-align the text. It keeps being centered:

 ![hud-bug-report](https://community.folivora.ai/uploads/default/original/3X/0/1/01b5872c95f75041465365d83dd631378ca697b7.png)

There is no bug-report or error log here. It seems like a styling that 'just isn't used'.

## Solution attempts

- I tried right-align as well (same thing, it keeps being centered).
- Restart computer
- Restart BTT
- Create other HUD
- Try both in preview and 'when activating the HUD with my shortcut key'.

All attempts lead to the same behaviour: That the text stays centered.

## My setup

Type of Mac: 2019 Macbook Pro (16''). Intel Chip.  
MacOS version: Ventura 13.6 and 13.4 (tried it on both)  
BetterTouchTool version: `4.272 (42713)`

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [September 25, 2023, 2:28pm UTC](https://community.folivora.ai/t/left-aligning-text-in-a-hud-doesnt-work-it-centers-the-text-still/33418/2 "2023-09-25T14:28:12Z")

</div>

unfortunately SwiftUI currently doesn't support alignment modifiers in Attributed Strings as far as I know.  
However I have recently created a workaround for another function in BTT, I'll add that to HUDs as well. Unfortunately that workaround only works for all lines, so you won't be able to align only certain lines to the left

---

<div class="post-metadata">

**Author:** ![zethzethzeth](https://community.folivora.ai/letter_avatar_proxy/v4/letter/z/e9a140/32.png) [@zethzethzeth](https://community.folivora.ai/u/zethzethzeth)\
**Post date:** [September 28, 2023, 7:10am UTC](https://community.folivora.ai/t/left-aligning-text-in-a-hud-doesnt-work-it-centers-the-text-still/33418/3 "2023-09-28T07:10:05Z")

</div>

That is perfectly fine (to just be able to align the whole text). 🙂

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [October 10, 2023, 8:38pm UTC](https://community.folivora.ai/t/left-aligning-text-in-a-hud-doesnt-work-it-centers-the-text-still/33418/4 "2023-10-10T20:38:44Z")

</div>

This should now work with the latest alpha 4.275
