#include <ft2build.h>
#include "sfdriver.h"
#include "ttload.h"
#include "sfobjs.h"
#include "sfntpic.h"
#include "sferrors.h"
#include "ttcmap.h"
#include "ttkern.h"
#include "ttmtx.h"
Go to the source code of this file.
|
static void * | get_sfnt_table (TT_Face face, FT_Sfnt_Tag tag) |
|
static FT_Error | sfnt_table_info (TT_Face face, FT_UInt idx, FT_ULong *tag, FT_ULong *offset, FT_ULong *length) |
|
| FT_DEFINE_SERVICE_SFNT_TABLEREC (sfnt_service_sfnt_table,(FT_SFNT_TableLoadFunc) tt_face_load_any,(FT_SFNT_TableGetFunc) get_sfnt_table,(FT_SFNT_TableInfoFunc) sfnt_table_info) static const unsigned char sfnt_ps_map[16] |
|
static int | sfnt_is_postscript (int c) |
|
static char * | get_win_string (FT_Memory memory, FT_Stream stream, TT_Name entry, char_type_func char_type, FT_Bool report_invalid_characters) |
|
static char * | get_apple_string (FT_Memory memory, FT_Stream stream, TT_Name entry, char_type_func char_type, FT_Bool report_invalid_characters) |
|
static FT_Bool | sfnt_get_name_id (TT_Face face, FT_UShort id, FT_Int *win, FT_Int *apple) |
|
static const char * | sfnt_get_ps_name (TT_Face face) |
|
| FT_DEFINE_SERVICE_PSFONTNAMEREC (sfnt_service_ps_name,(FT_PsName_GetFunc) sfnt_get_ps_name) FT_DEFINE_SERVICE_TTCMAPSREC(tt_service_get_cmap_info |
|
TT_CMap_Info_GetFunc tt_get_cmap_info | FT_DEFINE_SERVICEDESCREC3 (sfnt_services, FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET) sfnt_get_interface(FT_Module module |
|
return | ft_service_list_lookup (SFNT_SERVICES_GET, module_interface) |
|
◆ FT_COMPONENT
#define FT_COMPONENT trace_sfdriver |
◆ IS_APPLE
Value: ( (
n)->platformID == 1 && \
(
n)->encodingID == 0 && \
Definition at line 468 of file sfdriver.c.
◆ IS_WIN
Value: ( (
n)->platformID == 3 && \
( (
n)->encodingID == 1 || (
n)->encodingID == 0 ) && \
(
n)->languageID == 0x409 )
Definition at line 464 of file sfdriver.c.
◆ PUT_EMBEDDED_BITMAPS
◆ PUT_PS_NAMES
◆ char_type_func
typedef int(* char_type_func) (int c) |
◆ FT_DEFINE_SERVICE_PSFONTNAMEREC()
FT_DEFINE_SERVICE_PSFONTNAMEREC |
( |
sfnt_service_ps_name |
, |
|
|
(FT_PsName_GetFunc) |
sfnt_get_ps_name |
|
) |
| |
◆ FT_DEFINE_SERVICE_SFNT_TABLEREC()
◆ FT_DEFINE_SERVICEDESCREC3()
◆ ft_service_list_lookup()
◆ get_apple_string()
Definition at line 534 of file sfdriver.c.
539 {
541
546
548
549
552
555 {
557 entry->stringOffset = 0;
558 entry->stringLength = 0;
560
562 }
563
566
568 {
569 if ( char_type( *
p ) )
571 else
572 {
573 if ( report_invalid_characters )
574 {
576 " Character `%c' (0x%X) invalid in PS name string\n",
578
580 }
581 }
582 }
584
586
588 }
#define FT_TRACE0(varformat)
#define FT_ALLOC(ptr, size)
#define FT_FRAME_ENTER(size)
#define FT_STREAM_SEEK(position)
GLdouble GLdouble GLdouble r
Referenced by sfnt_get_ps_name().
◆ get_sfnt_table()
Definition at line 76 of file sfdriver.c.
78 {
80
81
83 {
86 break;
87
90 break;
91
94 break;
95
98 break;
99
102 break;
103
106 break;
107
110 break;
111
112 default:
114 }
115
117 }
GLenum GLuint GLint GLenum face
◆ get_win_string()
Definition at line 473 of file sfdriver.c.
478 {
480
485
487
488
491
494 {
496 entry->stringLength = 0;
497 entry->stringOffset = 0;
499
501 }
502
505
507 {
509 {
510 if ( char_type(
p[1] ) )
512 else
513 {
514 if ( report_invalid_characters )
515 {
517 " Character `%c' (0x%X) invalid in PS name string\n",
519
521 }
522 }
523 }
524 }
526
528
530 }
Referenced by sfnt_get_ps_name().
◆ sfnt_get_name_id()
Definition at line 592 of file sfdriver.c.
596 {
598
599
601 *apple = -1;
602
603 for (
n = 0;
n <
face->num_names;
n++ )
604 {
606
607
608 if (
name->nameID ==
id &&
name->stringLength > 0 )
609 {
612
615 }
616 }
617
618 return ( *
win >= 0 ) || ( *apple >= 0 );
619 }
Referenced by sfnt_get_ps_name().
◆ sfnt_get_ps_name()
Definition at line 1023 of file sfdriver.c.
1024 {
1027
1028
1029 if (
face->postscript_name )
1030 return face->postscript_name;
1031
1032#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1036 {
1037 face->postscript_name = sfnt_get_var_ps_name(
face );
1038 return face->postscript_name;
1039 }
1040#endif
1041
1042
1043
1045 if ( !found )
1047
1048
1051 face->name_table.stream,
1054 1 );
1055 else
1057 face->name_table.stream,
1058 face->name_table.names + apple,
1060 1 );
1061
1063
1065 }
#define FT_IS_VARIATION(face)
#define FT_IS_NAMED_INSTANCE(face)
static char * get_win_string(FT_Memory memory, FT_Stream stream, TT_Name entry, char_type_func char_type, FT_Bool report_invalid_characters)
static char * get_apple_string(FT_Memory memory, FT_Stream stream, TT_Name entry, char_type_func char_type, FT_Bool report_invalid_characters)
static FT_Bool sfnt_get_name_id(TT_Face face, FT_UShort id, FT_Int *win, FT_Int *apple)
static int sfnt_is_postscript(int c)
#define TT_NAME_ID_PS_NAME
◆ sfnt_is_postscript()
static int sfnt_is_postscript |
( |
int |
c | ) |
|
|
static |
Definition at line 245 of file sfdriver.c.
246 {
248
249
250 if ( c < 0 || c >= 0x80 )
251 return 0;
252
254
255 return sfnt_ps_map[
cc >> 3] & ( 1 << (
cc & 0x07 ) );
256 }
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Referenced by sfnt_get_ps_name().
◆ sfnt_table_info()
Definition at line 121 of file sfdriver.c.
126 {
128 return FT_THROW( Invalid_Argument );
129
132 else
133 {
136
140 }
141
143 }
GLuint GLsizei GLsizei * length
◆ module_interface