From: William Desportes <williamdes@wdes.fr>
Date: Sun, 29 Jan 2023 15:10:16 +0100
Subject: Update tests to add more assertions and use fonts-noto

Origin: vendor
Forwarded: not-needed
---
 tests/FontLib/FontTest.php | 31 ++++++++++++++++++++++++-------
 1 file changed, 24 insertions(+), 7 deletions(-)

diff --git a/tests/FontLib/FontTest.php b/tests/FontLib/FontTest.php
index 5d2277e..66f0555 100644
--- a/tests/FontLib/FontTest.php
+++ b/tests/FontLib/FontTest.php
@@ -24,14 +24,14 @@ class FontTest extends TestCase
 
     public function testLoadTTFFontSuccessfully()
     {
-        $trueTypeFont = Font::load('sample-fonts/IntelClear-Light.ttf');
+        $trueTypeFont = Font::load('/usr/share/fonts/truetype/noto/NotoSansShavian-Regular.ttf');
 
         $this->assertInstanceOf('FontLib\TrueType\File', $trueTypeFont);
     }
 
     public function test12CmapFormat()
     {
-        $trueTypeFont = Font::load('sample-fonts/NotoSansShavian-Regular.ttf');
+        $trueTypeFont = Font::load('/usr/share/fonts/truetype/noto/NotoSansShavian-Regular.ttf');
 
         $trueTypeFont->parse();
 
@@ -40,17 +40,34 @@ class FontTest extends TestCase
         $cmapFormat4Table = $cmapTable[0];
 
         $this->assertEquals(4, $cmapFormat4Table['format']);
-        $this->assertEquals(6, $cmapFormat4Table['segCount']);
+        $this->assertEquals(5, $cmapFormat4Table['segCount']);
         $this->assertEquals($cmapFormat4Table['segCount'], count($cmapFormat4Table['startCode']));
         $this->assertEquals($cmapFormat4Table['segCount'], count($cmapFormat4Table['endCode']));
 
         $cmapFormat12Table = $cmapTable[1];
 
         $this->assertEquals(12, $cmapFormat12Table['format']);
-        $this->assertEquals(6, $cmapFormat12Table['ngroups']);
-        $this->assertEquals(6, count($cmapFormat12Table['startCode']));
-        $this->assertEquals(6, count($cmapFormat12Table['endCode']));
-        $this->assertEquals(53, count($cmapFormat12Table['glyphIndexArray']));
+        $this->assertEquals(5, $cmapFormat12Table['ngroups']);
+        $this->assertEquals(5, count($cmapFormat12Table['startCode']));
+        $this->assertEquals(5, count($cmapFormat12Table['endCode']));
+        $this->assertEquals(52, count($cmapFormat12Table['glyphIndexArray']));
+    }
+
+    public function testFontLoadReadme()
+    {
+        $font = Font::load('/usr/share/fonts/truetype/noto/NotoSansShavian-Regular.ttf');
+        $font->parse();
+        $this->assertSame('Noto Sans Shavian', $font->getFontName());
+        $this->assertSame('Regular', $font->getFontSubfamily());
+        $this->assertSame('2.000;GOOG;NotoSansShavian-Regular', $font->getFontSubfamilyID());
+        $this->assertSame('Noto Sans Shavian Regular', $font->getFontFullName());
+        $this->assertSame(
+            'Version 2.000; ttfautohint (v1.8.3) -l 8 -r 50 -G 200 -x 14 -D shaw -f none -a qsq -X ""',
+            $font->getFontVersion()
+        );
+        $this->assertSame(400, $font->getFontWeight());
+        $this->assertSame('NotoSansShavian-Regular', $font->getFontPostscriptName());
+        $this->assertTrue($font->close());
     }
 
 }
