Example #1
0
        public void CTFontCreateForStringWithLanguage()
        {
            TestRuntime.AssertXcodeVersion(11, 0);

            using (var f1 = new CTFont("HoeflerText-Regular", 10, CTFontOptions.Default)) {
                using (var f2 = f1.ForString("xamarin", new NSRange(0, 3), null))
                    Assert.That(f2.Handle, Is.Not.EqualTo(IntPtr.Zero), "f2");
                using (var f3 = f1.ForString("xamarin", new NSRange(0, 3), "FR"))
                    Assert.That(f3.Handle, Is.Not.EqualTo(IntPtr.Zero), "f3");
            }
        }
Example #2
0
        public void CTFontCreateForString()
        {
            TestRuntime.AssertXcodeVersion(5, 0);

            using (var f1 = new CTFont("HoeflerText-Regular", 10, CTFontOptions.Default))
                using (var f2 = f1.ForString("xamarin", new NSRange(0, 3))) {
                    Assert.That(f2.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle");
                }
        }