summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/base/ftsnames.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/base/ftsnames.c')
-rw-r--r--src/3rdparty/freetype/src/base/ftsnames.c97
1 files changed, 67 insertions, 30 deletions
diff --git a/src/3rdparty/freetype/src/base/ftsnames.c b/src/3rdparty/freetype/src/base/ftsnames.c
index 90ea1e2be7..1917a3f1df 100644
--- a/src/3rdparty/freetype/src/base/ftsnames.c
+++ b/src/3rdparty/freetype/src/base/ftsnames.c
@@ -1,30 +1,29 @@
-/***************************************************************************/
-/* */
-/* ftsnames.c */
-/* */
-/* Simple interface to access SFNT name tables (which are used */
-/* to hold font names, copyright info, notices, etc.) (body). */
-/* */
-/* This is _not_ used to retrieve glyph names! */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-
-#include FT_SFNT_NAMES_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_INTERNAL_STREAM_H
+/****************************************************************************
+ *
+ * ftsnames.c
+ *
+ * Simple interface to access SFNT name tables (which are used
+ * to hold font names, copyright info, notices, etc.) (body).
+ *
+ * This is _not_ used to retrieve glyph names!
+ *
+ * Copyright (C) 1996-2023 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
+
+
+#include <freetype/internal/ftdebug.h>
+
+#include <freetype/ftsnames.h>
+#include <freetype/internal/tttypes.h>
+#include <freetype/internal/ftstream.h>
#ifdef TT_CONFIG_OPTION_SFNT_NAMES
@@ -66,7 +65,7 @@
FT_Stream stream = face->stream;
- if ( FT_NEW_ARRAY ( entry->string, entry->stringLength ) ||
+ if ( FT_QNEW_ARRAY ( entry->string, entry->stringLength ) ||
FT_STREAM_SEEK( entry->stringOffset ) ||
FT_STREAM_READ( entry->string, entry->stringLength ) )
{
@@ -122,7 +121,7 @@
FT_Stream stream = face->stream;
- if ( FT_NEW_ARRAY ( entry->string, entry->stringLength ) ||
+ if ( FT_QNEW_ARRAY ( entry->string, entry->stringLength ) ||
FT_STREAM_SEEK( entry->stringOffset ) ||
FT_STREAM_READ( entry->string, entry->stringLength ) )
{
@@ -142,7 +141,45 @@
}
-#endif /* TT_CONFIG_OPTION_SFNT_NAMES */
+#else /* !TT_CONFIG_OPTION_SFNT_NAMES */
+
+
+ FT_EXPORT_DEF( FT_UInt )
+ FT_Get_Sfnt_Name_Count( FT_Face face )
+ {
+ FT_UNUSED( face );
+
+ return 0;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Get_Sfnt_Name( FT_Face face,
+ FT_UInt idx,
+ FT_SfntName *aname )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( idx );
+ FT_UNUSED( aname );
+
+ return FT_THROW( Unimplemented_Feature );
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Get_Sfnt_LangTag( FT_Face face,
+ FT_UInt langID,
+ FT_SfntLangTag *alangTag )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( langID );
+ FT_UNUSED( alangTag );
+
+ return FT_THROW( Unimplemented_Feature );
+ }
+
+
+#endif /* !TT_CONFIG_OPTION_SFNT_NAMES */
/* END */