summaryrefslogtreecommitdiff
path: root/src/sfnt.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-08-16 11:02:55 +0800
committerPo Lu <luangruo@yahoo.com>2023-08-16 11:02:55 +0800
commit6dacf5bce4e55f216561c3f38561b5479f8ba640 (patch)
treedd07e9ed013d9d6eb03659618159ba9e20afd2f9 /src/sfnt.h
parent612f25c24ff08b9343ec8897c8dbcfc02d9b0d07 (diff)
downloademacs-6dacf5bce4e55f216561c3f38561b5479f8ba640.tar.gz
Fix display of compound glyphs that employ simple transforms
* src/sfnt.c (sfnt_transform_coordinates): Always compute an affine transform matrix except if no scale is provided at all. Unconditionally apply x_off and y_off. (sfnt_decompose_compound_glyph): Delete arguments OF_X and OFF_Y. Apply component offsets after writing simple glyph contours. (sfnt_decompose_glyph): Modify for new calling convention. (sfnt_transform_f26dot6): Modify analogously to sfnt_decompose_compound_glyph. Also correct anchor offset computation to scale the unscaled component anchor coordinates by the interpreter scale. (sfnt_interpret_compound_glyph_1): Also modify for new calling convention. * src/sfnt.h (struct sfnt_compound_glyph_component): <u>: Make scale fields signed.
Diffstat (limited to 'src/sfnt.h')
-rw-r--r--src/sfnt.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sfnt.h b/src/sfnt.h
index 48d22aa8d29..6f93393c1d3 100644
--- a/src/sfnt.h
+++ b/src/sfnt.h
@@ -623,16 +623,16 @@ struct sfnt_compound_glyph_component
/* Various scale formats. */
union {
- uint16_t scale;
+ int16_t scale;
struct {
- uint16_t xscale;
- uint16_t yscale;
+ int16_t xscale;
+ int16_t yscale;
} a;
struct {
- uint16_t xscale;
- uint16_t scale01;
- uint16_t scale10;
- uint16_t yscale;
+ int16_t xscale;
+ int16_t scale01;
+ int16_t scale10;
+ int16_t yscale;
} b;
} u;
};