git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f08083f
)
fixed record device handling of font->{ascent,descent}
author
Matthias Kramm
<kramm@quiss.org>
Thu, 7 Jan 2010 21:05:46 +0000
(13:05 -0800)
committer
Matthias Kramm
<kramm@quiss.org>
Thu, 7 Jan 2010 21:05:46 +0000
(13:05 -0800)
lib/devices/record.c
patch
|
blob
|
history
diff --git
a/lib/devices/record.c
b/lib/devices/record.c
index
a8a0088
..
4cc75dd
100644
(file)
--- a/
lib/devices/record.c
+++ b/
lib/devices/record.c
@@
-241,6
+241,8
@@
static void dumpFont(writer_t*w, gfxfont_t*font)
writer_writeString(w, font->id);
writer_writeU32(w, font->num_glyphs);
writer_writeU32(w, font->max_unicode);
writer_writeString(w, font->id);
writer_writeU32(w, font->num_glyphs);
writer_writeU32(w, font->max_unicode);
+ writer_writeDouble(w, font->ascent);
+ writer_writeDouble(w, font->descent);
int t;
for(t=0;t<font->num_glyphs;t++) {
dumpLine(w, font->glyphs[t].line);
int t;
for(t=0;t<font->num_glyphs;t++) {
dumpLine(w, font->glyphs[t].line);
@@
-262,6
+264,8
@@
static gfxfont_t*readFont(reader_t*r)
font->id = reader_readString(r);
font->num_glyphs = reader_readU32(r);
font->max_unicode = reader_readU32(r);
font->id = reader_readString(r);
font->num_glyphs = reader_readU32(r);
font->max_unicode = reader_readU32(r);
+ font->ascent = reader_readDouble(r);
+ font->descent = reader_readDouble(r);
font->glyphs = (gfxglyph_t*)rfx_calloc(sizeof(gfxglyph_t)*font->num_glyphs);
font->unicode2glyph = (int*)rfx_calloc(sizeof(font->unicode2glyph[0])*font->max_unicode);
int t;
font->glyphs = (gfxglyph_t*)rfx_calloc(sizeof(gfxglyph_t)*font->num_glyphs);
font->unicode2glyph = (int*)rfx_calloc(sizeof(font->unicode2glyph[0])*font->max_unicode);
int t;