Coverage Report

Created: 2026-04-01 07:17

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/ghostpdl/base/ttfinp.c
Line
Count
Source
1
/* Copyright (C) 2001-2023 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.,  39 Mesa Street, Suite 108A, San Francisco,
13
   CA 94129, USA, for further information.
14
*/
15
16
17
/* A TT font input support. */
18
19
#include "ttmisc.h"
20
21
#include "ttfoutl.h"
22
#include "ttfsfnt.h"
23
#include "ttfinp.h"
24
25
unsigned char ttfReader__Byte(ttfReader *r)
26
3.67M
{   unsigned char b;
27
28
3.67M
    r->Read(r, &b, 1);
29
3.67M
    return b;
30
3.67M
}
31
32
signed char ttfReader__SignedByte(ttfReader *r)
33
954
{   signed char b;
34
35
954
    r->Read(r, &b, 1);
36
954
    return b;
37
954
}
38
39
signed short ttfReader__Short(ttfReader *r)
40
2.94M
{   unsigned char buf[2];
41
42
2.94M
    r->Read(r, buf, 2);
43
2.94M
    return ((int16)buf[0] << 8) | (int16)buf[1];
44
2.94M
}
45
46
unsigned short ttfReader__UShort(ttfReader *r)
47
73.7k
{   unsigned char buf[2];
48
49
73.7k
    r->Read(r, buf, 2);
50
73.7k
    return ((uint16)buf[0] << 8) | (uint16)buf[1];
51
73.7k
}
52
53
unsigned int ttfReader__UInt(ttfReader *r)
54
93.3k
{   unsigned char buf[4];
55
56
93.3k
    r->Read(r, buf, 4);
57
93.3k
    return ((int32)buf[0] << 24) | ((int32)buf[1] << 16) |
58
93.3k
           ((int32)buf[2] <<  8) |  (int32)buf[3];
59
93.3k
}
60
61
signed int ttfReader__Int(ttfReader *r)
62
0
{
63
0
    return (int)ttfReader__UInt(r);
64
0
}