Duality.Resources.Font.ReloadData C# (CSharp) 메소드

ReloadData() 공개 메소드

Reloads this Fonts internal data and rasterizes its glyphs.
public ReloadData ( ) : void
리턴 void
        public void ReloadData()
        {
            this.needsReload = false;

            if (this.Characters == CharacterSet.Dynamic || this.pixelData == null)
            {
                this.ReleaseResources();
                this.UpdateInternalFont();

                this.maxGlyphWidth = 0;
                this.height = 0;
                this.ascent = 0;
                this.bodyAscent = 0;
                this.descent = 0;
                this.baseLine = 0;
                this.glyphs = new GlyphData[SupportedChars.Length];

                this.GenerateResources();

                // Monospace offset adjustments
                if (this.monospace)
                {
                    for (int i = 0; i < SupportedChars.Length; ++i)
                    {
                        this.glyphs[i].offsetX -= (int)Math.Round((this.maxGlyphWidth - this.glyphs[i].width) / 2.0f);
                    }
                }

                // Kerning data
                this.UpdateKerningData();
            }
            else
            {
                Init(this.pixelData);

                CreateInternalTexture();
                CreateInternalMaterial();
                this.needsReload = true;
            }
        }

Usage Example

예제 #1
0
 public void ImportFile(string srcFile, string targetName, string targetDir)
 {
     string[] output = this.GetOutputFiles(srcFile, targetName, targetDir);
     Font res = new Font();
     res.LoadCustomFamilyData(srcFile);
     res.ReloadData();
     res.Save(output[0]);
 }
All Usage Examples Of Duality.Resources.Font::ReloadData