"Fossies" - the Fresh Open Source Software Archive

Member "ghostpdl-9.27/base/gsfont.h" (4 Apr 2019, 3351 Bytes) of package /linux/misc/ghostpdl-9.27.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "gsfont.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes reports: 9.27rc1_vs_9.27 or 9.26_vs_9.27.

    1 /* Copyright (C) 2001-2019 Artifex Software, Inc.
    2    All Rights Reserved.
    3 
    4    This software is provided AS-IS with no warranty, either express or
    5    implied.
    6 
    7    This software is distributed under license and may not be copied,
    8    modified or distributed except as expressly authorized under the terms
    9    of the license contained in the file LICENSE in this distribution.
   10 
   11    Refer to licensing information at http://www.artifex.com or contact
   12    Artifex Software, Inc.,  1305 Grant Avenue - Suite 200, Novato,
   13    CA 94945, U.S.A., +1(415)492-9861, for further information.
   14 */
   15 
   16 
   17 /* Generic font and font cache interface */
   18 
   19 #ifndef gsfont_INCLUDED
   20 #  define gsfont_INCLUDED
   21 
   22 #include "std.h"
   23 #include "gsgstate.h"
   24 #include "gstypes.h"
   25 #include "gsmatrix.h"
   26 #include "gslibctx.h"
   27 
   28 /* Font objects */
   29 typedef struct gs_font_s gs_font;
   30 
   31 /* A font object as seen by clients. */
   32 /* See the PostScript Language Reference Manual for details. */
   33 
   34 typedef struct gs_show_enum_s gs_show_enum;
   35 
   36 /* Initialization */
   37 /* These procedures return 0 if they fail. */
   38 /* The returned gs_font_dir can be cleanly deallocated by
   39  * simply calling gs_free_object on it. */
   40 gs_font_dir *gs_font_dir_alloc2(gs_memory_t * struct_mem,
   41                                 gs_memory_t * bits_mem);
   42 gs_font_dir *gs_font_dir_alloc2_limits(gs_memory_t * struct_mem,
   43                                        gs_memory_t * bits_mem,
   44                                        uint smax, uint bmax, uint mmax,
   45                                        uint cmax, uint upper);
   46 
   47 /* Backward compatibility */
   48 #define gs_font_dir_alloc(mem) gs_font_dir_alloc2(mem, mem)
   49 #define gs_font_dir_alloc_limits(mem, smax, bmax, mmax, cmax, upper)\
   50   gs_font_dir_alloc2_limits(mem, mem, smax, bmax, mmax, cmax, upper)
   51 
   52 /* Font manipulations */
   53 /* Use gs_definefont only with original (unscaled) fonts! */
   54 int gs_definefont(gs_font_dir *, gs_font *);
   55 
   56 /* Find a sililar registered font of same type. */
   57 int gs_font_find_similar(const gs_font_dir * pdir, const gs_font **ppfont,
   58                            int (*similar)(const gs_font *, const gs_font *));
   59 
   60 /* gs_scalefont and gs_makefont return 0 if the scaled font */
   61 /* was already in the cache, 1 if a new font was created. */
   62 int gs_scalefont(gs_font_dir *, const gs_font *, double, gs_font **);
   63 int gs_makefont(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
   64 int gs_setfont(gs_gstate *, gs_font *);
   65 gs_font *gs_currentfont(const gs_gstate *);
   66 gs_font *gs_rootfont(const gs_gstate *);
   67 void gs_set_currentfont(gs_gstate *, gs_font *);
   68 int  gs_purge_font(gs_font *);
   69 /* Locate a gs_font by gs_id. */
   70 gs_font *gs_find_font_by_id(gs_font_dir *pdir, gs_id id, gs_matrix *FontMatrix);
   71 
   72 /* Font cache parameter operations */
   73 void gs_cachestatus(const gs_font_dir *, uint[7]);
   74 
   75 #define gs_setcachelimit(pdir,limit) gs_setcacheupper(pdir,limit)
   76 uint gs_currentcachesize(const gs_font_dir *);
   77 int gs_setcachesize(gs_gstate * pgs, gs_font_dir *, uint);
   78 uint gs_currentcachelower(const gs_font_dir *);
   79 int gs_setcachelower(gs_font_dir *, uint);
   80 uint gs_currentcacheupper(const gs_font_dir *);
   81 int gs_setcacheupper(gs_font_dir *, uint);
   82 uint gs_currentaligntopixels(const gs_font_dir *);
   83 int gs_setaligntopixels(gs_font_dir *, uint);
   84 uint gs_currentgridfittt(const gs_font_dir *);
   85 int gs_setgridfittt(gs_font_dir *, uint);
   86 
   87 #endif /* gsfont_INCLUDED */