Feature:Fontsize

From Vexi

Jump to: navigation, search

Vexi uses a CSS-like system for setting fontsizes. The following settings are valid:

  • "xxsmall" or "xx-small"
  • "xsmall" or "x-small"
  • "small"
  • "medium"
  • "large"
  • "xxlarge" or "xx-large"
  • "xlarge" or "x-large"

Note that both styles are supported - the 'xsize' (no dash) and 'x-size' (with a dash) - for similarities with the CSS standard but also for convenience reasons.

Like in a browser, you can change the overall fontsize of the system dynamically. In this example you can press ALT and either + or - on your numpad to increase or decrease the general fontsize.

<vexi xmlns:ui="vexi://ui" xmlns="vexi.widget">
    <ui:box fill="white" orient="vertical">
        <ui:box text="Testing Core Features" fontsize="xxsmall" />
        <ui:box text="Testing Core Features" fontsize="xsmall" />
        <ui:box text="Testing Core Features" fontsize="small" />
        <ui:box text="Testing Core Features" fontsize="medium" />
        <ui:box text="Testing Core Features" fontsize="large" />
        <ui:box text="Testing Core Features" fontsize="xlarge" />
        <ui:box text="Testing Core Features" fontsize="xxlarge" />
        _KeyPressed ++= function(v) {
            cascade = v;
            if (v == "A-+") vexi.ui.fontsize.medium += 1;
            if (v == "A--") vexi.ui.fontsize.medium -= 1;
        }
        vexi.ui.frame = thisbox;
    </ui:box>
</vexi>
Personal tools
wiki information