Skip to content

Conversation

KartMakerBrosU
Copy link
Contributor

The previous documentation of the BFFNT's Kerning section was incorrect. I corrected it to document the FirstWord and SecondWord pairs correctly.

The previous documentation of the BFFNT's Kerning section was incorrect. Updated it to explain it correctly.
@kinnay
Copy link
Owner

kinnay commented Jul 19, 2025

Interesting, do you know why this is called FirstWord and SecondWord?

@KartMakerBrosU
Copy link
Contributor Author

Kerning pairs are based off of how to offset the SecondWord character based on which FirstWord character came before it. The labeling of FirstWord and SecondWord is a result of another tool which properly parsed the section labeling them that way for a similar format to BFFNT. If this is an issue I can change it to make it easier to understand.

| 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?

| 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?

| 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.

What do these dots mean?

| 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?

@kinnay
Copy link
Owner

kinnay commented Jul 20, 2025

I think it would be good to clarify this. I've left a few comments, do you want to work on them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants