Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
27b2cd41
by Alexei Podtelezhnikov at 2023-02-07T23:03:18-05:00
2 changed files:
Changes:
... | ... | @@ -72,10 +72,12 @@ FT_BEGIN_HEADER |
72 | 72 | FT_EXPORT( void )
|
73 | 73 | FT_GlyphSlot_Oblique( FT_GlyphSlot slot );
|
74 | 74 | |
75 | - /* Slant an outline glyph by a given sine of an angle. */
|
|
75 | + /* Slant an outline glyph by a given sine of an angle. You can apply */
|
|
76 | + /* slant along either x- or y-axis. */
|
|
76 | 77 | FT_EXPORT( void )
|
77 | 78 | FT_GlyphSlot_Slant( FT_GlyphSlot slot,
|
78 | - FT_Fixed slant );
|
|
79 | + FT_Fixed xslant,
|
|
80 | + FT_Fixed yslant );
|
|
79 | 81 | |
80 | 82 | /* */
|
81 | 83 |
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 | FT_GlyphSlot_Oblique( FT_GlyphSlot slot )
|
48 | 48 | {
|
49 | 49 | /* Value '0x0366A' corresponds to a shear angle of about 12 degrees. */
|
50 | - FT_GlyphSlot_Slant( slot, 0x0366A );
|
|
50 | + FT_GlyphSlot_Slant( slot, 0x0366A, 0 );
|
|
51 | 51 | }
|
52 | 52 | |
53 | 53 | |
... | ... | @@ -55,7 +55,8 @@ |
55 | 55 | |
56 | 56 | FT_EXPORT_DEF( void )
|
57 | 57 | FT_GlyphSlot_Slant( FT_GlyphSlot slot,
|
58 | - FT_Fixed slant )
|
|
58 | + FT_Fixed xslant,
|
|
59 | + FT_Fixed yslant )
|
|
59 | 60 | {
|
60 | 61 | FT_Matrix transform;
|
61 | 62 | FT_Outline* outline;
|
... | ... | @@ -74,9 +75,9 @@ |
74 | 75 | |
75 | 76 | /* For italic, simply apply a shear transform */
|
76 | 77 | transform.xx = 0x10000L;
|
77 | - transform.yx = 0x00000L;
|
|
78 | + transform.yx = -yslant;
|
|
78 | 79 | |
79 | - transform.xy = slant;
|
|
80 | + transform.xy = xslant;
|
|
80 | 81 | transform.yy = 0x10000L;
|
81 | 82 | |
82 | 83 | FT_Outline_Transform( outline, &transform );
|