OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _FPDF_SYSFONTINFO_H | 7 #ifndef _FPDF_SYSFONTINFO_H |
8 #define _FPDF_SYSFONTINFO_H | 8 #define _FPDF_SYSFONTINFO_H |
9 | 9 |
10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 /* Typical weight values */ | 26 /* Typical weight values */ |
27 #define FXFONT_FW_NORMAL 400 | 27 #define FXFONT_FW_NORMAL 400 |
28 #define FXFONT_FW_BOLD 700 | 28 #define FXFONT_FW_BOLD 700 |
29 | 29 |
30 // Exported Functions | 30 // Exported Functions |
31 #ifdef __cplusplus | 31 #ifdef __cplusplus |
32 extern "C" { | 32 extern "C" { |
33 #endif | 33 #endif |
34 | 34 |
35 | |
36 /** | 35 /** |
37 * Interface: FPDF_SYSFONTINFO | 36 * Interface: FPDF_SYSFONTINFO |
38 * Interface for getting system font information and font m
apping | 37 * Interface for getting system font information and font m
apping |
39 */ | 38 */ |
40 typedef struct _FPDF_SYSFONTINFO { | 39 typedef struct _FPDF_SYSFONTINFO { |
41 /** | 40 /** |
42 * Version number of the interface. Currently must be 1. | 41 * Version number of the interface. Currently must be 1. |
43 **/ | 42 **/ |
44 int version; | 43 int version; |
45 | 44 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 * Parameters: | 185 * Parameters: |
187 * pThis - Pointer to the interface
structure itself | 186 * pThis - Pointer to the interface
structure itself |
188 * hFont - Font handle returned by
MapFont or GetFont method | 187 * hFont - Font handle returned by
MapFont or GetFont method |
189 * Return Value: | 188 * Return Value: |
190 * None | 189 * None |
191 **/ | 190 **/ |
192 void (*DeleteFont)(struct _FPDF_SYSFONTINFO* pThis, void* hFont); | 191 void (*DeleteFont)(struct _FPDF_SYSFONTINFO* pThis, void* hFont); |
193 } FPDF_SYSFONTINFO; | 192 } FPDF_SYSFONTINFO; |
194 | 193 |
195 /** | 194 /** |
| 195 * Struct: FPDF_CharsetFontMap |
| 196 * Provides the name of a font to use for a given charset value. |
| 197 **/ |
| 198 typedef struct FPDF_CharsetFontMap_ |
| 199 { |
| 200 int charset; // Character Set Enum value, see FXFONT_*_CHARSET above. |
| 201 const char* fontname; // Name of default font to use with that charset. |
| 202 } FPDF_CharsetFontMap; |
| 203 |
| 204 /** |
| 205 * Function: FPDF_GetDefaultTTFMap |
| 206 * Returns a pointer to the default character set to TT Font name map. The |
| 207 * map is an array of FPDF_CharsetFontMap structs, with its end indicated |
| 208 * by a { -1, NULL } entry. |
| 209 * Parameters: |
| 210 * None. |
| 211 * Return Value: |
| 212 * Pointer to the Charset Font Map. |
| 213 **/ |
| 214 DLLEXPORT const FPDF_CharsetFontMap* STDCALL FPDF_GetDefaultTTFMap(); |
| 215 |
| 216 /** |
196 * Function: FPDF_AddInstalledFont | 217 * Function: FPDF_AddInstalledFont |
197 * Add a system font to the list in Foxit SDK. | 218 * Add a system font to the list in Foxit SDK. |
198 * Comments: | 219 * Comments: |
199 * This function is only called during the system font list
building process. | 220 * This function is only called during the system font list
building process. |
200 * Parameters: | 221 * Parameters: |
201 * mapper - Opaque pointer to Foxit
font mapper | 222 * mapper - Opaque pointer to Foxit
font mapper |
202 * face - The font face name | 223 * face - The font face name |
203 * charset - Font character set. See
above defined constants. | 224 * charset - Font character set. See
above defined constants. |
204 * Return Value: | 225 * Return Value: |
205 * None. | 226 * None. |
(...skipping 26 matching lines...) Expand all Loading... |
232 * Or NULL if the platform doesn't have a default interface
. | 253 * Or NULL if the platform doesn't have a default interface
. |
233 * Application should call FPDF_FreeMemory to free the retu
rned pointer. | 254 * Application should call FPDF_FreeMemory to free the retu
rned pointer. |
234 **/ | 255 **/ |
235 DLLEXPORT FPDF_SYSFONTINFO* STDCALL FPDF_GetDefaultSystemFontInfo(); | 256 DLLEXPORT FPDF_SYSFONTINFO* STDCALL FPDF_GetDefaultSystemFontInfo(); |
236 | 257 |
237 #ifdef __cplusplus | 258 #ifdef __cplusplus |
238 }; | 259 }; |
239 #endif | 260 #endif |
240 | 261 |
241 #endif // _FPDF_SYSFONTINFO_H | 262 #endif // _FPDF_SYSFONTINFO_H |
OLD | NEW |