-
Notifications
You must be signed in to change notification settings - Fork 1
PBFF Format description
The pbff
format is a way encode raster font data in a human-readable fashion.
Here's how it works:
version
[required] -- informs the font serializer which version should be used.
line-height
[required] -- informs the font serializer which max-height should be used
fallback_codepoint
[optional] -- sets the fallback character. Default: 9647
glyph [codepoint: decimal]
-- Sets the glyph's codepoint. Everything after the number is ignored.
*-* \d+
-- Encodes information about the advance data.
The amount of dashes indicates the advance
of the character.
The optional spaces at the beginning of the line signal are used when the left
value is negative.
The number following the dashes indicates the top offset.
Thereafter, lines with spaces and octothorpes follow.
(The amount of such lines + The top offset) <= line-height
These lines encode actual character data. It should be noted that the conversion script will choose a bounding box around the octothorpes (which represent a set bit.)
Finally, a line with a hyphen follows to mark the end of the glyph.
Here's an example file which encodes the two characters shown in the image above along with the space character:
version 3
line-height 18
fallback_codepoint 9647
glyph 32 -- Space
---
-
glyph 64 -- @
---------- 6
####
# #
# ### #
# # # #
# # # #
# ### #
# #
###
-
glyph 106 -- j
---- 6
#
##
#
#
#
#
#
# #
##
-