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);
 }
 public void MakeSeg_WithTestString_ReturnsNonNullSegment()
 {
     using (var face = new Face(TestConstants.PaduakFontLocation, FaceOptions.face_default))
     {
         using (var font = new Font(20.0f, face))
         {
             using(Featureval featureval = face.FeaturevalForLang("en"))
             {
                 Segment segment = font.MakeSeg(0, featureval, "hello world", Bidirtl.Nobidi);
                 Assert.NotNull(segment);
                 segment.Dispose();
             }
         }
     }
 }
예제 #3
0
 public void Justify(Slot start, Font font, double width, JustFlags flags, Slot first, Slot last)
 {
     IntPtr firstPtr = first != null ? first.SlotPtr : IntPtr.Zero;
     IntPtr lastPtr = last != null ? last.SlotPtr : IntPtr.Zero;
     Graphite2Api.SegJustify(_segment, start.SlotPtr, font.FontPtr, width, flags, firstPtr, lastPtr);
 }
예제 #4
0
 public float AdvanceY(Face face, Font font)
 {
     return Graphite2Api.SlotAdvanceY(_slot, face.FacePtr, font.FontPtr);
 }