Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
d51452e3
by Werner Lemberg at 2021-02-13T08:52:58+01:00
4 changed files:
Changes:
1 |
+2021-02-13 Werner Lemberg <wl@gnu.org>
|
|
2 |
+ |
|
3 |
+ Add new function `FT_Get_Transform`.
|
|
4 |
+ |
|
5 |
+ See
|
|
6 |
+ |
|
7 |
+ https://github.com/harfbuzz/harfbuzz/issues/2428
|
|
8 |
+ |
|
9 |
+ for some reasons to introduce this function.
|
|
10 |
+ |
|
11 |
+ * include/freetype/freetype.h, src/base/ftobjs.c (FT_Get_Transform):
|
|
12 |
+ Implement it.
|
|
13 |
+ |
|
1 | 14 |
2021-02-12 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2 | 15 |
|
3 | 16 |
Decorate `qsort` callbacks with `cdecl`.
|
... | ... | @@ -50,16 +50,6 @@ CHANGES BETWEEN 2.10.4 and 2.11.0 |
50 | 50 |
|
51 | 51 |
II. MISCELLANEOUS
|
52 | 52 |
|
53 |
- - `ttdebug` didn't show changed point coordinates (bug introduced in
|
|
54 |
- version 2.10.3).
|
|
55 |
- |
|
56 |
- - A new configuration macro `FT_DEBUG_LOGGING` is available. It
|
|
57 |
- provides extended debugging capabilities for FreeType, for example
|
|
58 |
- showing a time stamp or displaying the component a tracing message
|
|
59 |
- comes from. See file `docs/DEBUG` for more information.
|
|
60 |
- |
|
61 |
- This work was Priyesh Kumar's GSoC 2020 project.
|
|
62 |
- |
|
63 | 53 |
- FreeType has moved its infrastructure to
|
64 | 54 |
|
65 | 55 |
https://gitlab.freedesktop.org/freetype
|
... | ... | @@ -72,6 +62,19 @@ CHANGES BETWEEN 2.10.4 and 2.11.0 |
72 | 62 |
FreeType's Savannah repositories will stay; they are now mirrors
|
73 | 63 |
of the 'freedesktop.org' repositories.
|
74 | 64 |
|
65 |
+ - A new function `FT_Get_Transform` returns the values set by
|
|
66 |
+ `FT_Set_Transform`.
|
|
67 |
+ |
|
68 |
+ - A new configuration macro `FT_DEBUG_LOGGING` is available. It
|
|
69 |
+ provides extended debugging capabilities for FreeType, for example
|
|
70 |
+ showing a time stamp or displaying the component a tracing message
|
|
71 |
+ comes from. See file `docs/DEBUG` for more information.
|
|
72 |
+ |
|
73 |
+ This work was Priyesh Kumar's GSoC 2020 project.
|
|
74 |
+ |
|
75 |
+ - `ttdebug` didn't show changed point coordinates (bug introduced in
|
|
76 |
+ version 2.10.3).
|
|
77 |
+ |
|
75 | 78 |
|
76 | 79 |
======================================================================
|
77 | 80 |
|
... | ... | @@ -204,6 +204,7 @@ FT_BEGIN_HEADER |
204 | 204 |
* FT_Size_RequestRec
|
205 | 205 |
* FT_Size_Request
|
206 | 206 |
* FT_Set_Transform
|
207 |
+ * FT_Get_Transform
|
|
207 | 208 |
* FT_Load_Glyph
|
208 | 209 |
* FT_Get_Char_Index
|
209 | 210 |
* FT_Get_First_Char
|
... | ... | @@ -3200,7 +3201,8 @@ FT_BEGIN_HEADER |
3200 | 3201 |
* A pointer to the transformation's 2x2 matrix. Use `NULL` for the
|
3201 | 3202 |
* identity matrix.
|
3202 | 3203 |
* delta ::
|
3203 |
- * A pointer to the translation vector. Use `NULL` for the null vector.
|
|
3204 |
+ * A pointer to the translation vector. Use `NULL` for the null
|
|
3205 |
+ * vector.
|
|
3204 | 3206 |
*
|
3205 | 3207 |
* @note:
|
3206 | 3208 |
* This function is provided as a convenience, but keep in mind that
|
... | ... | @@ -3223,6 +3225,35 @@ FT_BEGIN_HEADER |
3223 | 3225 |
FT_Vector* delta );
|
3224 | 3226 |
|
3225 | 3227 |
|
3228 |
+ /**************************************************************************
|
|
3229 |
+ *
|
|
3230 |
+ * @function:
|
|
3231 |
+ * FT_Get_Transform
|
|
3232 |
+ *
|
|
3233 |
+ * @description:
|
|
3234 |
+ * Return the transformation that is applied to glyph images when they
|
|
3235 |
+ * are loaded into a glyph slot through @FT_Load_Glyph. See
|
|
3236 |
+ * @FT_Set_Transform for more details.
|
|
3237 |
+ *
|
|
3238 |
+ * @input:
|
|
3239 |
+ * face ::
|
|
3240 |
+ * A handle to the source face object.
|
|
3241 |
+ *
|
|
3242 |
+ * @output:
|
|
3243 |
+ * matrix ::
|
|
3244 |
+ * A pointer to a transformation's 2x2 matrix. Set this to NULL if you
|
|
3245 |
+ * are not interested in the value.
|
|
3246 |
+ *
|
|
3247 |
+ * delta ::
|
|
3248 |
+ * A pointer a translation vector. Set this to NULL if you are not
|
|
3249 |
+ * interested in the value.
|
|
3250 |
+ */
|
|
3251 |
+ FT_EXPORT( void )
|
|
3252 |
+ FT_Get_Transform( FT_Face face,
|
|
3253 |
+ FT_Matrix* matrix,
|
|
3254 |
+ FT_Vector* delta );
|
|
3255 |
+ |
|
3256 |
+ |
|
3226 | 3257 |
/**************************************************************************
|
3227 | 3258 |
*
|
3228 | 3259 |
* @enum:
|
... | ... | @@ -738,6 +738,29 @@ |
738 | 738 |
}
|
739 | 739 |
|
740 | 740 |
|
741 |
+ /* documentation is in freetype.h */
|
|
742 |
+ |
|
743 |
+ FT_EXPORT_DEF( void )
|
|
744 |
+ FT_Get_Transform( FT_Face face,
|
|
745 |
+ FT_Matrix* matrix,
|
|
746 |
+ FT_Vector* delta )
|
|
747 |
+ {
|
|
748 |
+ FT_Face_Internal internal;
|
|
749 |
+ |
|
750 |
+ |
|
751 |
+ if ( !face )
|
|
752 |
+ return;
|
|
753 |
+ |
|
754 |
+ internal = face->internal;
|
|
755 |
+ |
|
756 |
+ if ( matrix )
|
|
757 |
+ *matrix = internal->transform_matrix;
|
|
758 |
+ |
|
759 |
+ if ( delta )
|
|
760 |
+ *delta = internal->transform_delta;
|
|
761 |
+ }
|
|
762 |
+ |
|
763 |
+ |
|
741 | 764 |
static FT_Renderer
|
742 | 765 |
ft_lookup_glyph_renderer( FT_GlyphSlot slot );
|
743 | 766 |
|