Skip to content

Commit d738b53

Browse files
committed
docs(fonts): say which rows the coverage test pins by name
The table's own preamble promised the test holds every row "to those exact families". It holds the single-family rows that way; the wider ones it holds to a count, which is a weaker claim and the one worth stating, since a reader deciding whether to trust a row deserves to know which kind it is. The Greek constant the wide rows used before they moved to a letters-only sweep is unreferenced now, so it goes.
1 parent e167dd1 commit d738b53

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

‎fonts/README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ in; four carry the whole block, including the extended letters the Central Asian
4949
Caucasian languages need. Greek is the modern alphabet rather than its Unicode block,
5050
whose archaic and Coptic letters no text face carries. Everything here is measured against
5151
the shipped binaries rather than against what a family is known for. (The standard-14 are
52-
WinAnsi and carry none of these scripts.) `BundledScriptCoverageTest` holds every row to those exact families, so
53-
this table fails a build rather than going quietly stale.
52+
WinAnsi and carry none of these scripts.) `BundledScriptCoverageTest` holds this table to the binaries: the single-family rows to
53+
those exact families, and the wider rows to their counts — so changing the bundled set
54+
fails a build and names the row to re-measure, rather than leaving the table to go quietly
55+
stale.
5456

5557
| Script | Families that cover it | How many |
5658
| --- | --- | --- |

‎render-pdf/src/test/java/com/demcha/compose/document/backend/fixed/pdf/BundledScriptCoverageTest.java‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,6 @@ void theWiderLatinAndGreekAndCyrillicRowsMatchTheirCounts() {
121121
0x1EA1, 0x1EA3, 0x1EA5, 0x1EAF, 0x1EBF, 0x1EC7, 0x1ED1,
122122
0x1EDD, 0x1EE7, 0x1EF1, 0x0102, 0x0110, 0x01A0, 0x01AF};
123123

124-
private static final int[] GREEK = greekLetters();
125-
126-
private static int[] greekLetters() {
127-
// U+0391..U+03C9 with U+03A2 removed: it is unassigned, so no font carries it and
128-
// a plain range sweep would report every Greek family as incomplete.
129-
return java.util.stream.IntStream.rangeClosed(0x0391, 0x03C9)
130-
.filter(codePoint -> codePoint != 0x03A2)
131-
.toArray();
132-
}
133-
134124
private static List<FontName> familiesCovering(int first, int last) {
135125
return FAMILIES.stream()
136126
.filter(family -> covers(family, first, last))

0 commit comments

Comments
 (0)