Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion snippets/data_types/FontType.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The typographic style a font represents.
Bit flags describing the typographic style a font represents. No flags set means Regular.
12 changes: 7 additions & 5 deletions src/Data Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ Reference for the data types used throughout this specification and its referenc

\textinput{../snippets/data_types/FontType.md}

| Variant | Description |
| ------- | ----------- |
| `Regular` | \textinput{../snippets/data_types/FontType/Regular.md} |
| `Bold` | \textinput{../snippets/data_types/FontType/Bold.md} |
| `Italic` | \textinput{../snippets/data_types/FontType/Italic.md} |
| Bit | Name | Description |
| --- | ---- | ----------- |
| 0 | `Bold` | \textinput{../snippets/data_types/FontType/Bold.md} |
| 1 | `Italic` | \textinput{../snippets/data_types/FontType/Italic.md} |
| 2-7 | — | \textinput{../snippets/phrase/reserved.md} |

No bits set represents `Regular`: \textinput{../snippets/data_types/FontType/Regular.md}
12 changes: 6 additions & 6 deletions src/Font Table.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
| 1 | `name` | `00000000` | `00` | Empty name, terminator only |
| 2 | `author` | `00000000` | `00` | Empty author, terminator only |
| 3 | `version` | `00000001` | `01` | Version 1 |
| 4 | `font_type` | `00000000` | `00` | 0 = Regular |
| 4 | `font_type` | `00000000` | `00` | No bits set = Regular |
| 5 | `linked_character_table_indexes` | `00000001` | `01` | Array length = 1 |
| 6 | `linked_character_table_indexes` | `00000000` | `00` | Uses Character Table 0 |

Expand All @@ -79,13 +79,13 @@
| 9 | `author` | `01100101` | `65` | `e` |
| 10 | — | `00000000` | `00` | Null terminator ends `author` |
| 11 | `version` | `00000001` | `01` | Version 1 |
| 12 | `font_type` | `00000000` | `00` | 0 = Regular |
| 12 | `font_type` | `00000000` | `00` | No bits set = Regular |
| 13 | `linked_character_table_indexes` | `00000001` | `01` | Array length = 1 |
| 14 | `linked_character_table_indexes` | `00000000` | `00` | Uses Character Table 0 |

**Example 3: Non-ASCII metadata and multiple Character Tables**

The font `Toys` by `Nicé`, a bold variant drawing from two Character Tables. The author's last code point needs two UTF-8 bytes.
The font `Toys` by `Nicé`, a bold and italic variant drawing from two Character Tables. The author's last code point needs two UTF-8 bytes.

| Byte | Field | Binary | Hex | Description |
| ---- | ------------------ | ---------- | ---- | ------------------------------------ |
Expand All @@ -101,7 +101,7 @@
| 10 | `author` | `10101001` | `A9` | `é` (U+00E9), byte 2 of 2 |
| 11 | — | `00000000` | `00` | Null terminator ends `author` |
| 12 | `version` | `00000010` | `02` | Version 2 |
| 13 | `font_type` | `00000001` | `01` | 1 = Bold |
| 13 | `font_type` | `00000011` | `03` | Bits 0,1 set = Bold & Italic |
| 14 | `linked_character_table_indexes` | `00000010` | `02` | Array length = 2 |
| 15 | `linked_character_table_indexes` | `00000000` | `00` | Uses Character Table 0 |
| 16 | `linked_character_table_indexes` | `00000010` | `02` | Uses Character Table 2 |
Expand Down Expand Up @@ -131,7 +131,7 @@
| 17 | `01100101` | `65` | Font 0: `author` = `e` |
| 18 | `00000000` | `00` | Font 0: `author` terminator |
| 19 | `00000001` | `01` | Font 0: `version` = 1 |
| 20 | `00000000` | `00` | Font 0: `font_type` = 0 (Regular) |
| 20 | `00000000` | `00` | Font 0: `font_type` = no bits set (Regular) |

Check notice on line 134 in src/Font Table.md

View workflow job for this annotation

GitHub Actions / vale

[vale] src/Font Table.md#L134 <Google.Parens>(https://developers.google.com/style/parentheses)

Use parentheses judiciously.
Raw output
{"message":"Use parentheses judiciously.","location":{"path":"src/Font Table.md","range":{"start":{"line":134,"column":67},"end":{"line":134,"column":76}}},"severity":"INFO","code":{"value":"Google.Parens","url":"https://developers.google.com/style/parentheses"}}
| 21 | `00000001` | `01` | Font 0: character table array length = 1 |
| 22 | `00000000` | `00` | Font 0: uses Character Table 0 |
| 23 | `01010100` | `54` | Font 1: `name` = `T` |
Expand All @@ -145,6 +145,6 @@
| 31 | `01100101` | `65` | Font 1: `author` = `e` |
| 32 | `00000000` | `00` | Font 1: `author` terminator |
| 33 | `00000001` | `01` | Font 1: `version` = 1 |
| 34 | `00000001` | `01` | Font 1: `font_type` = 1 (Bold) |
| 34 | `00000001` | `01` | Font 1: `font_type` = bit 0 set (Bold) |

Check notice on line 148 in src/Font Table.md

View workflow job for this annotation

GitHub Actions / vale

[vale] src/Font Table.md#L148 <Google.Parens>(https://developers.google.com/style/parentheses)

Use parentheses judiciously.
Raw output
{"message":"Use parentheses judiciously.","location":{"path":"src/Font Table.md","range":{"start":{"line":148,"column":65},"end":{"line":148,"column":71}}},"severity":"INFO","code":{"value":"Google.Parens","url":"https://developers.google.com/style/parentheses"}}
| 35 | `00000001` | `01` | Font 1: character table array length = 1 |
| 36 | `00000001` | `01` | Font 1: uses Character Table 1 |
Loading