mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-20 23:44:08 +00:00
Relax font alias pattern to allow custom font families
Update the font alias regex pattern from:
(mono|sans)-(bold-|italic-)?(stroke-)?[0-9]{1,3}
to:
[a-z]+-(bold-|italic-)?(stroke-)?[0-9]{1,3}
Previously the pattern only allowed the `mono` and `sans` font families.
This change generalizes the pattern to accept any lowercase font family
name, making it compatible with the font alias convention described in:
https://gitea.wildfiregames.com/0ad/0ad/wiki/Adding_font_support
This allows new fonts to be registered through aliases without modifying
the regex each time a new family is introduced.
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
</define>
|
||||
<define name="font">
|
||||
<data type="string">
|
||||
<param name="pattern">(mono|sans)-(bold-|italic-)?(stroke-)?[0-9]{1,3}</param>
|
||||
<param name="pattern">[a-z]+-(bold-|italic-)?(stroke-)?[0-9]{1,3}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="size">
|
||||
|
||||
Reference in New Issue
Block a user