AddFontSets() public method

Addes the given FontSetGroups to the resolver.
When resolving a font, the groups are examined in the reverse order in which they were added.
public AddFontSets ( FontSetGroup p_fsgFontSets ) : void
p_fsgFontSets Nexus.UI.FontSetGroup The font set group to add.
return void
Ejemplo n.º 1
0
		/// <summary>
		/// Sets up the fonts.
		/// </summary>
		/// <returns>The <see cref="NexusFontSetResolver"/> to be used.</returns>
		private NexusFontSetResolver SetUpFonts()
		{
			FontManager.Add("LinBiolinum", Resources.LinBiolinum_RB);
			FontManager.Add("LinBiolinum", Resources.LinBiolinum_RI);

			FontSet fstDefault = new FontSet(new string[] { "Microsoft Sans Serif", "Arial" });
			FontSetGroup fsgDefault = new FontSetGroup(fstDefault);
			fsgDefault.AddFontSet("StandardText", fstDefault);
			fsgDefault.AddFontSet("HeadingText", fstDefault);
			fsgDefault.AddFontSet("SmallText", new FontSet(new string[] { "Segoe UI", "Arial" }));
			fsgDefault.AddFontSet("MenuText", new FontSet(new string[] { "Segoe UI", "Arial" }));
			fsgDefault.AddFontSet("GameSearchText", new FontSet(new string[] { "LinBiolinum" }));
			fsgDefault.AddFontSet("TestText", new FontSet(new string[] { "Wingdings" }));

			NexusFontSetResolver fsrResolver = new NexusFontSetResolver();
			fsrResolver.AddFontSets(fsgDefault);

			FontProvider.SetFontSetResolver(fsrResolver);
			return fsrResolver;
		}