Skip to content

Commit 63de755

Browse files
authored
Preserve more name records (#14)
1 parent e20601b commit 63de755

9 files changed

+139
-9
lines changed

src/name.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ pub fn subset_table<'a>(table: &Table<'a>) -> Option<Table<'a>> {
3131
.iter()
3232
.copied()
3333
.filter(|record| {
34-
record.is_unicode() && [0, 1, 2, 3, 4, 5, 6].contains(&record.name_id)
34+
record.is_unicode()
35+
&& [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14]
36+
.contains(&record.name_id)
3537
})
3638
.collect::<Vec<_>>();
3739

tests/ttx/ClickerScript-Regular_1.ttx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<!-- Most of this table will be recalculated by the compiler -->
2323
<tableVersion value="1.0"/>
2424
<fontRevision value="1.0"/>
25-
<checkSumAdjustment value="0x9b010a31"/>
25+
<checkSumAdjustment value="0x19cc6a71"/>
2626
<magicNumber value="0x5f0f3cf5"/>
2727
<flags value="00000000 00001011"/>
2828
<unitsPerEm value="2048"/>
@@ -1020,6 +1020,27 @@
10201020
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
10211021
ClickerScript-Regular
10221022
</namerecord>
1023+
<namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
1024+
Clicker Script is a trademark of Astigmatic (AOETI).
1025+
</namerecord>
1026+
<namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
1027+
Astigmatic (AOETI)
1028+
</namerecord>
1029+
<namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
1030+
Astigmatic (AOETI)
1031+
</namerecord>
1032+
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
1033+
http://www.astigmatic.com/
1034+
</namerecord>
1035+
<namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
1036+
http://www.astigmatic.com/
1037+
</namerecord>
1038+
<namerecord nameID="13" platformID="3" platEncID="1" langID="0x409">
1039+
This Font Software is licensed under the SIL Open Font License,&#13;Version 1.1. This license is available with a FAQ at:&#13;http://scripts.sil.org/OFL
1040+
</namerecord>
1041+
<namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
1042+
http://scripts.sil.org/OFL
1043+
</namerecord>
10231044
</name>
10241045

10251046
<post>

tests/ttx/DejaVuSansMono_1.ttx

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<!-- Most of this table will be recalculated by the compiler -->
4343
<tableVersion value="1.0"/>
4444
<fontRevision value="2.37"/>
45-
<checkSumAdjustment value="0x1c85aaa4"/>
45+
<checkSumAdjustment value="0x981dd574"/>
4646
<magicNumber value="0x5f0f3cf5"/>
4747
<flags value="00000000 00011111"/>
4848
<unitsPerEm value="2048"/>
@@ -2656,6 +2656,38 @@ DejaVu changes are in public domain
26562656
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
26572657
DejaVuSansMono
26582658
</namerecord>
2659+
<namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
2660+
DejaVu fonts team
2661+
</namerecord>
2662+
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
2663+
http://dejavu.sourceforge.net
2664+
</namerecord>
2665+
<namerecord nameID="13" platformID="3" platEncID="1" langID="0x409">
2666+
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
2667+
2668+
Bitstream Vera Fonts Copyright
2669+
------------------------------
2670+
2671+
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc.
2672+
2673+
Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions:
2674+
2675+
The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces.
2676+
2677+
The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera".
2678+
2679+
This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names.
2680+
2681+
The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself.
2682+
2683+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
2684+
2685+
Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.
2686+
2687+
</namerecord>
2688+
<namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
2689+
http://dejavu.sourceforge.net/wiki/index.php/License
2690+
</namerecord>
26592691
</name>
26602692

26612693
<post>

tests/ttx/LatinModernRoman-Regular_1.ttx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- Most of this table will be recalculated by the compiler -->
1515
<tableVersion value="1.0"/>
1616
<fontRevision value="2.004"/>
17-
<checkSumAdjustment value="0x45f2f96c"/>
17+
<checkSumAdjustment value="0x2274d006"/>
1818
<magicNumber value="0x5f0f3cf5"/>
1919
<flags value="00000000 00000011"/>
2020
<unitsPerEm value="1000"/>
@@ -78,6 +78,9 @@
7878
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
7979
LMRoman10-Regular
8080
</namerecord>
81+
<namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
82+
Please refer to the Copyright section for the font trademark attribution notices.
83+
</namerecord>
8184
</name>
8285

8386
<post>

tests/ttx/MPLUS1p-Regular_1.ttx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!-- Most of this table will be recalculated by the compiler -->
1818
<tableVersion value="1.0"/>
1919
<fontRevision value="1.062"/>
20-
<checkSumAdjustment value="0xef3cad6b"/>
20+
<checkSumAdjustment value="0xa36a45d9"/>
2121
<magicNumber value="0x5f0f3cf5"/>
2222
<flags value="00000010 00101011"/>
2323
<unitsPerEm value="1000"/>
@@ -945,6 +945,15 @@
945945
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
946946
MPLUS1p-Regular
947947
</namerecord>
948+
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
949+
http://mplus-fonts.osdn.jp
950+
</namerecord>
951+
<namerecord nameID="13" platformID="3" platEncID="1" langID="0x409">
952+
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
953+
</namerecord>
954+
<namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
955+
http://scripts.sil.org/OFL
956+
</namerecord>
948957
</name>
949958

