Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10760)

Unified Diff: chrome/renderer/renderer_sandbox_support_linux.h

Issue 2794004: Add a font API to Pepper and implement on Linux based on agl's ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/sandbox_methods_linux.h ('k') | chrome/renderer/renderer_sandbox_support_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/renderer_sandbox_support_linux.h
===================================================================
--- chrome/renderer/renderer_sandbox_support_linux.h (revision 49461)
+++ chrome/renderer/renderer_sandbox_support_linux.h (working copy)
@@ -9,6 +9,8 @@
#include <string>
+#include "third_party/npapi/bindings/npapi_extensions.h"
+
namespace WebKit {
struct WebFontRenderStyle;
}
@@ -30,6 +32,24 @@
// 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_
« no previous file with comments | « chrome/common/sandbox_methods_linux.h ('k') | chrome/renderer/renderer_sandbox_support_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698