diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 22:25:54 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 22:25:54 +0000 |
commit | adb072f92d93e5adf28a77fb4f6c15effca7b001 (patch) | |
tree | 11043d294f773825ecd59aa8f8ede9df549f1e30 /chrome/renderer/renderer_sandbox_support_linux.h | |
parent | d4d1b878fde9f01c21a8e247288d56df1e5382c6 (diff) | |
download | chromium_src-adb072f92d93e5adf28a77fb4f6c15effca7b001.zip chromium_src-adb072f92d93e5adf28a77fb4f6c15effca7b001.tar.gz chromium_src-adb072f92d93e5adf28a77fb4f6c15effca7b001.tar.bz2 |
Add a font API to Pepper and implement on Linux based on agl's code from http://codereview.chromium.org/2673003.
Review URL: http://codereview.chromium.org/2794004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_sandbox_support_linux.h')
-rw-r--r-- | chrome/renderer/renderer_sandbox_support_linux.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/renderer/renderer_sandbox_support_linux.h b/chrome/renderer/renderer_sandbox_support_linux.h index 3fa318b..098c46e 100644 --- a/chrome/renderer/renderer_sandbox_support_linux.h +++ b/chrome/renderer/renderer_sandbox_support_linux.h @@ -9,6 +9,8 @@ #include <string> +#include "third_party/npapi/bindings/npapi_extensions.h" + namespace WebKit { struct WebFontRenderStyle; } @@ -30,6 +32,24 @@ void getRenderStyleForStrike(const char* family, int sizeAndStyle, // Returns a file descriptor for a shared memory segment. int MakeSharedMemorySegmentViaIPC(size_t length); +// Return a read-only file descriptor to the font which best matches the given +// properties or -1 on failure. +// charset: specifies the language(s) that the font must cover. See +// render_sandbox_host_linux.cc for more information. +int MatchFontWithFallback(const std::string& face, bool bold, + bool italic, NPCharset charset); + +// GetFontTable loads a specified font table from an open SFNT file. +// fd: a file descriptor to the SFNT file. The position doesn't matter. +// table: the table in *big-endian* format, or 0 for the whole font file. +// output: a buffer of size output_length that gets the data. can be 0, in +// which case output_length will be set to the required size in bytes. +// output_length: size of output, if it's not 0. +// +// returns: true on success. +bool GetFontTable(int fd, uint32_t table, uint8_t* output, + size_t* output_length); + }; // namespace render_sandbox_support #endif // CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_ |