950959
<post>

tests/ttx/NewCMMath-Regular_1.ttx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- Most of this table will be recalculated by the compiler -->
2121
<tableVersion value="1.0"/>
2222
<fontRevision value="2.0"/>
23-
<checkSumAdjustment value="0x29342cfe"/>
23+
<checkSumAdjustment value="0x6aa040c"/>
2424
<magicNumber value="0x5f0f3cf5"/>
2525
<flags value="00000000 00001011"/>
2626
<unitsPerEm value="1000"/>
@@ -85,6 +85,9 @@ This work is released under the GUST Font License -- see http://tug.org/fonts/li
8585
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
8686
NewCMMath-Regular
8787
</namerecord>
88+
<namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
89+
Please refer to the Copyright section for the font trademark attribution notices.
90+
</namerecord>
8891
</name>
8992

9093
<post>

tests/ttx/NotoSans-Regular_1.ttx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<!-- Most of this table will be recalculated by the compiler -->
2424
<tableVersion value="1.0"/>
2525
<fontRevision value="2.007"/>
26-
<checkSumAdjustment value="0xbda4def0"/>
26+
<checkSumAdjustment value="0x32c22e8a"/>
2727
<magicNumber value="0x5f0f3cf5"/>
2828
<flags value="00000000 00000011"/>
2929
<unitsPerEm value="1000"/>
@@ -600,6 +600,27 @@
600600
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
601601
NotoSans-Regular
602602
</namerecord>
603+
<namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
604+
Noto is a trademark of Google LLC.
605+
</namerecord>
606+
<namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
607+
Monotype Imaging Inc.
608+
</namerecord>
609+
<namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
610+
Monotype Design Team
611+
</namerecord>
612+
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
613+
http://www.google.com/get/noto/
614+
</namerecord>
615+
<namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
616+
http://www.monotype.com/studio
617+
</namerecord>
618+
<namerecord nameID="13" platformID="3" platEncID="1" langID="0x409">
619+
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL
620+
</namerecord>
621+
<namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
622+
http://scripts.sil.org/OFL
623+
</namerecord>
603624
</name>
604625

605626
<post>

tests/ttx/NotoSansCJKsc-Regular_1.ttx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<!-- Most of this table will be recalculated by the compiler -->
2424
<tableVersion value="1.0"/>
2525
<fontRevision value="2.004"/>
26-
<checkSumAdjustment value="0x4456ad8"/>
26+
<checkSumAdjustment value="0x110fb2b2"/>
2727
<magicNumber value="0x5f0f3cf5"/>
2828
<flags value="00000000 00000011"/>
2929
<unitsPerEm value="1000"/>
@@ -87,6 +87,27 @@
8787
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
8888
NotoSansCJKsc-Regular
8989
</namerecord>
90+
<namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
91+
Noto is a trademark of Google Inc.
92+
</namerecord>
93+
<namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
94+
Adobe
95+
</namerecord>
96+
<namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
97+
Ryoko NISHIZUKA 西塚涼子 (kana, bopomofo &amp; ideographs); Paul D. Hunt (Latin, Greek &amp; Cyrillic); Sandoll Communications 산돌커뮤니케이션, Soo-young JANG 장수영 &amp; Joo-yeon KANG 강주연 (hangul elements, letters &amp; syllables)
98+
</namerecord>
99+
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
100+
http://www.google.com/get/noto/
101+
</namerecord>
102+
<namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
103+
http://www.adobe.com/type/
104+
</namerecord>
105+
<namerecord nameID="13" platformID="3" platEncID="1" langID="0x409">
106+
This Font Software is licensed under the SIL Open Font License, Version 1.1. This Font Software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the SIL Open Font License for the specific language, permissions and limitations governing your use of this Font Software.
107+
</namerecord>
108+
<namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
109+
http://scripts.sil.org/OFL
110+
</namerecord>
90111
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x804">
91112
Noto Sans CJK SC
92113
</namerecord>

tests/ttx/Roboto-Regular_1.ttx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<!-- Most of this table will be recalculated by the compiler -->
1616
<tableVersion value="1.0"/>
1717
<fontRevision value="2.137"/>
18-
<checkSumAdjustment value="0x17a3497b"/>
18+
<checkSumAdjustment value="0xd056dc4b"/>
1919
<magicNumber value="0x5f0f3cf5"/>
2020
<flags value="00000000 00011001"/>
2121
<unitsPerEm value="2048"/>
@@ -1495,6 +1495,24 @@
14951495
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
14961496
Roboto-Regular
14971497
</namerecord>
1498+
<namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
1499+
Roboto is a trademark of Google.
1500+
</namerecord>
1501+
<namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
1502+
Google
1503+
</namerecord>
1504+
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
1505+
Google.com
1506+
</namerecord>
1507+
<namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
1508+
Christian Robertson
1509+
</namerecord>
1510+
<namerecord nameID="13" platformID="3" platEncID="1" langID="0x409">
1511+
Licensed under the Apache License, Version 2.0
1512+
</namerecord>
1513+
<namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
1514+
http://www.apache.org/licenses/LICENSE-2.0
1515+
</namerecord>
14981516
</name>
14991517

15001518
<post>

0 commit comments

Comments
 (0)