2691 {
2694
2695#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
2696#define IS_DEFAULT_INSTANCE ( !( FT_IS_NAMED_INSTANCE( glyph->face ) || \
2697 FT_IS_VARIATION( glyph->face ) ) )
2698#else
2699#define IS_DEFAULT_INSTANCE 1
2700#endif
2701
2702
2703 FT_TRACE1((
"TT_Load_Glyph: glyph index %d\n", glyph_index ));
2704
2705#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
2706
2707
2708 if (
size->strike_index != 0xFFFFFFFFUL &&
2711 {
2712 error = load_sbit_image(
size, glyph, glyph_index, load_flags );
2714 {
2715
2716
2718 {
2720 FT_Short left_bearing = 0, top_bearing = 0;
2721 FT_UShort advance_width = 0, advance_height = 0;
2722
2723
2724
2725
2726
2727
2728
2729 if ( !
face->horz_metrics_size )
2731
2732
2734 &left_bearing,
2735 &advance_width );
2737 0,
2738 &top_bearing,
2739 &advance_height );
2740
2743
2746
2747 glyph->
metrics.horiBearingX = left_bearing;
2748 glyph->
metrics.horiBearingY = 0;
2749 glyph->
metrics.horiAdvance = advance_width;
2750
2751 glyph->
metrics.vertBearingX = 0;
2752 glyph->
metrics.vertBearingY = top_bearing;
2753 glyph->
metrics.vertAdvance = advance_height;
2754
2755 glyph->
format = FT_GLYPH_FORMAT_BITMAP;
2757
2760
2762 }
2763 }
2765 {
2766
2769 }
2770 else
2771 {
2773 {
2774
2780
2781
2782
2786 size->metrics->x_scale );
2790 size->metrics->y_scale );
2791 }
2792
2794 }
2795 }
2796
2797#endif
2798
2799
2801 {
2804 }
2805
2807 {
2810 }
2811
2815
2819
2820
2823 {
2824 if ( glyph->
format == FT_GLYPH_FORMAT_COMPOSITE )
2825 {
2828 }
2829 else
2830 {
2833
2834
2835
2836
2837
2840 }
2841
2842#ifdef TT_USE_BYTECODE_INTERPRETER
2843
2845 {
2847 {
2848
2850 {
2851 case 0:
2853 break;
2854 case 1:
2855
2856 break;
2857 case 4:
2860 break;
2861 case 5:
2863 break;
2864
2865 default:
2867 break;
2868 }
2869 }
2870 else
2872 }
2873
2874#endif
2875
2877 }
2878
2880
2881
2882
2883
2884
2886 size->metrics->y_ppem < 24 )
2888
2890#ifdef FT_DEBUG_LEVEL_TRACE
2892 FT_TRACE1((
" failed (error code 0x%x)\n",
2894#endif
2895
2897 }
#define FT_LOAD_SBITS_ONLY
#define FT_LOAD_NO_BITMAP
#define FT_IS_SCALABLE(face)
FT_MulFix(FT_Long a, FT_Long b)
#define FT_TRACE1(varformat)
#define FT_OUTLINE_SMART_DROPOUTS
#define FT_OUTLINE_IGNORE_DROPOUTS
#define FT_OUTLINE_INCLUDE_STUBS
#define FT_OUTLINE_HIGH_PRECISION
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
FT_Fixed linearHoriAdvance
FT_Fixed linearVertAdvance
static void tt_loader_done(TT_Loader loader)
static FT_Error load_truetype_glyph(TT_Loader loader, FT_UInt glyph_index, FT_UInt recurse_count, FT_Bool header_only)
static FT_Error tt_loader_init(TT_Loader loader, TT_Size size, TT_GlyphSlot glyph, FT_Int32 load_flags, FT_Bool glyf_table_only)
#define IS_DEFAULT_INSTANCE
TT_Get_HMetrics(TT_Face face, FT_UInt idx, FT_Short *lsb, FT_UShort *aw)
static FT_Error compute_glyph_metrics(TT_Loader loader, FT_UInt glyph_index)
TT_Get_VMetrics(TT_Face face, FT_UInt idx, FT_Pos yMax, FT_Short *tsb, FT_UShort *ah)
struct TT_FaceRec_ * TT_Face