Index: content/common/dwrite_font_proxy_messages.h |
diff --git a/content/common/dwrite_font_proxy_messages.h b/content/common/dwrite_font_proxy_messages.h |
index cc8aced1dec3a14f2452cba92d6a7c900e3a1cb0..288a3cf0d05cb300b8ff35a0499e567997b3afed 100644 |
--- a/content/common/dwrite_font_proxy_messages.h |
+++ b/content/common/dwrite_font_proxy_messages.h |
@@ -23,6 +23,20 @@ typedef std::pair<base::string16, base::string16> DWriteStringPair; |
#endif // CONTENT_COMMON_DWRITE_FONT_PROXY_MESSAGES_H_ |
+IPC_STRUCT_BEGIN(DWriteFontStyle) |
+ IPC_STRUCT_MEMBER(uint16_t, font_weight) |
+ IPC_STRUCT_MEMBER(uint8_t, font_slant) |
+ IPC_STRUCT_MEMBER(uint8_t, font_stretch) |
+IPC_STRUCT_END() |
+ |
+IPC_STRUCT_BEGIN(MapCharactersResult) |
+ IPC_STRUCT_MEMBER(uint32_t, family_index) |
+ IPC_STRUCT_MEMBER(base::string16, family_name) |
+ IPC_STRUCT_MEMBER(uint32_t, mapped_length) |
+ IPC_STRUCT_MEMBER(float, scale) |
+ IPC_STRUCT_MEMBER(DWriteFontStyle, font_style) |
+IPC_STRUCT_END() |
+ |
// Locates the index of the specified font family within the system collection. |
IPC_SYNC_MESSAGE_CONTROL1_1(DWriteFontProxyMsg_FindFamily, |
base::string16 /* family_name */, |
@@ -44,3 +58,18 @@ IPC_SYNC_MESSAGE_CONTROL1_1( |
IPC_SYNC_MESSAGE_CONTROL1_1(DWriteFontProxyMsg_GetFontFiles, |
uint32_t /* family_index */, |
std::vector<base::string16> /* out file_paths */) |
+ |
+// Locates a font family that is able to render the specified text using the |
+// specified style. If successful, the family_index and family_name will |
+// indicate which family in the system font collection can render the requested |
+// text and the mapped_length will indicate how many characters can be |
+// rendered. If no font exists that can render the text, family_index will be |
+// UINT32_MAX and mapped_length will indicate how many characters cannot be |
+// rendered by any installed font. |
+IPC_SYNC_MESSAGE_CONTROL5_1(DWriteFontProxyMsg_MapCharacters, |
+ base::string16 /* text */, |
+ DWriteFontStyle /* font_style */, |
+ base::string16 /* locale_name */, |
+ uint32_t /* reading_direction */, |
+ base::string16 /* base_family_name - optional */, |
+ MapCharactersResult /* out */) |