File: fontfile.c

package info (click to toggle)
cups-filters 1.28.17-3%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,096 kB
  • sloc: ansic: 54,489; cpp: 7,023; sh: 1,911; makefile: 963; xml: 127; perl: 73; php: 28; python: 8
file content (50 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "fontfile.h"
#include <assert.h>
#include <string.h>

//FONTFILE *fontfile_open(const char *filename);

/*
FONTFILE *fontfile_open(const char *filename)
{
  // TODO? check magic
  if (...) {
  }
}
*/

FONTFILE *fontfile_open_sfnt(OTF_FILE *otf) // {{{
{
  if (!otf) {
    assert(0);
    return NULL;
  }
  FONTFILE *ret=calloc(1,sizeof(FONTFILE));

  ret->sfnt=otf;

  return ret;
}
// }}}

FONTFILE *fontfile_open_std(const char *name) // {{{
{
  assert(name);
  FONTFILE *ret=calloc(1,sizeof(FONTFILE));

  ret->stdname=strdup(name);

  return ret;
}
// }}}

void fontfile_close(FONTFILE *ff) // {{{
{
  if (ff) {
    otf_close(ff->sfnt);
    // ??? cff_close(ff->cff);
    free(ff->stdname);
    free(ff);
  }
}
// }}}