Skip to content
Edison Hua edited this page Apr 25, 2021 · 14 revisions

TextRender Styles

Units

px - pixel. Generally the default unit if omitted.

vh - 1% of viewport height. (0.01 * A_ScreenHeight)

vw - 1% of viewport width. (0.01 * A_ScreenWidth)

vmin - viewport width or the viewport height, whichever is smaller.

% - percent. Defined as relative to a specific measurement, unique to each style.

pt - point. Used for font sizes only.

When units are omitted they default to pixels unless otherwise specified.

Background Style

t, time - The amount of time to display text on the screen. The units can be in days, hours, minutes, seconds, or milliseconds. Examples: t:6hours, t:12min, or t:30ms. Default value: None. Default unit: milliseconds.

a, anchor - Specifies the bias of the origin point. The background box is usually anchored to the top-left (x, y) coordinate. When this value is changed, the given (x, y) coordinate can be used to anchor any combination of top, right, bottom, right, and center. Useful for relocating the baseline from the top-left coordinate of the drawing to the bottom-left. The values 1-9 can also be used. Examples: a:bottom-right, a:bottomright, a:center-center. Default value: a:top-left.

x, left - The x coordinate. Usually an value given in pixels. The words left, center, and right can be used to place the box in those positions respectively. A percentage unit will refer to a percentage of the maximum screen width. Examples: x:500px, x:right, x:12%, or x:33vw. Default value: x:center. Default unit: pixels.

y, top - The y coordinate. Usually an value given in pixels. The words top, center, and bottom can be used to place the box in those positions respectively. A percentage unit will refer to a percentage of the maximum screen height. Examples: y:200px, y:bottom, y:83%, or y:75vh. Default value: y:center. Default unit: pixels.

w, width - The width of the box. A percentage unit will refer to a percentage of the maximum screen width. Examples: w:12px, w:67%, w:10vmin. Default value: simulated width of the text string. Default unit: pixels.

h, height - The height of the box. A percentage unit will refer to a percentage of the maximum screen height. Examples: h:10vh, h:10%, h:92vmin. Default value: simulated height of the text string. Default unit: pixels.

r, radius - Enables rounded corners. The value given describes the radius. A percentage unit is defined as the percentage of the smaller of the width or height. Examples: r:16px, r:2%, r:5vmin. Default value: disabled, a.k.a. pointy square corners. Default unit: pixels.

c, color - Set background color. This can be a color name defined in CSS such as Aquamarine. There are also 3 random color modes, Random which is a mostly opaque random color, Random2 a solid random color, and Random3 a completely random value affecting both transparency and RGB. The words Off, Transparent, Clear, and None will disable the background box as well as any color with a zeroed alpha value. Any integer or hexadecimal value may be passed. An RGB value will be converted to a solid ARGB color. Examples: c:White, c:#ABCABC, c:FF545454, c:0xFAF0E6, c:Random2, c:None. Default value: c:0xDD212121.

m, margin - The margin extends outwards from the background box. Each margin edge can be extended individually, similar to CSS. A percentage unit is defined as a percentage of the corresponding width or height. In the case that only one margin value is specified, it will be a percentage of the height only. Examples: m:5vmin, m:20px. Default value: 1vmin. Default unit: pixels.

  • m:(25px 50px) - Top and bottom margins are 25px; right and left margins are 50px.
  • m:(25px 50px 75px) - Top margin is 25px. Right and left margins are 50px. Bottom margin is 75px.
  • m:(25px 50px 75px 100px) - Top margin is 25px. Right margin is 50px. Bottom margin is 75px. Left margin is 100px.
  • m:(top:25px right:50px bottom:75px left:100px) - Top margin is 25px. Right margin is 50px. Bottom margin is 75px. Left margin is 100px.

q, quality - Set text quality value as defined by the TextRenderingHint enumeration. A value from 0 to 5. Examples: q:1. Default value: q:4, AntiAlias.

Text Style

t, time - See above. A time value defined here will have lower precedence than above.

a, anchor - Sets the anchor point of the text field. See above.

x, left - The x coordinate of the text field. See above. (% of background width) left, center, right, 10vw

y, top - The y coordinate of the text field. See above. (% of background height) top, center, bottom, 10vh

w, width - The width of the text field. See above. (% of background width)

h, height - The height of the text field. See above. (% of background height)

m, margin - The margin extends outwards from the text field. See above. (% of background width) 2vw, 2%

f, font - Set font. f:(avant garde itc)

s, size - Set font size. (% of A_ScreenHeight) 12pt

c, color - Set font color. See above. Salmon, SlateBlue, 0x2736df, 0xff2736df, #2736df Please see:

b, bold - Bold text. Examples: b:1, b:true. Default value: None.

i, italic - Italicize text. Examples: i:1, i:true. Default value: None.

u, underline - Underline text. Examples: u:1, u:true. Default value: None.

j, justify - Justify text. One of the words left, center, or right. Can also be a value from 0-2. Examples: j:left, j:center, or j:right. Default value: j:center

v, vertical - Vertical alignment. Justifies text in the vertical direction. One of the words top, center, or bottom. Can also be a value from 0-2. Examples: v:top, v:center, or v:bottom. Default value: v:top

n, noWrap - Disable text wrapping. noWrap, n:owrap, n1, n:true, neqyehujbdawaw

z, condensed -

d, dropshadow -

o, outline -

q, quality - Set Rendering Hint. (0-5, 4 is Anti-Alias recommended, 5 is cleartype and will cause issues with autosizing.)

Clone this wiki locally