Пример #1
0
        public void FaceFeaturevalForLang_PaduakFontWithEnLang_NonNullFeatureValReturned()
        {
            using (var face = new PaduakDisposableFace())
            {
                uint   lang           = Graphite2Api.StrToTag("en");
                IntPtr gr_feature_val = Graphite2Api.FaceFeaturevalForLang(face.Face, lang);
                Assert.AreNotEqual(IntPtr.Zero, gr_feature_val);

                Graphite2Api.FeatureValDestroy(gr_feature_val);
            }
        }
Пример #2
0
        public void FrefSetFeatureValue_SettingsThekdotFeature_FailsWithZeroReturnCode()
        {
            using (var face = new PaduakDisposableFace())
            {
                uint   lang           = Graphite2Api.StrToTag("en");
                IntPtr gr_feature_val = Graphite2Api.FaceFeaturevalForLang(face.Face, lang);
                IntPtr gr_feature_ref = Graphite2Api.FaceFindFref(face.Face, 1801744244);
                int    ret            = Graphite2Api.FrefSetFeatureValue(gr_feature_ref, 12, gr_feature_val);
                Assert.AreEqual(0, ret);

                Graphite2Api.FeatureValDestroy(gr_feature_val);
            }
        }
Пример #3
0
        public void FrefFeatureValue_FirstPaduakFeature_ReturnsZero()
        {
            using (var feature = new PaduakFeatureVal())
            {
                uint   lang           = Graphite2Api.StrToTag("en");
                IntPtr gr_feature_val = Graphite2Api.FaceFeaturevalForLang(feature.Face, lang);

                UInt16 val = Graphite2Api.FrefFeatureValue(feature.FeatureRef, gr_feature_val);
                Assert.AreEqual(0, val);

                Graphite2Api.FeatureValDestroy(gr_feature_val);
            }
        }
Пример #4
0
        public void FeaturevalClone_CloneAFeature_ReturnADifferentInstance()
        {
            using (var face = new PaduakDisposableFace())
            {
                uint   lang = Graphite2Api.StrToTag("en");
                IntPtr one  = Graphite2Api.FaceFeaturevalForLang(face.Face, lang);
                IntPtr two  = Graphite2Api.FeaturevalClone(one);
                Assert.NotNull(one, "one");
                Assert.NotNull(two, "two");
                Assert.AreNotEqual(one, two);

                Graphite2Api.FeatureValDestroy(one);
                Graphite2Api.FeatureValDestroy(two);
            }
        }