[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] gsoc-anurag-2023-final 849f2b213 08/16: [dense] Add FT_New_F
From: |
Werner Lemberg |
Subject: |
[freetype2] gsoc-anurag-2023-final 849f2b213 08/16: [dense] Add FT_New_Face2 |
Date: |
Mon, 9 Oct 2023 17:36:38 -0400 (EDT) |
branch: gsoc-anurag-2023-final
commit 849f2b2132bd4ab440f9e8c2c16476202b85ccda
Author: Anurag Thakur <anurag105csec21@bpitindia.edu.in>
Commit: Anurag Thakur <anurag105csec21@bpitindia.edu.in>
[dense] Add FT_New_Face2
---
include/freetype/freetype.h | 48 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 4a074a444..6200cc724 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -2573,6 +2573,54 @@ FT_BEGIN_HEADER
FT_Face *aface );
+/**************************************************************************
+ *
+ * @function:
+ * FT_New_Face2
+ *
+ * @description:
+ * Call @FT_Open_Face to open a font by its pathname with given flags.
+ *
+ * @inout:
+ * library ::
+ * A handle to the library resource.
+ *
+ * @input:
+ * pathname ::
+ * A path to the font file.
+ *
+ * face_index ::
+ * See @FT_Open_Face for a detailed description of this parameter.
+ *
+ * size ::
+ * Size at which glyphs will be rendered, Use the same value as
@FT_Set_Pixel_Sizes
+ *
+ * @output:
+ * aface ::
+ * A handle to a new face object. If `face_index` is greater than or
+ * equal to zero, it must be non-`NULL`.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * The `pathname` string should be recognizable as such by a standard
+ * `fopen` call on your system; in particular, this means that `pathname`
+ * must not contain null bytes. If that is not sufficient to address all
+ * file name possibilities (for example, to handle wide character file
+ * names on Windows in UTF-16 encoding) you might use @FT_Open_Face to
+ * pass a memory array or a stream object instead.
+ *
+ * Use @FT_Done_Face to destroy the created @FT_Face object (along with
+ * its slot and sizes).
+ */
+ FT_EXPORT( FT_Error )
+ FT_New_Face2( FT_Library library,
+ const char* filepathname,
+ FT_Long face_index,
+ FT_Face *aface,
+ FT_UInt size);
+
/**************************************************************************
*
* @function:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] gsoc-anurag-2023-final 849f2b213 08/16: [dense] Add FT_New_Face2,
Werner Lemberg <=