bitmap-font-maker: fontc - .font glyph grids -> atlas PNG + metrics JSON + text rendering
- .font format: glyph sections with #/. grids, proportional widths, literal unicode glyph names, spacing/space-width/line-height/baseline - build (atlas white-on-transparent + JSON metrics), render (text -> PNG with \n, scale, color), info, preview (terminal half-blocks) - example tiny5 font: A-Z, ÅÄÖ, 0-9, punctuation (47 glyphs, 3x5) - go tests: parsing, errors, atlas metrics, text rendering Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MmdG9GqfSWCzts7AkDwRDh
This commit is contained in:
340
bitmap-font-maker/examples/out/tiny5.json
Normal file
340
bitmap-font-maker/examples/out/tiny5.json
Normal file
@@ -0,0 +1,340 @@
|
||||
{
|
||||
"name": "tiny5",
|
||||
"atlas": "tiny5.png",
|
||||
"height": 5,
|
||||
"lineHeight": 6,
|
||||
"baseline": 5,
|
||||
"spacing": 1,
|
||||
"spaceWidth": 3,
|
||||
"glyphs": {
|
||||
"!": {
|
||||
"x": 36,
|
||||
"y": 30,
|
||||
"w": 1,
|
||||
"h": 5,
|
||||
"advance": 2
|
||||
},
|
||||
"'": {
|
||||
"x": 24,
|
||||
"y": 36,
|
||||
"w": 1,
|
||||
"h": 5,
|
||||
"advance": 2
|
||||
},
|
||||
"+": {
|
||||
"x": 18,
|
||||
"y": 36,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
",": {
|
||||
"x": 30,
|
||||
"y": 30,
|
||||
"w": 2,
|
||||
"h": 5,
|
||||
"advance": 3
|
||||
},
|
||||
"-": {
|
||||
"x": 12,
|
||||
"y": 36,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
".": {
|
||||
"x": 24,
|
||||
"y": 30,
|
||||
"w": 1,
|
||||
"h": 5,
|
||||
"advance": 2
|
||||
},
|
||||
"0": {
|
||||
"x": 6,
|
||||
"y": 24,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"1": {
|
||||
"x": 12,
|
||||
"y": 24,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"2": {
|
||||
"x": 18,
|
||||
"y": 24,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"3": {
|
||||
"x": 24,
|
||||
"y": 24,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"4": {
|
||||
"x": 30,
|
||||
"y": 24,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"5": {
|
||||
"x": 36,
|
||||
"y": 24,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"6": {
|
||||
"x": 0,
|
||||
"y": 30,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"7": {
|
||||
"x": 6,
|
||||
"y": 30,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"8": {
|
||||
"x": 12,
|
||||
"y": 30,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"9": {
|
||||
"x": 18,
|
||||
"y": 30,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
":": {
|
||||
"x": 6,
|
||||
"y": 36,
|
||||
"w": 1,
|
||||
"h": 5,
|
||||
"advance": 2
|
||||
},
|
||||
"?": {
|
||||
"x": 0,
|
||||
"y": 36,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"A": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"B": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"C": {
|
||||
"x": 12,
|
||||
"y": 0,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"D": {
|
||||
"x": 18,
|
||||
"y": 0,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"E": {
|
||||
"x": 24,
|
||||
"y": 0,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"F": {
|
||||
"x": 30,
|
||||
"y": 0,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"G": {
|
||||
"x": 36,
|
||||
"y": 0,
|
||||
"w": 4,
|
||||
"h": 5,
|
||||
"advance": 5
|
||||
},
|
||||
"H": {
|
||||
"x": 0,
|
||||
"y": 6,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"I": {
|
||||
"x": 6,
|
||||
"y": 6,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"J": {
|
||||
"x": 12,
|
||||
"y": 6,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"K": {
|
||||
"x": 18,
|
||||
"y": 6,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"L": {
|
||||
"x": 24,
|
||||
"y": 6,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"M": {
|
||||
"x": 30,
|
||||
"y": 6,
|
||||
"w": 5,
|
||||
"h": 5,
|
||||
"advance": 6
|
||||
},
|
||||
"N": {
|
||||
"x": 36,
|
||||
"y": 6,
|
||||
"w": 4,
|
||||
"h": 5,
|
||||
"advance": 5
|
||||
},
|
||||
"O": {
|
||||
"x": 0,
|
||||
"y": 12,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"P": {
|
||||
"x": 6,
|
||||
"y": 12,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"Q": {
|
||||
"x": 12,
|
||||
"y": 12,
|
||||
"w": 4,
|
||||
"h": 5,
|
||||
"advance": 5
|
||||
},
|
||||
"R": {
|
||||
"x": 18,
|
||||
"y": 12,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"S": {
|
||||
"x": 24,
|
||||
"y": 12,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"T": {
|
||||
"x": 30,
|
||||
"y": 12,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"U": {
|
||||
"x": 36,
|
||||
"y": 12,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"V": {
|
||||
"x": 0,
|
||||
"y": 18,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"W": {
|
||||
"x": 6,
|
||||
"y": 18,
|
||||
"w": 5,
|
||||
"h": 5,
|
||||
"advance": 6
|
||||
},
|
||||
"X": {
|
||||
"x": 12,
|
||||
"y": 18,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"Y": {
|
||||
"x": 18,
|
||||
"y": 18,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"Z": {
|
||||
"x": 24,
|
||||
"y": 18,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"Ä": {
|
||||
"x": 36,
|
||||
"y": 18,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"Å": {
|
||||
"x": 30,
|
||||
"y": 18,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
},
|
||||
"Ö": {
|
||||
"x": 0,
|
||||
"y": 24,
|
||||
"w": 3,
|
||||
"h": 5,
|
||||
"advance": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user