Skip to content

Commit

Permalink
Schema: Pango formatting keys for [message]
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Mar 30, 2018
1 parent 1fc7346 commit e4f057f
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
22 changes: 22 additions & 0 deletions data/schema/core/actionwml.cfg
Expand Up @@ -20,6 +20,27 @@
{SIMPLE_KEY blue {TYPE}}
#enddef

#define FORMATTING_KEYS
{SIMPLE_KEY font string}
{SIMPLE_KEY font_family string}
{SIMPLE_KEY font_size font_size}
{SIMPLE_KEY font_style font_style}
{SIMPLE_KEY font_weight font_weight}
{SIMPLE_KEY font_variant font_variant}
{SIMPLE_KEY font_stretch font_stretch}
{SIMPLE_KEY color html_color}
{SIMPLE_KEY bgcolor html_color}
{SIMPLE_KEY underline font_underline}
{SIMPLE_KEY underline_color html_color}
{SIMPLE_KEY rise s_int}
{SIMPLE_KEY strikethrough s_bool}
{SIMPLE_KEY strikethrough_color html_color}
{SIMPLE_KEY fallback s_bool}
{SIMPLE_KEY letter_spacing s_unsigned}
{SIMPLE_KEY gravity font_gravity}
{SIMPLE_KEY gravity_hint font_gravity_hint}
#enddef

[tag]
name="$action_wml"
max=0
Expand Down Expand Up @@ -581,6 +602,7 @@
{DEFAULT_KEY highlight s_bool yes}
{SIMPLE_KEY duration s_unsigned}
{SIMPLE_KEY sound string_list}
{FORMATTING_KEYS}
{SHOW_IF_TAG}
[tag]
name="option"
Expand Down
1 change: 1 addition & 0 deletions data/schema/game_config.cfg
Expand Up @@ -14,6 +14,7 @@
{./types/basic.cfg}
{./types/formula.cfg}
{./types/subst.cfg}
{./types/pango.cfg}
[type]
name=int_percent
value="-?\d+%?"
Expand Down
70 changes: 70 additions & 0 deletions data/schema/types/pango.cfg
@@ -0,0 +1,70 @@

[type]
name="html_color"
[union]
[type]
value="#[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]"
[/type]
[type]
[list]
max=3
[element]
link=unsigned
[/element]
[/list]
[/type]
[/union]
[/type]
[type]
name="font_style"
value="normal|oblique|italic"
[/type]
[type]
name="font_variant"
value="normal|smallcaps"
[/type]
[type]
name="font_stretch"
value="normal|(ultra|extra|semi)?(condensed|expanded)"
[/type]
[type]
name="font_weight"
[union]
[type]
link=unsigned
[/type]
[type]
value="normal|heavy|(ultra)?(light|bold)"
[/type]
[/union]
[/type]
[type]
name="font_size"
[union]
[type]
link=unsigned
[/type]
[type]
value="smaller|larger|medium|(x?x-)?(small|large)"
[/type]
[/union]
[/type]
[type]
name="font_underline"
[union]
[type]
link=bool
[/type]
[type]
value="none|single|double|low|error"
[/type]
[/union]
[/tag]
[tag]
name="font_gravity"
value="south|east|north|west|auto"
[/tag]
[tag]
name="font_gravity_hint"
value="natural|strong|line"
[/tag]

0 comments on commit e4f057f

Please sign in to comment.