Skip to content

Instantly share code, notes, and snippets.

@mistzzt
Last active October 20, 2023 17:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mistzzt/9adc21f862859064bc60271f9e6e6c68 to your computer and use it in GitHub Desktop.
Save mistzzt/9adc21f862859064bc60271f9e6e6c68 to your computer and use it in GitHub Desktop.
Sample description file for dynamic font generator of Terraria
<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:Graphics="ReLogic.Content.Pipeline">
<Asset Type="Graphics:DynamicFontDescription">
<!--
Modify this string to change the default font that will be imported.
-->
<FontName>Andy</FontName>
<!--
Size is a float value, measured in points. Modify this value to change
the size of the font.
-->
<Size>14</Size>
<!--
Spacing is a float value, measured in pixels. Modify this value to change
the amount of spacing in between characters.
-->
<Spacing>0</Spacing>
<!--
UseKerning controls the layout of the font. If this value is true, kerning information
will be used when placing characters.
-->
<UseKerning>true</UseKerning>
<!--
Style controls the default style of the font. Valid entries are "Regular", "Bold", "Italic",
and "Bold, Italic", and are case sensitive.
-->
<Style>Bold</Style>
<!--
DefaultCharacter is the default character will be substituted if you draw
or measure text that contains characters which were not included in the font.
(However, you still need to include DefaultCharacter in the CharacterRegions below)
-->
<DefaultCharacter>*</DefaultCharacter>
<!--
VerticalOffset controls how the maximum height of the font is determined.
"DefaultFontAscent" will use the maximum ascent size of the default font for reference.
"MaxAscent" will use the maximum ascent size found across all fonts used for reference.
"DefaultFontAscent" is the suggested option here.
-->
<VerticalOffset>DefaultFontAscent</VerticalOffset>
<!--
CharacterRegions control what letters are available in the font. Every
character from Start to End will be built and made available for drawing.
The characters are ordered according to the Unicode standard.
Character regions may also override the default FontName, Size, and Style. (See above for details)
-->
<CharacterRegions>
<!-- English -->
<CharacterRegion>
<Start>&#x20;</Start>
<End>&#xA9;</End>
</CharacterRegion>
<!-- Latin Characters -->
<CharacterRegion>
<FontName>Comic Sans MS</FontName>
<Size>12</Size>
<Style>Regular</Style>
<Start>&#xAA;</Start>
<End>&#x385;</End>
</CharacterRegion>
<!-- Extra Symbols -->
<CharacterRegion>
<FontName>Comic Sans MS</FontName>
<Size>12</Size>
<Style>Regular</Style>
<Start>&#x2013;</Start>
<End>&#x303F;</End>
</CharacterRegion>
<!-- Cyrillic (Russian) -->
<CharacterRegion>
<Size>12</Size>
<Style>Regular</Style>
<Start>&#x0400;</Start>
<End>&#x04FF;</End>
</CharacterRegion>
<!-- Simplified Chinese -->
<CharacterRegion>
<FontName>Source Han Sans SC Regular</FontName>
<Size>12</Size>
<Style>Regular</Style>
<Start>&#x4E00;</Start>
<End>&#x9FFF;</End>
</CharacterRegion>
<!-- Full Width English (For Simplified Chinese) -->
<CharacterRegion>
<FontName>Source Han Sans SC Regular</FontName>
<Size>12</Size>
<Style>Regular</Style>
<Start>&#xFF01;</Start>
<End>&#xFF60;</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment