This also an alternative with a reset button and select widget to choose 
the font from a drop down list.
It uses the new range operator in TW 5.1.18pre. You name the tiddler 
whatever you want and if need to have it on the sidebar tag with 
$:/tags/PageControls as JD explained above.

Cheers
Mohammad
\define set-lineheight()
<$list 
filter="[range[18,24]addsuffix[px]after{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize!!text}]"
 
variable="font-size">
<$action-setfield 
$tiddler="$:/themes/tiddlywiki/vanilla/metrics/bodylineheight" text="26px"/>
</$list>
<$list 
filter="[range[10,18]addsuffix[px]after{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize!!text}]"
 
variable="font-size">
<$action-setfield 
$tiddler="$:/themes/tiddlywiki/vanilla/metrics/bodylineheight" text="22px"/>
</$list>
\end


''Font size:''
<$select tiddler='$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize' 
defualt="15px"
actions=<<set-lineheight>> >
<$list filter="[range[10,24]addsuffix[px]]" variable="font-size">
<option value=<<font-size>>><<font-size>></option>
</$list>
</$select>
<$button>Reset
<$action-setfield 
$tiddler="$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize" text="15px"/>
<$action-setfield 
$tiddler="$:/themes/tiddlywiki/vanilla/metrics/bodylineheight" text="22px"/>
</$button>




On Sunday, September 30, 2018 at 9:52:16 PM UTC+3:30, Tahoka Freeway wrote:
>
>
>
> Thank you Tony and Mohammad for the ideas.
>
> JD, your solution works very well for my application and allows me to 
> adjust font size as needed during the presentation without having to switch 
> back to Control Panel. 
>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0a2439d4-e628-4e2f-97bb-1dca5d66e386%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to