Example #1
0
        public static FreeTypeFace CreateFace(IntPtr reference)
        {
            var ftf = new FreeTypeFace
            {
                reference = reference,
                _internal = *(FTFace *)reference,
                copy      = false
            };

            return(ftf);
        }
Example #2
0
        public FreeTypeFace FaceFromFile(string path)
        {
            var error = FreeTypeNative.FT_New_Face(Reference, path, 0, out var face_ptr);

            if (error != 0)
            {
                throw FreeTypeException.Except(error);
            }
            var face = FreeTypeFace.CreateFace(face_ptr);

            return(face);
        }