diff --git a/data/schema/core/actionwml.cfg b/data/schema/core/actionwml.cfg index 408c6419e75..1a83b7e0980 100644 --- a/data/schema/core/actionwml.cfg +++ b/data/schema/core/actionwml.cfg @@ -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 @@ -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" diff --git a/data/schema/game_config.cfg b/data/schema/game_config.cfg index 7f7a948584d..14b3bf070ba 100644 --- a/data/schema/game_config.cfg +++ b/data/schema/game_config.cfg @@ -14,6 +14,7 @@ {./types/basic.cfg} {./types/formula.cfg} {./types/subst.cfg} + {./types/pango.cfg} [type] name=int_percent value="-?\d+%?" diff --git a/data/schema/types/pango.cfg b/data/schema/types/pango.cfg new file mode 100644 index 00000000000..939d4ba7b90 --- /dev/null +++ b/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]