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

Unified Diff: chrome/renderer/renderer_sandbox_support_linux.h

Issue 2673003: [prelim] Additional renderer fontconfig support. (Closed)
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
Index: chrome/renderer/renderer_sandbox_support_linux.h
diff --git a/chrome/renderer/renderer_sandbox_support_linux.h b/chrome/renderer/renderer_sandbox_support_linux.h
index 3fa318b400ff41b5010aed4e8b2253c899ea8eea..dab881434b5cd192d00ad3a2b6f2f160344536af 100644
--- a/chrome/renderer/renderer_sandbox_support_linux.h
+++ b/chrome/renderer/renderer_sandbox_support_linux.h
@@ -30,6 +30,25 @@ void getRenderStyleForStrike(const char* family, int sizeAndStyle,
// Returns a file descriptor for a shared memory segment.
int MakeSharedMemorySegmentViaIPC(size_t length);
+// Return a file descriptor to the font which best matches the given
+// properties or -1 on failure.
+// microsoft_charset: specifies the language(s) that the font must cover. See
+// the description of fdwCharSet in the MSDN documentation for CreateFont.
+// Its expected that this value will come from another source, thus we
+// don't attempt to translate it to a Chromium enum. If in doubt, pass 0.
+int MatchFontWithFallback(const std::string& family, bool bold,
+ bool italic, uint32_t microsoft_charset);
+
+// GetFontTable loads a specified font table from an open SFNT file.
+// output: (output) on exit, points to a new[] allocated buffer.
+// output_length: (output) on exit, contains the length of |output|
+// fd: a file descriptor to the SFNT file. The position doesn't matter.
+// table: the table in *big-endian* format.
+//
+// returns: true on success.
+bool GetFontTable(uint8_t** output, size_t* output_length,
+ int fd, uint32_t table);
+
}; // namespace render_sandbox_support
#endif // CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_
« no previous file with comments | « chrome/renderer/renderer_main_platform_delegate_linux.cc ('k') | chrome/renderer/renderer_sandbox_support_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698