summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-03-05 21:34:57 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2011-03-05 21:34:57 (GMT)
commit2da1e199d6431d239a2ce5e4c2d55f128545cb44 (patch)
tree3a3850615aad5e6be4f057203c5d29cdb7a6a559
parent73f1c1a927fa70d4c66445781a4ccf30d4c5c91d (diff)
downloadttf2f-2da1e199d6431d239a2ce5e4c2d55f128545cb44.tar.gz
ttf2f-2da1e199d6431d239a2ce5e4c2d55f128545cb44.tar.bz2
Make struct char_data packed
svn path=/trunk/tools/ttf2f/; revision=11915
-rw-r--r--src/outlines.c1
-rw-r--r--src/outlines.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/outlines.c b/src/outlines.c
index 962042c..14dab36 100644
--- a/src/outlines.c
+++ b/src/outlines.c
@@ -112,6 +112,7 @@ ttf2f_result outlines_write(const char *savein, const char *name,
current_chunk_offset += 42 + strlen(ctx->metrics->name_full) +
strlen(ctx->metrics->name_copyright);
+ /* Word align */
while (current_chunk_offset % 4) {
if (fputc(0x0, output) == EOF) goto error_write;
current_chunk_offset++;
diff --git a/src/outlines.h b/src/outlines.h
index 4b67ea4..03d8a58 100644
--- a/src/outlines.h
+++ b/src/outlines.h
@@ -38,7 +38,7 @@ struct char_data {
char flags;
char x0y0[3];
char xsys[3];
-};
+} __attribute__((packed));
#define CHAR_12BIT_COORDS 0x01
#define CHAR_1BPP 0x02