float vectorScale_; // (point_size * resolution)/ (72 * face->units_per_em) #endregion Fields #region Constructors public Font(string path, float height, int dpi) { lib = FTLibrary.Instance; dpi_=dpi; int code = FT.FT_New_Face(lib.Handle, path, 0, out face_); FT.CheckError(code); FT.FT_FaceRec facerec = FT.HandleToRecord<FT.FT_FaceRec>(face_); familyName_ = facerec.family_name; styleName_ = facerec.style_name; face_has_kerning_ = ((facerec.face_flags & FT.FT_FACE_FLAG_KERNING) != 0); face_units_per_EM_ = facerec.units_per_EM; face_height_ = facerec.height; //Console.WriteLine("new FONT = unit-per-em=" + face_units_per_EM_); //setCharSize(pointsize); setCharHeight(height); }
float vectorScale_; // (point_size * resolution)/ (72 * face->units_per_em) public Font(string path, float height, uint dpi) { lib = FTLibrary.Instance; dpi_ = dpi; int code = FT.FT_New_Face(lib.Handle, path, 0, out face_); FT.CheckError(code); FT.FT_FaceRec facerec = FT.HandleToRecord <FT.FT_FaceRec>(face_); familyName_ = facerec.family_name; styleName_ = facerec.style_name; face_has_kerning_ = ((facerec.face_flags & FT.FT_FACE_FLAG_KERNING) != 0); face_units_per_EM_ = facerec.units_per_EM; face_height_ = facerec.height; //Console.WriteLine("new FONT = unit-per-em=" + face_units_per_EM_); //setCharSize(pointsize); setCharHeight(height); }
// static singleton constructor static FTLibrary() { instance = new FTLibrary(); }