... |
... |
@@ -215,7 +215,6 @@ FT_BEGIN_HEADER |
215
|
215
|
* FT_Get_Char_Index
|
216
|
216
|
* FT_Get_First_Char
|
217
|
217
|
* FT_Get_Next_Char
|
218
|
|
- * FT_Get_Name_Index
|
219
|
218
|
* FT_Load_Char
|
220
|
219
|
*
|
221
|
220
|
* FT_OPEN_MEMORY
|
... |
... |
@@ -254,14 +253,15 @@ FT_BEGIN_HEADER |
254
|
253
|
* FT_Get_Kerning
|
255
|
254
|
* FT_Kerning_Mode
|
256
|
255
|
* FT_Get_Track_Kerning
|
257
|
|
- * FT_Get_Glyph_Name
|
258
|
|
- * FT_Get_Postscript_Name
|
259
|
256
|
*
|
260
|
257
|
* FT_CharMapRec
|
261
|
258
|
* FT_Select_Charmap
|
262
|
259
|
* FT_Set_Charmap
|
263
|
260
|
* FT_Get_Charmap_Index
|
264
|
261
|
*
|
|
262
|
+ * FT_Get_Name_Index
|
|
263
|
+ * FT_Get_Glyph_Name
|
|
264
|
+ * FT_Get_Postscript_Name
|
265
|
265
|
* FT_Get_FSType_Flags
|
266
|
266
|
* FT_Get_SubGlyph_Info
|
267
|
267
|
*
|
... |
... |
@@ -3840,89 +3840,6 @@ FT_BEGIN_HEADER |
3840
|
3840
|
FT_Fixed* akerning );
|
3841
|
3841
|
|
3842
|
3842
|
|
3843
|
|
- /**************************************************************************
|
3844
|
|
- *
|
3845
|
|
- * @function:
|
3846
|
|
- * FT_Get_Glyph_Name
|
3847
|
|
- *
|
3848
|
|
- * @description:
|
3849
|
|
- * Retrieve the ASCII name of a given glyph in a face. This only works
|
3850
|
|
- * for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1.
|
3851
|
|
- *
|
3852
|
|
- * @input:
|
3853
|
|
- * face ::
|
3854
|
|
- * A handle to a source face object.
|
3855
|
|
- *
|
3856
|
|
- * glyph_index ::
|
3857
|
|
- * The glyph index.
|
3858
|
|
- *
|
3859
|
|
- * buffer_max ::
|
3860
|
|
- * The maximum number of bytes available in the buffer.
|
3861
|
|
- *
|
3862
|
|
- * @output:
|
3863
|
|
- * buffer ::
|
3864
|
|
- * A pointer to a target buffer where the name is copied to.
|
3865
|
|
- *
|
3866
|
|
- * @return:
|
3867
|
|
- * FreeType error code. 0~means success.
|
3868
|
|
- *
|
3869
|
|
- * @note:
|
3870
|
|
- * An error is returned if the face doesn't provide glyph names or if the
|
3871
|
|
- * glyph index is invalid. In all cases of failure, the first byte of
|
3872
|
|
- * `buffer` is set to~0 to indicate an empty name.
|
3873
|
|
- *
|
3874
|
|
- * The glyph name is truncated to fit within the buffer if it is too
|
3875
|
|
- * long. The returned string is always zero-terminated.
|
3876
|
|
- *
|
3877
|
|
- * Be aware that FreeType reorders glyph indices internally so that glyph
|
3878
|
|
- * index~0 always corresponds to the 'missing glyph' (called '.notdef').
|
3879
|
|
- *
|
3880
|
|
- * This function always returns an error if the config macro
|
3881
|
|
- * `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
|
3882
|
|
- */
|
3883
|
|
- FT_EXPORT( FT_Error )
|
3884
|
|
- FT_Get_Glyph_Name( FT_Face face,
|
3885
|
|
- FT_UInt glyph_index,
|
3886
|
|
- FT_Pointer buffer,
|
3887
|
|
- FT_UInt buffer_max );
|
3888
|
|
-
|
3889
|
|
-
|
3890
|
|
- /**************************************************************************
|
3891
|
|
- *
|
3892
|
|
- * @function:
|
3893
|
|
- * FT_Get_Postscript_Name
|
3894
|
|
- *
|
3895
|
|
- * @description:
|
3896
|
|
- * Retrieve the ASCII PostScript name of a given face, if available.
|
3897
|
|
- * This only works with PostScript, TrueType, and OpenType fonts.
|
3898
|
|
- *
|
3899
|
|
- * @input:
|
3900
|
|
- * face ::
|
3901
|
|
- * A handle to the source face object.
|
3902
|
|
- *
|
3903
|
|
- * @return:
|
3904
|
|
- * A pointer to the face's PostScript name. `NULL` if unavailable.
|
3905
|
|
- *
|
3906
|
|
- * @note:
|
3907
|
|
- * The returned pointer is owned by the face and is destroyed with it.
|
3908
|
|
- *
|
3909
|
|
- * For variation fonts, this string changes if you select a different
|
3910
|
|
- * instance, and you have to call `FT_Get_PostScript_Name` again to
|
3911
|
|
- * retrieve it. FreeType follows Adobe TechNote #5902, 'Generating
|
3912
|
|
- * PostScript Names for Fonts Using OpenType Font Variations'.
|
3913
|
|
- *
|
3914
|
|
- * https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html
|
3915
|
|
- *
|
3916
|
|
- * [Since 2.9] Special PostScript names for named instances are only
|
3917
|
|
- * returned if the named instance is set with @FT_Set_Named_Instance (and
|
3918
|
|
- * the font has corresponding entries in its 'fvar' table). If
|
3919
|
|
- * @FT_IS_VARIATION returns true, the algorithmically derived PostScript
|
3920
|
|
- * name is provided, not looking up special entries for named instances.
|
3921
|
|
- */
|
3922
|
|
- FT_EXPORT( const char* )
|
3923
|
|
- FT_Get_Postscript_Name( FT_Face face );
|
3924
|
|
-
|
3925
|
|
-
|
3926
|
3843
|
/**************************************************************************
|
3927
|
3844
|
*
|
3928
|
3845
|
* @function:
|
... |
... |
@@ -4243,7 +4160,8 @@ FT_BEGIN_HEADER |
4243
|
4160
|
* FT_Get_Name_Index
|
4244
|
4161
|
*
|
4245
|
4162
|
* @description:
|
4246
|
|
- * Return the glyph index of a given glyph name.
|
|
4163
|
+ * Return the glyph index of a given glyph name. This only works
|
|
4164
|
+ * for those faces where @FT_HAS_GLYPH_NAMES returns true.
|
4247
|
4165
|
*
|
4248
|
4166
|
* @input:
|
4249
|
4167
|
* face ::
|
... |
... |
@@ -4254,12 +4172,103 @@ FT_BEGIN_HEADER |
4254
|
4172
|
*
|
4255
|
4173
|
* @return:
|
4256
|
4174
|
* The glyph index. 0~means 'undefined character code'.
|
|
4175
|
+ *
|
|
4176
|
+ * @note:
|
|
4177
|
+ * The acceptable glyph name might come from
|
|
4178
|
+ * [Adobe Glyph List](https://github.com/adobe-type-tools/agl-aglfn).
|
|
4179
|
+ * See @FT_Get_Glyph_Name for the resiprocal function.
|
|
4180
|
+ *
|
|
4181
|
+ * This function always returns~0 if the config macro
|
|
4182
|
+ * `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
|
4257
|
4183
|
*/
|
4258
|
4184
|
FT_EXPORT( FT_UInt )
|
4259
|
4185
|
FT_Get_Name_Index( FT_Face face,
|
4260
|
4186
|
const FT_String* glyph_name );
|
4261
|
4187
|
|
4262
|
4188
|
|
|
4189
|
+ /**************************************************************************
|
|
4190
|
+ *
|
|
4191
|
+ * @function:
|
|
4192
|
+ * FT_Get_Glyph_Name
|
|
4193
|
+ *
|
|
4194
|
+ * @description:
|
|
4195
|
+ * Retrieve the ASCII name of a given glyph in a face. This only works
|
|
4196
|
+ * for those faces where @FT_HAS_GLYPH_NAMES returns true.
|
|
4197
|
+ *
|
|
4198
|
+ * @input:
|
|
4199
|
+ * face ::
|
|
4200
|
+ * A handle to a source face object.
|
|
4201
|
+ *
|
|
4202
|
+ * glyph_index ::
|
|
4203
|
+ * The glyph index.
|
|
4204
|
+ *
|
|
4205
|
+ * buffer_max ::
|
|
4206
|
+ * The maximum number of bytes available in the buffer.
|
|
4207
|
+ *
|
|
4208
|
+ * @output:
|
|
4209
|
+ * buffer ::
|
|
4210
|
+ * A pointer to a target buffer where the name is copied to.
|
|
4211
|
+ *
|
|
4212
|
+ * @return:
|
|
4213
|
+ * FreeType error code. 0~means success.
|
|
4214
|
+ *
|
|
4215
|
+ * @note:
|
|
4216
|
+ * An error is returned if the face doesn't provide glyph names or if the
|
|
4217
|
+ * glyph index is invalid. In all cases of failure, the first byte of
|
|
4218
|
+ * `buffer` is set to~0 to indicate an empty name.
|
|
4219
|
+ *
|
|
4220
|
+ * The glyph name is truncated to fit within the buffer if it is too
|
|
4221
|
+ * long. The returned string is always zero-terminated.
|
|
4222
|
+ *
|
|
4223
|
+ * Be aware that FreeType reorders glyph indices internally so that glyph
|
|
4224
|
+ * index~0 always corresponds to the 'missing glyph' (called '.notdef').
|
|
4225
|
+ *
|
|
4226
|
+ * This function always returns an error if the config macro
|
|
4227
|
+ * `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
|
|
4228
|
+ */
|
|
4229
|
+ FT_EXPORT( FT_Error )
|
|
4230
|
+ FT_Get_Glyph_Name( FT_Face face,
|
|
4231
|
+ FT_UInt glyph_index,
|
|
4232
|
+ FT_Pointer buffer,
|
|
4233
|
+ FT_UInt buffer_max );
|
|
4234
|
+
|
|
4235
|
+
|
|
4236
|
+ /**************************************************************************
|
|
4237
|
+ *
|
|
4238
|
+ * @function:
|
|
4239
|
+ * FT_Get_Postscript_Name
|
|
4240
|
+ *
|
|
4241
|
+ * @description:
|
|
4242
|
+ * Retrieve the ASCII PostScript name of a given face, if available.
|
|
4243
|
+ * This only works with PostScript, TrueType, and OpenType fonts.
|
|
4244
|
+ *
|
|
4245
|
+ * @input:
|
|
4246
|
+ * face ::
|
|
4247
|
+ * A handle to the source face object.
|
|
4248
|
+ *
|
|
4249
|
+ * @return:
|
|
4250
|
+ * A pointer to the face's PostScript name. `NULL` if unavailable.
|
|
4251
|
+ *
|
|
4252
|
+ * @note:
|
|
4253
|
+ * The returned pointer is owned by the face and is destroyed with it.
|
|
4254
|
+ *
|
|
4255
|
+ * For variation fonts, this string changes if you select a different
|
|
4256
|
+ * instance, and you have to call `FT_Get_PostScript_Name` again to
|
|
4257
|
+ * retrieve it. FreeType follows Adobe TechNote #5902, 'Generating
|
|
4258
|
+ * PostScript Names for Fonts Using OpenType Font Variations'.
|
|
4259
|
+ *
|
|
4260
|
+ * https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html
|
|
4261
|
+ *
|
|
4262
|
+ * [Since 2.9] Special PostScript names for named instances are only
|
|
4263
|
+ * returned if the named instance is set with @FT_Set_Named_Instance (and
|
|
4264
|
+ * the font has corresponding entries in its 'fvar' table). If
|
|
4265
|
+ * @FT_IS_VARIATION returns true, the algorithmically derived PostScript
|
|
4266
|
+ * name is provided, not looking up special entries for named instances.
|
|
4267
|
+ */
|
|
4268
|
+ FT_EXPORT( const char* )
|
|
4269
|
+ FT_Get_Postscript_Name( FT_Face face );
|
|
4270
|
+
|
|
4271
|
+
|
4263
|
4272
|
/**************************************************************************
|
4264
|
4273
|
*
|
4265
|
4274
|
* @enum:
|
... |
... |
@@ -4346,13 +4355,6 @@ FT_BEGIN_HEADER |
4346
|
4355
|
FT_Matrix *p_transform );
|
4347
|
4356
|
|
4348
|
4357
|
|
4349
|
|
- /**************************************************************************
|
4350
|
|
- *
|
4351
|
|
- * @section:
|
4352
|
|
- * base_interface
|
4353
|
|
- *
|
4354
|
|
- */
|
4355
|
|
-
|
4356
|
4358
|
/**************************************************************************
|
4357
|
4359
|
*
|
4358
|
4360
|
* @enum:
|