XML/FontFamily
< XML
Jump to navigation
Jump to search
<FontFamily> (creates a Font object) has a <Member> for each alphabet (character set), each enclosing a <Font> tag.
<FontFamily name="" virtual=""> <Member alphabet=""> <Font /> </Member> </FontFamily>
Attributes
- name (xs:string) - Similar to <LayoutFrame>.
- virtual (xs:string? ) - Similar to <LayoutFrame>.
Child elements
<Member> encloses a single <Font> tag; and one member is chosen when the game loads.
- alphabet (xs:string) - "roman", "korean", "simplifiedchinese", "traditionalchinese", "russian"
Details
- <FontFamily> produces the same objects that a lone <Font> element would, and may be used in the same ways. The difference is that <FontFamily> will localize to a different font for each character set.
- Fonts can inherit from a virtual FontFamily using <Font inherits="fontFamily">, resulting in the correct character set propogating to the Font.[1]
Examples
FrameXML/Fonts.xml
definesSystemFont_Outline_Small
using the following code:
<FontFamily name="SystemFont_Outline_Small" virtual="true">
<Member alphabet="roman">
<Font font="Fonts\FRIZQT__.TTF" height="10" outline="NORMAL"/>
</Member>
<Member alphabet="korean">
<Font font="Fonts\2002.TTF" height="10" outline="NORMAL"/>
</Member>
<Member alphabet="simplifiedchinese">
<Font font="Fonts\ARKai_C.ttf" height="12" outline="NORMAL"/>
</Member>
<Member alphabet="traditionalchinese">
<Font font="Fonts\arheiuhk_bd.TTF" height="12" outline="NORMAL"/>
</Member>
<Member alphabet="russian">
<Font font="Fonts\FRIZQT___CYR.TTF" height="10" outline="NORMAL"/>
</Member>
</FontFamily>
Patch changes
- Patch 6.1.0 (2015-02-24): Added.[2]
References
- ^ 2015-02-26, SharedFontStyles.XML, version 6.1.0.19702, near line 346, archived at Townlong-Yak
- ^ 2015-02-26, UI.xsd, version 6.1.0.19702, near line 346, archived at Townlong-Yak