fixup! [M120 Migration][NaCl][PPFWK] Upgradable pepper plugin requirement
[platform/framework/web/chromium-efl.git] / pdf / font_table_linux.h
1 // Copyright 2017 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PDF_FONT_TABLE_LINUX_H_
6 #define PDF_FONT_TABLE_LINUX_H_
7
8 #include <stddef.h>
9 #include <stdint.h>
10 #include <sys/types.h>
11
12 namespace pdf {
13
14 // GetFontTable loads a specified font table from an open SFNT file.
15 //   fd: a file descriptor to the SFNT file. The position doesn't matter.
16 //   table_tag: the table tag in *big-endian* format, or 0 for the entire font.
17 //   offset: offset into the table or entire font where loading should start.
18 //     The offset must be between 0 and 1 GB - 1.
19 //   output: a buffer of size output_length that gets the data.  can be 0, in
20 //     which case output_length will be set to the required size in bytes.
21 //   output_length: size of output, if it's not 0.
22 //
23 //   returns: true on success.
24 bool GetFontTable(int fd,
25                   uint32_t table_tag,
26                   off_t offset,
27                   uint8_t* output,
28                   size_t* output_length);
29
30 }  // namespace pdf
31
32 #endif  // PDF_FONT_TABLE_LINUX_H_