-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BDF to TTF conversion isn't idempotent #35
Comments
In the meantime, I'm working around this issue by hacking 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 Which would you prefer? 🤓 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 6eb4d3b.
Could the conversion be made idempotent, so that a given BDF file always produces the same TTF output? (stable checksum)
Thanks for your consideration.
The text was updated successfully, but these errors were encountered: