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.
5 #ifndef PDF_FONT_TABLE_LINUX_H_
6 #define PDF_FONT_TABLE_LINUX_H_
10 #include <sys/types.h>
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.
23 // returns: true on success.
24 bool GetFontTable(int fd,
28 size_t* output_length);
32 #endif // PDF_FONT_TABLE_LINUX_H_