Open sunaku opened 1 year ago
In the meantime, I'm working around this issue by hacking makeHeadTable()
in the TTFBitmapFontExporter
class as follows:
diff --git a/main/java/BitsNPicas/src/com/kreative/bitsnpicas/exporter/TTFBitmapFontExporter.java b/main/java/BitsNPicas/src/com/kreative/bitsnpicas/exporter/TTFBitmapFontExporter.java
index bdf6669..9d05c2f 100755
--- a/main/java/BitsNPicas/src/com/kreative/bitsnpicas/exporter/TTFBitmapFontExporter.java
+++ b/main/java/BitsNPicas/src/com/kreative/bitsnpicas/exporter/TTFBitmapFontExporter.java
@@ -242,8 +242,8 @@ public class TTFBitmapFontExporter implements BitmapFontExporter {
headTable.setFontRevisionDouble(fontVersion);
headTable.flags = HeadTable.FLAGS_Y_VALUE_OF_ZERO_SPECIFIES_BASELINE | HeadTable.FLAGS_MINIMUM_X_VALUE_IS_LEFT_SIDE_BEARING;
headTable.unitsPerEm = (bf.getEmAscent() + bf.getEmDescent()) * ysize;
- headTable.setDateCreatedCalendar(now);
- headTable.setDateModifiedCalendar(now);
headTable.xMin = a.bbx1;
headTable.yMin = a.bby1;
headTable.xMax = a.bbx2;
I'm thinking of adding either a new -nt
flag that disables timestamps entirely (like the hack in my previous comment above) or two new -ct
and -mt
options that let the user specify the creation and modification times respectively on the command line.
Which would you prefer? :nerd_face: I'll submit a pull request accordingly.
Hello,
TTF files converted from BDF files are always slightly different (in terms of their binary file contents; not in terms of actual appearance / font rendering) each time they are converted. Specifically, byte offsets 50-51 (represented by the 0x40 line in the hexdump below) as well as bytes in the offset range 160-192 (represented by the 0xb0-0xc0 lines in the hexdump below) vary each time I do the conversion (as follows) using the latest Bits'N'Picas built from the Git master branch at commit 6eb4d3b5e7983d9e99906bf26561ca32d6b36c30.
Could the conversion be made idempotent, so that a given BDF file always produces the same TTF output? (stable checksum)
Thanks for your consideration.