| 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_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_macros.h" | 10 #include "ppapi/c/pp_macros.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.5" | 15 #define PPB_FONT_DEV_INTERFACE_0_5 "PPB_Font(Dev);0.5" |
| 16 #define PPB_FONT_DEV_INTERFACE PPB_FONT_DEV_INTERFACE_0_5 |
| 16 | 17 |
| 17 struct PP_Point; | 18 struct PP_Point; |
| 18 struct PP_Rect; | 19 struct PP_Rect; |
| 19 | 20 |
| 20 typedef enum { | 21 typedef enum { |
| 21 // Uses the user's default web page font (normally either the default serif | 22 // Uses the user's default web page font (normally either the default serif |
| 22 // or sans serif font). | 23 // or sans serif font). |
| 23 PP_FONTFAMILY_DEFAULT = 0, | 24 PP_FONTFAMILY_DEFAULT = 0, |
| 24 | 25 |
| 25 // These families will use the default web page font corresponding to the | 26 // These families will use the default web page font corresponding to the |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // placed at the given position. This handles complex scripts such as Arabic, | 173 // placed at the given position. This handles complex scripts such as Arabic, |
| 173 // where characters may be combined or replaced depending on context. Returns | 174 // where characters may be combined or replaced depending on context. Returns |
| 174 // -1 on error. | 175 // -1 on error. |
| 175 int32_t (*PixelOffsetForCharacter)(PP_Resource font, | 176 int32_t (*PixelOffsetForCharacter)(PP_Resource font, |
| 176 const struct PP_TextRun_Dev* text, | 177 const struct PP_TextRun_Dev* text, |
| 177 uint32_t char_offset); | 178 uint32_t char_offset); |
| 178 }; | 179 }; |
| 179 | 180 |
| 180 #endif /* PPAPI_C_DEV_PPB_FONT_DEV_H_ */ | 181 #endif /* PPAPI_C_DEV_PPB_FONT_DEV_H_ */ |
| 181 | 182 |
| OLD | NEW |