• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Shared font class for the CUPS PPD Compiler.
3 //
4 // Copyright © 2020-2024 by OpenPrinting.
5 // Copyright 2007-2009 by Apple Inc.
6 // Copyright 2002-2005 by Easy Software Products.
7 //
8 // Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
9 //
10 
11 //
12 // Include necessary headers...
13 //
14 
15 #include "ppdc-private.h"
16 
17 
18 //
19 // 'ppdcFont::ppdcFont()' - Create a shared font.
20 //
21 
ppdcFont(const char * n,const char * e,const char * v,const char * c,ppdcFontStatus s)22 ppdcFont::ppdcFont(const char     *n,		// I - Name of font
23                    const char     *e,		// I - Font encoding
24 		   const char     *v,		// I - Font version
25 		   const char     *c,		// I - Font charset
26         	   ppdcFontStatus s)		// I - Font status
27   : ppdcShared()
28 {
29   PPDC_NEW;
30 
31   name     = new ppdcString(n);
32   encoding = new ppdcString(e);
33   version  = new ppdcString(v);
34   charset  = new ppdcString(c);
35   status   = s;
36 }
37 
38 
39 //
40 // 'ppdcFont::~ppdcFont()' - Destroy a shared font.
41 //
42 
~ppdcFont()43 ppdcFont::~ppdcFont()
44 {
45   PPDC_DELETE;
46 
47   name->release();
48   encoding->release();
49   version->release();
50   charset->release();
51 }
52