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

Unified Diff: ppapi/proxy/serialized_structs.cc

Issue 12600019: Add Pepper TrueType font API plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_aura. Pango headers missing. Created 7 years, 9 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 | « ppapi/proxy/serialized_structs.h ('k') | ppapi/proxy/truetype_font_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/serialized_structs.cc
diff --git a/ppapi/proxy/serialized_structs.cc b/ppapi/proxy/serialized_structs.cc
index ebd7ed01c0e86d75754938f08581f35359b01ff7..8c984d55dba8d3617401b01c357bdaf46689d633 100644
--- a/ppapi/proxy/serialized_structs.cc
+++ b/ppapi/proxy/serialized_structs.cc
@@ -80,6 +80,40 @@ void SerializedFontDescription::SetToPPBrowserFontDescription(
desc->word_spacing = word_spacing;
}
+SerializedTrueTypeFontDesc::SerializedTrueTypeFontDesc()
+ : family(),
+ generic_family(),
+ style(),
+ weight(),
+ width(),
+ charset() {
+}
+
+SerializedTrueTypeFontDesc::~SerializedTrueTypeFontDesc() {}
+
+void SerializedTrueTypeFontDesc::SetFromPPTrueTypeFontDesc(
+ const PP_TrueTypeFontDesc_Dev& desc) {
+ StringVar* string_var = StringVar::FromPPVar(desc.family);
+ family = string_var ? string_var->value() : std::string();
+
+ generic_family = desc.generic_family;
+ style = desc.style;
+ weight = desc.weight;
+ width = desc.width;
+ charset = desc.charset;
+}
+
+void SerializedTrueTypeFontDesc::CopyToPPTrueTypeFontDesc(
+ PP_TrueTypeFontDesc_Dev* desc) const {
+ desc->family = StringVar::StringToPPVar(family);
+
+ desc->generic_family = generic_family;
+ desc->style = style;
+ desc->weight = weight;
+ desc->width = width;
+ desc->charset = charset;
+}
+
PPBFlash_DrawGlyphs_Params::PPBFlash_DrawGlyphs_Params()
: instance(0),
font_desc(),
« no previous file with comments | « ppapi/proxy/serialized_structs.h ('k') | ppapi/proxy/truetype_font_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698