| OLD | NEW |
| 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_macros.h" | 9 #include "ppapi/c/pp_macros.h" |
| 10 #include "ppapi/c/pp_module.h" | 10 #include "ppapi/c/pp_module.h" |
| 11 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
| 12 #include "ppapi/c/pp_stdint.h" | 12 #include "ppapi/c/pp_stdint.h" |
| 13 #include "ppapi/c/pp_var.h" | 13 #include "ppapi/c/pp_var.h" |
| 14 | 14 |
| 15 #define PPB_FONT_DEV_INTERFACE "PPB_Font(Dev);0.4" | 15 #define PPB_FONT_DEV_INTERFACE "PPB_Font(Dev);0.5" |
| 16 | 16 |
| 17 struct PP_Point; | 17 struct PP_Point; |
| 18 struct PP_Rect; | 18 struct PP_Rect; |
| 19 | 19 |
| 20 typedef enum { | 20 typedef enum { |
| 21 // Uses the user's default web page font (normally either the default serif | 21 // Uses the user's default web page font (normally either the default serif |
| 22 // or sans serif font). | 22 // or sans serif font). |
| 23 PP_FONTFAMILY_DEFAULT = 0, | 23 PP_FONTFAMILY_DEFAULT = 0, |
| 24 | 24 |
| 25 // These families will use the default web page font corresponding to the | 25 // These families will use the default web page font corresponding to the |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // Returns the horizontal advance to the given character if the string was | 168 // Returns the horizontal advance to the given character if the string was |
| 169 // placed at the given position. This handles complex scripts such as Arabic, | 169 // placed at the given position. This handles complex scripts such as Arabic, |
| 170 // where characters may be combined or replaced depending on context. | 170 // where characters may be combined or replaced depending on context. |
| 171 int32_t (*PixelOffsetForCharacter)(PP_Resource font, | 171 int32_t (*PixelOffsetForCharacter)(PP_Resource font, |
| 172 const struct PP_TextRun_Dev* text, | 172 const struct PP_TextRun_Dev* text, |
| 173 uint32_t char_offset); | 173 uint32_t char_offset); |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 #endif /* PPAPI_C_DEV_PPB_FONT_DEV_H_ */ | 176 #endif /* PPAPI_C_DEV_PPB_FONT_DEV_H_ */ |
| 177 | 177 |
| OLD | NEW |