/**************************************************************************** * * ftcsbits.c * * FreeType sbits manager (body). * * Copyright (C) 2000-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/ftcache.h> #include "ftcsbits.h" #include <freetype/internal/ftobjs.h> #include <freetype/internal/ftdebug.h> #include <freetype/fterrors.h> #include "ftccback.h" #include "ftcerror.h" #undef FT_COMPONENT #define FT_COMPONENT … /*************************************************************************/ /*************************************************************************/ /***** *****/ /***** SBIT CACHE NODES *****/ /***** *****/ /*************************************************************************/ /*************************************************************************/ static FT_Error ftc_sbit_copy_bitmap( FTC_SBit sbit, FT_Bitmap* bitmap, FT_Memory memory ) { … } FT_LOCAL_DEF( void ) ftc_snode_free( FTC_Node ftcsnode, FTC_Cache cache ) { … } FT_LOCAL_DEF( void ) FTC_SNode_Free( FTC_SNode snode, FTC_Cache cache ) { … } /* * This function tries to load a small bitmap within a given FTC_SNode. * Note that it returns a non-zero error code _only_ in the case of * out-of-memory condition. For all other errors (e.g., corresponding * to a bad font file), this function will mark the sbit as `unavailable' * and return a value of 0. * * You should also read the comment within the @ftc_snode_compare * function below to see how out-of-memory is handled during a lookup. */ static FT_Error ftc_snode_load( FTC_SNode snode, FTC_Manager manager, FT_UInt gindex, FT_ULong *asize ) { … } FT_LOCAL_DEF( FT_Error ) FTC_SNode_New( FTC_SNode *psnode, FTC_GQuery gquery, FTC_Cache cache ) { … } FT_LOCAL_DEF( FT_Error ) ftc_snode_new( FTC_Node *ftcpsnode, FT_Pointer ftcgquery, FTC_Cache cache ) { … } FT_LOCAL_DEF( FT_Offset ) ftc_snode_weight( FTC_Node ftcsnode, FTC_Cache cache ) { … } #if 0 FT_LOCAL_DEF( FT_Offset ) FTC_SNode_Weight( FTC_SNode snode ) { return ftc_snode_weight( FTC_NODE( snode ), NULL ); } #endif /* 0 */ FT_LOCAL_DEF( FT_Bool ) ftc_snode_compare( FTC_Node ftcsnode, FT_Pointer ftcgquery, FTC_Cache cache, FT_Bool* list_changed ) { … } /* END */