Home | History | Annotate | Download | only in sfnt

Lines Matching refs:face

123   /*    face   :: A handle to the source face object.                      */
135 tt_face_get_name( TT_Face face,
139 FT_Memory memory = face->root.memory;
157 rec = face->name_table.names;
158 for ( n = 0; n < face->num_names; n++, rec++ )
231 rec = face->name_table.names + found_win;
255 rec = face->name_table.names + found_apple;
260 rec = face->name_table.names + found_unicode;
268 FT_Stream stream = face->name_table.stream;
342 /* Fill in face->ttc_header. If the font is not a TTC, it is */
346 TT_Face face )
364 face->ttc_header.tag = 0;
365 face->ttc_header.version = 0;
366 face->ttc_header.count = 0;
381 face->ttc_header.tag = TTAG_ttcf;
390 if ( FT_STREAM_READ_FIELDS( ttc_header_fields, &face->ttc_header ) )
394 if ( FT_NEW_ARRAY( face->ttc_header.offsets, face->ttc_header.count ) )
397 if ( FT_FRAME_ENTER( face->ttc_header.count * 4L ) )
400 for ( n = 0; n < face->ttc_header.count; n++ )
401 face->ttc_header.offsets[n] = FT_GET_ULONG();
409 face->ttc_header.version = 1 << 16;
410 face->ttc_header.count = 1;
412 if ( FT_NEW( face->ttc_header.offsets ) )
415 face->ttc_header.offsets[0] = offset;
424 TT_Face face,
430 FT_Library library = face->root.driver->root.library;
439 sfnt = (SFNT_Service)face->sfnt;
446 face->sfnt = sfnt;
447 face->goto_table = sfnt->goto_table;
450 FT_FACE_FIND_GLOBAL_SERVICE( face, face->psnames, POSTSCRIPT_CMAPS );
452 error = sfnt_open_font( stream, face );
456 FT_TRACE2(( "sfnt_init_face: %08p, %ld\n", face, face_index ));
461 if ( face_index >= face->ttc_header.count )
464 if ( FT_STREAM_SEEK( face->ttc_header.offsets[face_index] ) )
468 error = sfnt->load_font_dir( face, stream );
472 face->root.num_faces = face->ttc_header.count;
473 face->root.face_index = face_index;
484 error = sfnt->load_##x( face, stream ); \
500 error = sfnt->load_##x( face, stream, vertical ); \
512 error = tt_face_get_name( face, TT_NAME_ID_##id, field ); \
520 TT_Face face,
534 SFNT_Service sfnt = (SFNT_Service)face->sfnt;
570 FT_TRACE2(( "sfnt_load_face: %08p\n\n", face ));
574 has_outline = FT_BOOL( face->root.internal->incremental_interface != 0 ||
575 tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
576 tt_face_lookup_table( face, TTAG_CFF ) != 0 );
578 has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
579 tt_face_lookup_table( face, TTAG_CFF ) != 0 );
601 if ( face->header.Units_Per_EM == 0 )
638 if ( face->root.internal->incremental_interface &&
639 face->root.internal->incremental_interface->funcs->
642 face->horizontal.number_Of_HMetrics = 0;
651 if ( face->format_tag == TTAG_true )
664 if ( face->root.internal->incremental_interface &&
665 face->root.internal->incremental_interface->funcs->
668 face->horizontal.number_Of_HMetrics = 0;
685 face->vertical_info = 1;
697 face->os2.version = 0xFFFFU;
725 face->pclt.Version = 0;
732 face->root.num_glyphs = face->max_profile.numGlyphs;
735 /* a WWS-only font face. `WWS' stands for `weight', width', and */
740 face->root.family_name = NULL;
741 face->root.style_name = NULL;
742 if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 )
745 GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
746 if ( !face->root.family_name )
747 GET_NAME( FONT_FAMILY, &face->root.family_name );
750 GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
751 if ( !face->root.style_name )
752 GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
756 GET_NAME( WWS_FAMILY, &face->root.family_name );
757 if ( !face->root.family_name && !ignore_preferred_family )
758 GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
759 if ( !face->root.family_name )
760 GET_NAME( FONT_FAMILY, &face->root.family_name );
762 GET_NAME( WWS_SUBFAMILY, &face->root.style_name );
763 if ( !face->root.style_name && !ignore_preferred_subfamily )
764 GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
765 if ( !face->root.style_name )
766 GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
771 FT_Face root = &face->root;
777 /* Compute face flags. */
789 face->postscript.FormatType != 0x00030000L )
794 if ( face->postscript.isFixedPitch )
798 if ( face->vertical_info )
802 if ( TT_FACE_HAS_KERNING( face ) )
808 if ( tt_face_lookup_table( face, TTAG_glyf ) != 0 &&
809 tt_face_lookup_table( face, TTAG_fvar ) != 0 &&
810 tt_face_lookup_table( face, TTAG_gvar ) != 0 )
822 if ( has_outline == TRUE && face->os2.version != 0xFFFFU )
825 /* indicates an oblique font face. This flag has been */
828 if ( face->os2.fsSelection & 512 ) /* bit 9 */
830 else if ( face->os2.fsSelection & 1 ) /* bit 0 */
833 if ( face->os2.fsSelection & 32 ) /* bit 5 */
840 if ( face->header.Mac_Style & 1 )
843 if ( face->header.Mac_Style & 2 )
857 tt_face_build_cmaps( face ); /* ignore errors */
896 count = face->sbit_num_strikes;
898 count = (FT_UInt)face->num_sbit_strikes;
903 FT_Memory memory = face->root.stream->memory;
904 FT_UShort em_size = face->header.Units_Per_EM;
905 FT_Short avgwidth = face->os2.xAvgCharWidth;
909 if ( em_size == 0 || face->os2.version == 0xFFFFU )
923 error = sfnt->load_strike_metrics( face, i, &metrics );
959 root->bbox.xMin = face->header.xMin;
960 root->bbox.yMin = face->header.yMin;
961 root->bbox.xMax = face->header.xMax;
962 root->bbox.yMax = face->header.yMax;
963 root->units_per_EM = face->header.Units_Per_EM;
997 root->ascender = face->horizontal.Ascender;
998 root->descender = face->horizontal.Descender;
1001 face->horizontal.Line_Gap );
1006 if ( face->horizontal.Line_Gap == 0 )
1013 if ( face->os2.version != 0xFFFFU && root->ascender )
1018 root->ascender = face->os2.sTypoAscender;
1019 root->descender = -face->os2.sTypoDescender;
1021 height = root->ascender + root->descender + face->os2.sTypoLineGap;
1027 root->max_advance_width = face->horizontal.advance_Width_Max;
1028 root->max_advance_height = (FT_Short)( face->vertical_info
1029 ? face->vertical.advance_Height_Max
1035 root->underline_position = face->postscript.underlinePosition -
1036 face->postscript.underlineThickness / 2;
1037 root->underline_thickness = face->postscript.underlineThickness;
1055 sfnt_done_face( TT_Face face )
1061 if ( !face )
1064 memory = face->root.memory;
1065 sfnt = (SFNT_Service)face->sfnt;
1071 sfnt->free_psnames( face );
1075 sfnt->free_eblc( face );
1080 tt_face_free_bdf_props( face );
1084 tt_face_done_kern( face );
1087 FT_FREE( face->ttc_header.offsets );
1088 face->ttc_header.count = 0;
1091 FT_FREE( face->dir_tables );
1092 face->num_tables = 0;
1095 FT_Stream stream = FT_FACE_STREAM( face );
1099 FT_FRAME_RELEASE( face->cmap_table );
1100 face->cmap_size = 0;
1106 FT_Stream stream = FT_FACE_STREAM( face );
1109 FT_FRAME_RELEASE( face->horz_metrics );
1110 FT_FRAME_RELEASE( face->vert_metrics );
1111 face->horz_metrics_size = 0;
1112 face->vert_metrics_size = 0;
1115 FT_FREE( face->horizontal.long_metrics );
1116 FT_FREE( face->horizontal.short_metrics );
1120 if ( face->vertical_info )
1122 FT_FREE( face->vertical.long_metrics );
1123 FT_FREE( face->vertical.short_metrics );
1124 face->vertical_info = 0;
1128 FT_FREE( face->gasp.gaspRanges );
1129 face->gasp.numRanges = 0;
1133 sfnt->free_name( face );
1136 FT_FREE( face->root.family_name );
1137 FT_FREE( face->root.style_name );
1140 FT_FREE( face->root.available_sizes );
1141 face->root.num_fixed_sizes = 0;
1143 FT_FREE( face->postscript_name );
1145 face->sfnt = 0;