public void PerTestSetup()
 {
     _face = new Face(TestConstants.PaduakFontLocation, FaceOptions.face_default);
     _font = new Font(20.0f, _face);
     _featureval = _face.FeaturevalForLang("en");
     _segment = _font.MakeSeg(0, _featureval, "hello world", Bidirtl.Nobidi);
 }
Exemplo n.º 2
0
 public Segment MakeSeg(UInt32 script, Featureval feats, string str, Bidirtl dir)
 {
     IntPtr strPtr = Marshal.StringToCoTaskMemUni(str);
     IntPtr error = new IntPtr(0);
     int numCodePoints = Graphite2Api.CountUnicodeCharacters(Encform.Utf16, strPtr, IntPtr.Zero, ref error);
     IntPtr segmentPtr = Graphite2Api.MakeSeg(_font, _face.FacePtr, script, feats.FeatureValPtr, Encform.Utf16, strPtr, numCodePoints, dir);
     Marshal.FreeCoTaskMem(strPtr);
     return new Segment(segmentPtr);
 }
Exemplo n.º 3
0
        public Segment MakeSeg(UInt32 script, Featureval feats, string str, Bidirtl dir)
        {
            IntPtr strPtr        = Marshal.StringToCoTaskMemUni(str);
            IntPtr error         = new IntPtr(0);
            int    numCodePoints = Graphite2Api.CountUnicodeCharacters(Encform.Utf16, strPtr, IntPtr.Zero, ref error);
            IntPtr segmentPtr    = Graphite2Api.MakeSeg(_font, _face.FacePtr, script, feats.FeatureValPtr, Encform.Utf16, strPtr, numCodePoints, dir);

            Marshal.FreeCoTaskMem(strPtr);
            return(new Segment(segmentPtr));
        }
 public int SetFeatureValue(UInt16 val, Featureval dest)
 {
     return Graphite2Api.FrefSetFeatureValue(_featureRef, val, dest.FeatureValPtr);
 }
 public UInt16 FeatureValue(Featureval feats)
 {
     return Graphite2Api.FrefFeatureValue(_featureRef, feats.FeatureValPtr);
 }
Exemplo n.º 6
0
 public int SetFeatureValue(UInt16 val, Featureval dest)
 {
     return(Graphite2Api.FrefSetFeatureValue(_featureRef, val, dest.FeatureValPtr));
 }
Exemplo n.º 7
0
 public UInt16 FeatureValue(Featureval feats)
 {
     return(Graphite2Api.FrefFeatureValue(_featureRef, feats.FeatureValPtr));
 }