Exemple #1
0
		protected void InitializeDescriptionAndMaterial()
		{
			if (Data == null || Data.Children.Count == 0)
			{
				Logger.Warning("Could not load '" + Name + "' font");
				return;
			}
			Description = new FontDescription(Data);
			Material = new Material(ShaderFlags.Position2DColoredTextured, Description.FontMapName);
			WasLoadedOk = true;
		}
Exemple #2
0
 private void RenderAsFontText(Font font)
 {
     description = font.Description;
     description.Generate(Text, HorizontalAlignment.Center);
     Add(font.Material);
     Add(description.Glyphs);
     Add(description.DrawSize);
     OnDraw<FontRenderer>();
 }
Exemple #3
0
 public override void Set(object component)
 {
     var fontName = component as FontName;
     if (component is FontName)
         description = ContentLoader.Load<Font>(fontName.Name).Description;
     base.Set(component);
 }