Skip to content
Open
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
26 changes: 18 additions & 8 deletions src/libs/nw/bffnt.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,30 @@ The first and last character code in the section header are ignored.
| ... | ... | ... |

## Kerning Section
Offsets the horizontal position of glyphs. Positive is right, negative is left. (Pixel Based)
Kerning for Glyphs not listed default to 0.
Stores an array of Kerning pairs.

| Offset | Size | Description |
| --- | --- | --- |
| 0x0 | 4 | Identifier ("KRNG") |
| 0x4 | 4 | Section size |
| 0x8 | | Kerning Data |
| 0x8 | 2 | Number of Kerning FirstWord Entries |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we come up with a better name for FirstWord and SecondWord?

| 0xA| | Kerning FirstWord Data |
| | | Kerning SecondWord Data |

### Kerning FirstWord Data
The offset starts at 0x08 of the KRNG section.
Actual offset to SecondWord is 2x what's stored.

### Kerning Data
| Offset | Size | Description |
| --- | --- | --- |
| 0x2 | 2 | Character Code 1 |
| 0x4 | 2 | Horizontal Offset for Glyph 1 |
| 0x6 | 2 | Character Code 2 |
| 0x8 | 2 | Horizontal Offset for Glyph 2 |
| 0x2 | 2 | Character code |
| 0x4 | 2 | Offset to its SecondWord entries |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 'entries' is plural, how many SecondWord entries does each FirstWord entry refer to?

| ... | ... | ... |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do these dots mean?


### Kerning SecondWord Data
Positive offset moves the character to the right, negative to the left. (Pixel Based)

| Offset | Size | Description |
| --- | --- | --- |
| 0x0 | 2 | Character code |
| 0x1 | 2 | Character offset |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the character offset be at offset 0x2, since the size of the character code is 2 bytes?