/// <summary> /// Creates a new VectorFont with the File specified at path and the specified size in pixels. /// It is assumed that the font is either Monospaced or only single chars are used. /// </summary> /// <param name="path">path to the font-file</param> /// <param name="size">size in pixles</param> public VectorFont(string path, uint size) { lib = new Library(); face = new Face(lib, path); face.SetPixelSizes(0, size); this.size = face.Size; }
internal void RemoveChildSize(FTSize child) { childSizes.Remove(child); }
internal void AddChildSize(FTSize child) { childSizes.Add(child); }
/// <summary> /// Sets a new font size in pixels /// </summary> /// <param name="pixels">size in pixels</param> public void SetSize(uint pixels) { face.SetPixelSizes(0, pixels); foreach (VectorGlyph glyph in database.Values) { glyph.Dispose(); } database = new Dictionary<char, VectorGlyph>(); this.size.Dispose(); this.size = face.Size; }