| 1 |
// SPDX-License-Identifier: MIT OR MPL-2.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later |
| 2 |
// Copyright (C) 2012 SIL International |
| 3 |
using System; |
| 4 |
using NUnit.Framework; |
| 5 |
using NGraphite; |
| 6 |
|
| 7 |
namespace NGraphiteTests |
| 8 |
{ |
| 9 |
[TestFixture()] |
| 10 |
public class FontTests |
| 11 |
{ |
| 12 |
[Test()] |
| 13 |
public void Font_FromTestFace_DoesNotThrowException() |
| 14 |
{ |
| 15 |
using (var face = new Face(TestConstants.PaduakFontLocation, FaceOptions.face_default)) |
| 16 |
{ |
| 17 |
new Font(20.0f, face).Dispose(); |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
[Test()] |
| 22 |
public void MakeSeg_WithTestString_ReturnsNonNullSegment() |
| 23 |
{ |
| 24 |
using (var face = new Face(TestConstants.PaduakFontLocation, FaceOptions.face_default)) |
| 25 |
{ |
| 26 |
using (var font = new Font(20.0f, face)) |
| 27 |
{ |
| 28 |
using(Featureval featureval = face.FeaturevalForLang("en")) |
| 29 |
{ |
| 30 |
Segment segment = font.MakeSeg(0, featureval, "hello world", Bidirtl.Nobidi); |
| 31 |
Assert.NotNull(segment); |
| 32 |
segment.Dispose(); |
| 33 |
} |
| 34 |
} |
| 35 |
} |
| 36 |
} |
| 37 |
} |
| 38 |
} |
| 39 |
|