summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/cache/ftcbasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/cache/ftcbasic.c')
-rw-r--r--src/3rdparty/freetype/src/cache/ftcbasic.c78
1 files changed, 42 insertions, 36 deletions
diff --git a/src/3rdparty/freetype/src/cache/ftcbasic.c b/src/3rdparty/freetype/src/cache/ftcbasic.c
index 994aa12286..24a56c8d26 100644
--- a/src/3rdparty/freetype/src/cache/ftcbasic.c
+++ b/src/3rdparty/freetype/src/cache/ftcbasic.c
@@ -1,25 +1,24 @@
-/***************************************************************************/
-/* */
-/* ftcbasic.c */
-/* */
-/* The FreeType basic cache interface (body). */
-/* */
-/* Copyright 2003-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_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_CACHE_H
+/****************************************************************************
+ *
+ * ftcbasic.c
+ *
+ * The FreeType basic cache interface (body).
+ *
+ * Copyright (C) 2003-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/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftcache.h>
#include "ftcglyph.h"
#include "ftcimage.h"
#include "ftcsbits.h"
@@ -27,11 +26,12 @@
#include "ftccback.h"
#include "ftcerror.h"
-#define FT_COMPONENT trace_cache
+#undef FT_COMPONENT
+#define FT_COMPONENT cache
/*
- * Basic Families
+ * Basic Families
*
*/
typedef struct FTC_BasicAttrRec_
@@ -109,13 +109,18 @@
if ( error || !face )
return result;
+#ifdef FT_DEBUG_LEVEL_TRACE
if ( (FT_ULong)face->num_glyphs > FT_UINT_MAX || 0 > face->num_glyphs )
+ {
FT_TRACE1(( "ftc_basic_family_get_count:"
- " too large number of glyphs in this face, truncated\n",
+ " the number of glyphs in this face is %ld,\n",
face->num_glyphs ));
+ FT_TRACE1(( " "
+ " which is too much and thus truncated\n" ));
+ }
+#endif
- if ( !error )
- result = (FT_UInt)face->num_glyphs;
+ result = (FT_UInt)face->num_glyphs;
return result;
}
@@ -177,7 +182,8 @@
if ( !error )
{
if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP ||
- face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
+ face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ||
+ face->glyph->format == FT_GLYPH_FORMAT_SVG )
{
/* ok, copy it */
FT_Glyph glyph;
@@ -313,7 +319,7 @@
#if 0xFFFFFFFFUL > FT_UINT_MAX
if ( (type->flags & (FT_ULong)FT_UINT_MAX) )
FT_TRACE1(( "FTC_ImageCache_Lookup:"
- " higher bits in load_flags 0x%x are dropped\n",
+ " higher bits in load_flags 0x%lx are dropped\n",
(FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) ));
#endif
@@ -331,7 +337,7 @@
#if 1 /* inlining is about 50% faster! */
FTC_GCACHE_LOOKUP_CMP( cache,
ftc_basic_family_compare,
- FTC_GNode_Compare,
+ ftc_gnode_compare,
hash, gindex,
&query,
node,
@@ -394,7 +400,7 @@
#if FT_ULONG_MAX > FT_UINT_MAX
if ( load_flags > FT_UINT_MAX )
FT_TRACE1(( "FTC_ImageCache_LookupScaler:"
- " higher bits in load_flags 0x%x are dropped\n",
+ " higher bits in load_flags 0x%lx are dropped\n",
load_flags & ~((FT_ULong)FT_UINT_MAX) ));
#endif
@@ -405,7 +411,7 @@
FTC_GCACHE_LOOKUP_CMP( cache,
ftc_basic_family_compare,
- FTC_GNode_Compare,
+ ftc_gnode_compare,
hash, gindex,
&query,
node,
@@ -511,7 +517,7 @@
#if 0xFFFFFFFFUL > FT_UINT_MAX
if ( (type->flags & (FT_ULong)FT_UINT_MAX) )
FT_TRACE1(( "FTC_ImageCache_Lookup:"
- " higher bits in load_flags 0x%x are dropped\n",
+ " higher bits in load_flags 0x%lx are dropped\n",
(FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) ));
#endif
@@ -531,7 +537,7 @@
#if 1 /* inlining is about 50% faster! */
FTC_GCACHE_LOOKUP_CMP( cache,
ftc_basic_family_compare,
- FTC_SNode_Compare,
+ ftc_snode_compare,
hash, gindex,
&query,
node,
@@ -594,7 +600,7 @@
#if FT_ULONG_MAX > FT_UINT_MAX
if ( load_flags > FT_UINT_MAX )
FT_TRACE1(( "FTC_ImageCache_LookupScaler:"
- " higher bits in load_flags 0x%x are dropped\n",
+ " higher bits in load_flags 0x%lx are dropped\n",
load_flags & ~((FT_ULong)FT_UINT_MAX) ));
#endif
@@ -607,7 +613,7 @@
FTC_GCACHE_LOOKUP_CMP( cache,
ftc_basic_family_compare,
- FTC_SNode_Compare,
+ ftc_snode_compare,
hash, gindex,
&query,
node,