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

Side by Side Diff: ppapi/c/dev/ppb_font_dev.h

Issue 7053022: Use the WebKit default fonts when specifying generic font families. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 #ifndef PPAPI_C_DEV_PPB_FONT_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_FONT_DEV_H_
6 #define PPAPI_C_DEV_PPB_FONT_DEV_H_ 6 #define PPAPI_C_DEV_PPB_FONT_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_macros.h" 10 #include "ppapi/c/pp_macros.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 PP_FONTWEIGHT_800, 49 PP_FONTWEIGHT_800,
50 PP_FONTWEIGHT_900, 50 PP_FONTWEIGHT_900,
51 PP_FONTWEIGHT_NORMAL = PP_FONTWEIGHT_400, 51 PP_FONTWEIGHT_NORMAL = PP_FONTWEIGHT_400,
52 PP_FONTWEIGHT_BOLD = PP_FONTWEIGHT_700 52 PP_FONTWEIGHT_BOLD = PP_FONTWEIGHT_700
53 } PP_FontWeight_Dev; 53 } PP_FontWeight_Dev;
54 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FontWeight_Dev, 4); 54 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FontWeight_Dev, 4);
55 55
56 struct PP_FontDescription_Dev { 56 struct PP_FontDescription_Dev {
57 /** 57 /**
58 * Font face name as a string. This can also be an undefined var, in which 58 * Font face name as a string. This can also be an undefined var, in which
59 * case the generic family will be obeyed. 59 * case the generic family will be obeyed. If the face is not available on
60 * the system, the browser will attempt to do font fallback or pick a default
61 * font.
60 */ 62 */
61 struct PP_Var face; 63 struct PP_Var face;
62 64
63 /** 65 /**
64 * When face is an undefined var, this specifies the generic font family type 66 * When Create()ing a font and the face is an undefined var, the family
65 * to use. If the face is specified, this will be ignored. 67 * specifies the generic font family type to use. If the face is specified,
68 * this will be ignored.
69 *
70 * When Describe()ing a font, the family will be the value you passed in when
71 * the font was created. In other words, if you specify a face name, the
72 * family will not be updated to reflect whether the font name you requested
73 * is serif or sans serif.
66 */ 74 */
67 PP_FontFamily_Dev family; 75 PP_FontFamily_Dev family;
68 76
69 /** 77 /**
70 * Size in pixels. 78 * Size in pixels.
79 *
80 * You can specify 0 to get the default font size. The default font size
81 * may vary depending on the requested font. The typical example is that
82 * the the user may have a different font size for the default monospace font
yzshen1 2011/05/25 23:40:11 Please remove one 'the' at the beginning.
83 * to give it a similar optical size to the proportionally spaced fonts.
71 */ 84 */
72 uint32_t size; 85 uint32_t size;
73 86
74 /** 87 /**
75 * Normally you will use either PP_FONTWEIGHT_NORMAL or PP_FONTWEIGHT_BOLD. 88 * Normally you will use either PP_FONTWEIGHT_NORMAL or PP_FONTWEIGHT_BOLD.
76 */ 89 */
77 PP_FontWeight_Dev weight; 90 PP_FontWeight_Dev weight;
78 91
79 PP_Bool italic; 92 PP_Bool italic;
80 PP_Bool small_caps; 93 PP_Bool small_caps;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 */ 240 */
228 int32_t (*PixelOffsetForCharacter)(PP_Resource font, 241 int32_t (*PixelOffsetForCharacter)(PP_Resource font,
229 const struct PP_TextRun_Dev* text, 242 const struct PP_TextRun_Dev* text,
230 uint32_t char_offset); 243 uint32_t char_offset);
231 244
232 245
233 }; 246 };
234 247
235 #endif /* PPAPI_C_DEV_PPB_FONT_DEV_H_ */ 248 #endif /* PPAPI_C_DEV_PPB_FONT_DEV_H_ */
236 249
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698