static const int WRITEFONTID = 0x4e46; // font id for WriteFont and ReadFont
-int swf_FontEnumerate(SWF * swf, void (*FontCallback) (void*, U16, U8 *), void*self)
+int swf_FontEnumerate(SWF * swf, void (*FontCallback) (void*, U16, U8 *, void*self), void*self)
{
int n;
TAG *t;
s[l] = 0;
}
- (FontCallback) (self, id, s);
+ (FontCallback) (self, id, s, self);
swf_RestoreTagPos(t);
}
swf_SetRGB(t, color);
}
if (dx) {
- dx &= ~SET_TO_ZERO;
- if(dx>32767 || dx<-32768)
- fprintf(stderr, "Warning: Horizontal char position overflow: %d\n", dx);
- swf_SetS16(t, dx);
+ if(dx != SET_TO_ZERO) {
+ if(dx>32767 || dx<-32768)
+ fprintf(stderr, "Warning: Horizontal char position overflow: %d\n", dx);
+ swf_SetS16(t, dx);
+ } else {
+ swf_SetS16(t, 0);
+ }
}
if (dy) {
- dy &= ~SET_TO_ZERO;
- if(dy>32767 || dy<-32768)
- fprintf(stderr, "Warning: Vertical char position overflow: %d\n", dy);
- swf_SetS16(t, dy);
+ if(dy != SET_TO_ZERO) {
+ if(dy>32767 || dy<-32768)
+ fprintf(stderr, "Warning: Vertical char position overflow: %d\n", dy);
+ swf_SetS16(t, dy);
+ } else {
+ swf_SetS16(t, 0);
+ }
}
if (font)
swf_SetU16(t, size);