# Set Fontscale not working

**URL:** <https://resource.dopus.com/t/set-fontscale-not-working/22904>\
**Category:** Help & Support\
**Created:** [July 5, 2016, 9:25am UTC](https://resource.dopus.com/t/set-fontscale-not-working/22904 "2016-07-05T09:25:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ouwen](https://resource.dopus.com/user_avatar/resource.dopus.com/ouwen/32/29186_2.png) [@ouwen](https://resource.dopus.com/u/ouwen)\
**Post date:** [July 5, 2016, 9:25am UTC](https://resource.dopus.com/t/set-fontscale-not-working/22904/1 "2016-07-05T09:25:24Z")

</div>

I'm trying to create a toolbar button for my Opus Touch mode that toggles top/bottom or left/right listers, while preserving my jumbo touch friendly text size.

When I have one button such as:

`SET DUAL=Toggle,Horiz,ToggleLayout
SET FONTSCALE=175,both`

Only the text in the origional lister is resized. Yet when I seperate the commands into two buttons:  
Toggle Horiz

```auto
SET DUAL=Toggle,Horiz,ToggleLayout
```

Set Font Size

```auto
SET FONTSCALE=175,both
```

Both listers have their fonts sized properly (at 175%).

I've tried many permutations of FONTSCALE, for example:  
SET FONTSCALE=175,175,both  
SET FONTSCALE=left,175  
SET FONTSCALE=right,175  
etc... Every permutation that I could think of, yet I'm not understanding why two individual buttons with one line commands would work, while one button with the same command on two lines doesn't work. Perhaps it's a timing issue?

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [July 5, 2016, 11:49am UTC](https://resource.dopus.com/t/set-fontscale-not-working/22904/2 "2016-07-05T11:49:54Z")

</div>

Here's a workaround, which runs the second line as a separate command which will reevaluate what the source/dest windows are when it runs:

`SET DUAL=Toggle,Horiz,ToggleLayout
dopusrt /acmd SET FONTSCALE=175,both`

---

<div class="post-metadata">

**Author:** ![ouwen](https://resource.dopus.com/user_avatar/resource.dopus.com/ouwen/32/29186_2.png) [@ouwen](https://resource.dopus.com/u/ouwen)\
**Post date:** [July 6, 2016, 7:55am UTC](https://resource.dopus.com/t/set-fontscale-not-working/22904/3 "2016-07-06T07:55:27Z")

</div>

@leo

Thank you. That does work. Could you shed some light on WHY? No way that I would have figured that out on my own, and didn't see any sort of reference in the manual that made me think about trying something like that.

Just had a similar issue with FONTSCALE in a .DCF that I created... The same dopusrt /acmd call method fixed it, but also had to be very sensitive about the order of my arguments.... Could you shed more light on how fontscale actually works, and why it's so easy for the command to not work as expected?

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [July 6, 2016, 8:50am UTC](https://resource.dopus.com/t/set-fontscale-not-working/22904/4 "2016-07-06T08:50:14Z")

</div>

When you click a button it takes a snapshot of the current context and then (as a general rule) everything runs against that. That's usually what you want, but not always.

If you want part of a command to re-evaluate that context after other parts have changed things, you sometimes have to request that explicitly, one way or another.

(In scripts, you have explicit control over most of this. Outside of scripts, [embedded functions](https://www.gpsoft.com.au/help/opus11/index.html#!Documents/Embedded_functions_for_new_Listers.htm) are usually the best way to do it, but don't work with Set DUAL=Toggle. Some commands cause the context to be reevaluated automatically as well. In fact, a lot of commands do it automatically, but not this pair.)
